Experiment with bloom
This commit is contained in:
+3
-5
@@ -61,17 +61,15 @@ createLightMap
|
||||
-> [Point2]
|
||||
-> IO ()
|
||||
createLightMap pdata resDiv wallPoints lightPoints fpics scPol = do
|
||||
depthFunc $= Just Less
|
||||
-- get viewport size so we can reset it later
|
||||
(vppos,vpsize) <- get viewport
|
||||
-- set the viewport size to desired fidelity
|
||||
let vsize = divideSize resDiv vpsize
|
||||
viewport $= (vppos, vsize)
|
||||
textureBinding Texture2D $= Just (snd $ _fboLighting pdata)
|
||||
-- this is a problem! it should be resized once on screen/parameter resize
|
||||
--texImage2D Texture2D NoProxy 0 RGBA8 (sizeToTexSize vsize) 0 (PixelData RGBA UnsignedByte nullPtr)
|
||||
textureFilter Texture2D $= ((Linear',Just Linear') , Linear')
|
||||
generateMipmap' Texture2D
|
||||
-- bindFramebuffer Framebuffer $= _spareFBO pdata
|
||||
--textureFilter Texture2D $= ((Linear',Just Linear') , Linear')
|
||||
--generateMipmap' Texture2D
|
||||
-- store wall and light positions into buffer
|
||||
nWallLights <- F.foldM (pokeShader $ _lightingWallShader pdata) (map Render22 wallPoints)
|
||||
bindShaderBuffers [_lightingWallShader pdata] [nWallLights]
|
||||
|
||||
Reference in New Issue
Block a user