Implement textures on walls, windows don't look great yet
This commit is contained in:
@@ -41,10 +41,10 @@ setCommonUniforms pdata rot zoom (tranx,trany) (winx,winy) = do
|
||||
: (map extractProgAndUnis $ _listShaders pdata)
|
||||
)
|
||||
|
||||
renderPicture' :: RenderData -> Float -> Float -> (Float,Float) -> (Float,Float) ->
|
||||
[((Point2,Point2),Point4)] -> [Point4] ->
|
||||
renderPicture' :: RenderData -> Float -> Float -> Point2 -> Point2 ->
|
||||
[((Point2,Point2),Point4)] -> [((Point2,Point2),Point4)] -> [Point4] ->
|
||||
(Float,Float) -> Picture -> IO (Word32,Word32)
|
||||
renderPicture' pdata rot zoom trans@(tranx,trany) wins@(winx,winy) wallPointsCol lightPoints
|
||||
renderPicture' pdata rot zoom trans@(tranx,trany) wins@(winx,winy) wallPointsCol windowPoints lightPoints
|
||||
viewFroms@(viewFromx,viewFromy) pic = do
|
||||
let wallPoints = map fst wallPointsCol
|
||||
startTicks <- SDL.ticks
|
||||
@@ -67,6 +67,8 @@ renderPicture' pdata rot zoom trans@(tranx,trany) wins@(winx,winy) wallPointsCol
|
||||
|
||||
renderWalls pdata wallPointsCol pmat
|
||||
|
||||
renderWalls pdata windowPoints pmat
|
||||
|
||||
-- reset blend so that light map doesn't apply
|
||||
blendFunc $= (SrcAlpha,OneMinusSrcAlpha)
|
||||
renderFoldable pdata $ picToLTree (Just 1) pic
|
||||
@@ -120,7 +122,6 @@ createLightMap pdata rot zoom (tranx,trany) (winx,winy) wallPoints lightPoints
|
||||
uniform ( (fromJust $ _shaderCustomUnis $ _wallShadowShader pdata) !! 2)
|
||||
$= (0 :: Float)
|
||||
cullFace $= Just Back
|
||||
cullFace $= Nothing
|
||||
drawShader (_wallShadowShader pdata) nWalls
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user