Implement low res shadows
This commit is contained in:
@@ -42,7 +42,7 @@ menuScreen cfig hw hh mLays = case mLays of
|
||||
,"n - MUSIC VOLUME + m : " ++ muvol
|
||||
]
|
||||
(GraphicsOptionMenu : _) -> optionsList hw hh "OPTIONS:GRAPHICS"
|
||||
["w - WALL TEXTURES"
|
||||
["w - WALL TEXTURES:" ++ show (_wall_textured cfig)
|
||||
]
|
||||
(ControlList : _) -> pictures
|
||||
[color (withAlpha 0.5 black) $ polygon $ screenBox hw hh
|
||||
|
||||
@@ -1,21 +1,20 @@
|
||||
module Dodge.Render.PerspectiveMatrix
|
||||
where
|
||||
import Dodge.Data
|
||||
|
||||
import Geometry
|
||||
|
||||
import Linear.Matrix
|
||||
import Linear.V4
|
||||
import Graphics.Rendering.OpenGL (GLfloat)
|
||||
|
||||
perspectiveMatrix :: World -> [GLfloat]
|
||||
perspectiveMatrix w =
|
||||
let rot = _cameraRot w
|
||||
zoom = _cameraZoom w
|
||||
(tranx,trany) = _cameraCenter w
|
||||
(winx,winy) = (_windowX w,_windowY w)
|
||||
(viewFromx,viewFromy) = _cameraViewFrom w
|
||||
scalMat = Linear.Matrix.transpose $ V4
|
||||
perspectiveMatrix
|
||||
:: Float -- ^ Rotation
|
||||
-> Float -- ^ Zoom
|
||||
-> Point2 -- ^ Translation
|
||||
-> Point2 -- ^ Window size
|
||||
-> Point2 -- ^ View froms
|
||||
-> [GLfloat]
|
||||
perspectiveMatrix rot zoom (tranx,trany) (winx,winy) (viewFromx,viewFromy) =
|
||||
let scalMat = Linear.Matrix.transpose $ V4
|
||||
(V4 (2*zoom/winx) 0 0 (0::GLfloat))
|
||||
(V4 0 (2*zoom/winy) 0 0)
|
||||
(V4 0 0 0.5 0) --scaled to make walls shorter
|
||||
|
||||
Reference in New Issue
Block a user