Cleanup
This commit is contained in:
+19
-14
@@ -37,18 +37,18 @@ doDrawing pdata u = do
|
||||
camzoom = _cameraZoom w
|
||||
trans = _cameraCenter w
|
||||
wins@(V2 winx winy) = V2 (_windowX cfig) (_windowY cfig)
|
||||
resFact = resFactorNum $ cfig ^. graphics_resolution_factor
|
||||
resFact = resFactorNum $ cfig ^. graphics_resolution_factor
|
||||
(wallPointsCol,windowPoints) = wallsAndWindows cfig w
|
||||
lightPoints = lightsForGloom w
|
||||
viewFroms@(V2 vfx vfy) = _cameraViewFrom w
|
||||
viewFrom3d = Vector3 vfx vfy 20
|
||||
shadV = _pictureShaders pdata
|
||||
lwShad = _lightingWallShadShader pdata
|
||||
lightPoints = lightsForGloom w
|
||||
viewFroms@(V2 vfx vfy) = _cameraViewFrom w
|
||||
viewFrom3d = Vector3 vfx vfy 20
|
||||
shadV = _pictureShaders pdata
|
||||
lwShad = _lightingWallShadShader pdata
|
||||
-- bind as much data into vbos as feasible at this point
|
||||
-- count mutable vectors setup
|
||||
layerCounts <- UMV.replicate (numLayers*6) 0
|
||||
shapeCounts <- UMV.replicate 3 (0 :: Int)
|
||||
wlwiflCounts <- UMV.replicate 3 (0 :: Int)
|
||||
shapeCounts <- UMV.replicate 3 0
|
||||
wlwiflCounts <- UMV.replicate 3 0
|
||||
-- attempt to poke in parallel
|
||||
let (ws,wp) = worldSPic cfig w
|
||||
MP.bindM3 (\ _ _ _ -> return ())
|
||||
@@ -131,16 +131,21 @@ doDrawing pdata u = do
|
||||
drawShader (_textureArrayShader pdata) nFls
|
||||
--draw lightmap into its own buffer
|
||||
bindFramebuffer Framebuffer $= fst (_fboLighting pdata)
|
||||
createLightMap pdata lightPoints nWalls nSilIndices nIndices
|
||||
createLightMap
|
||||
pdata
|
||||
lightPoints
|
||||
nWalls
|
||||
nSilIndices
|
||||
nIndices
|
||||
(_graphics_object_shadows $ _config u)
|
||||
(snd $ snd $ _fboBase pdata)
|
||||
colorMask $= Color4 Enabled Enabled Enabled Enabled
|
||||
clearColor $= Color4 0 0 0 0
|
||||
colorMask $= Color4 Enabled Enabled Enabled Enabled
|
||||
clearColor $= Color4 0 0 0 0
|
||||
--apply lightmap to base buffer
|
||||
bindFramebuffer Framebuffer $= fst (_fboBase pdata)
|
||||
textureBinding Texture2D $= Just (snd $ _fboLighting pdata)
|
||||
blend $= Enabled
|
||||
blendFunc $= (Zero, OneMinusSrcColor)
|
||||
textureBinding Texture2D $= Just (snd $ _fboLighting pdata)
|
||||
blend $= Enabled
|
||||
blendFunc $= (Zero, OneMinusSrcColor)
|
||||
drawShader (_fullscreenShader pdata) 4
|
||||
--draw bloom onto bloom buffer
|
||||
bindFramebuffer Framebuffer $= fst (_fboBloom pdata)
|
||||
|
||||
Reference in New Issue
Block a user