Implement smoke as clouds, mask colors when rendering framebuf texture
This commit is contained in:
@@ -62,11 +62,12 @@ renderPicture' pdata rot zoom trans@(tranx,trany) wins@(winx,winy) wallPointsCol
|
||||
renderFoldable pdata $ picToLTree (Just 0) pic
|
||||
|
||||
-- reset blend so that light map doesn't apply
|
||||
blendFunc $= (SrcAlpha,OneMinusSrcAlpha)
|
||||
-- blendFunc $= (SrcAlpha,OneMinusSrcAlpha)
|
||||
blendFuncSeparate $= ((SrcAlpha,OneMinusSrcAlpha) , (Zero,One))
|
||||
renderFoldable pdata $ picToLTree (Just 1) pic
|
||||
|
||||
-- set drawing for on top
|
||||
-- blendFuncSeparate $= ((SrcAlphaSaturate, OneMinusSrcAlpha), (Zero,One))
|
||||
blendFuncSeparate $= ((SrcAlphaSaturate, OneMinusSrcAlpha), (Zero,One))
|
||||
|
||||
renderFoldable pdata $ picToLTree (Just 2) pic
|
||||
|
||||
@@ -190,6 +191,8 @@ createLightMap pdata rot zoom (tranx,trany) (winx,winy) wallPoints lightPoints
|
||||
|
||||
-- blendFunc $= (Zero,One)
|
||||
bindFramebuffer Framebuffer $= defaultFramebufferObject
|
||||
|
||||
colorMask $= (Color4 Disabled Disabled Disabled Enabled)
|
||||
--
|
||||
-- blendFunc $= (SrcAlpha, OneMinusSrcAlpha)
|
||||
bindShaderBuffers [_fullscreenShader pdata] [4]
|
||||
@@ -197,6 +200,8 @@ createLightMap pdata rot zoom (tranx,trany) (winx,winy) wallPoints lightPoints
|
||||
-- blendFunc $= (One, Zero)
|
||||
drawShader (_fullscreenShader pdata) 4
|
||||
|
||||
colorMask $= (Color4 Enabled Enabled Enabled Enabled)
|
||||
|
||||
blend $= Enabled
|
||||
|
||||
renderBackground :: RenderData -> Float -> Float -> (Float,Float) -> (Float,Float) -> IO ()
|
||||
|
||||
Reference in New Issue
Block a user