Cleanup
This commit is contained in:
+4
-13
@@ -196,15 +196,15 @@ doDrawing' win pdata u = do
|
|||||||
renderLayer BloomLayer shadV pokeCounts
|
renderLayer BloomLayer shadV pokeCounts
|
||||||
-- draw clouds to block bloom particles, transparency blocks some alpha
|
-- draw clouds to block bloom particles, transparency blocks some alpha
|
||||||
glDepthMask GL_FALSE
|
glDepthMask GL_FALSE
|
||||||
glBlendColor 0 0 0 0.1 -- using this and GL_CONSTANT_ALPHA below
|
--glBlendColor 0 0 0 0.1 -- using this and GL_CONSTANT_ALPHA below
|
||||||
-- can allow for some bloom to bleed through underneath the clouds
|
glBlendColor 0 0 0 0.05 -- using this and GL_CONSTANT_ALPHA below
|
||||||
|
-- can allow for extra bloom to bleed through underneath the clouds
|
||||||
-- note that BloomNoZWrite will always be under the clouds, this should be
|
-- note that BloomNoZWrite will always be under the clouds, this should be
|
||||||
-- rethought, either do another pass and write just the depth or even remove
|
-- rethought, either do another pass and write just the depth or even remove
|
||||||
-- the layer entirely
|
-- the layer entirely
|
||||||
glBlendFuncSeparate GL_ZERO GL_ONE GL_CONSTANT_ALPHA GL_ONE_MINUS_SRC_ALPHA
|
glBlendFuncSeparate GL_ZERO GL_ONE GL_CONSTANT_ALPHA GL_ONE_MINUS_SRC_ALPHA
|
||||||
glUseProgram (pdata ^. cloudShader)
|
glUseProgram (pdata ^. cloudShader)
|
||||||
glDrawArrays GL_TRIANGLES 0 (fromIntegral nCloudVs * 6)
|
glDrawArrays GL_TRIANGLES 0 (fromIntegral nCloudVs * 6)
|
||||||
glDepthMask GL_TRUE
|
|
||||||
|
|
||||||
--setup downscale viewport for blurring bloom
|
--setup downscale viewport for blurring bloom
|
||||||
--setViewportSize (round winx `div` (2 * resFact)) (round winy `div` (2 * resFact))
|
--setViewportSize (round winx `div` (2 * resFact)) (round winy `div` (2 * resFact))
|
||||||
@@ -262,20 +262,11 @@ doDrawing' win pdata u = do
|
|||||||
glEnable GL_BLEND
|
glEnable GL_BLEND
|
||||||
-- we sum the positions weighted by alpha, and sum the alpha
|
-- we sum the positions weighted by alpha, and sum the alpha
|
||||||
glBlendFuncSeparatei 1 GL_SRC_ALPHA GL_ONE GL_ONE GL_ONE
|
glBlendFuncSeparatei 1 GL_SRC_ALPHA GL_ONE GL_ONE GL_ONE
|
||||||
--glBlendFuncSeparatei 1 GL_ONE GL_ZERO GL_ONE GL_ZERO
|
-- we sill divide by the alpha later
|
||||||
-- and sum the normals weighted by alpha
|
-- and sum the normals weighted by alpha
|
||||||
--glBlendFunci 2 GL_SRC_ALPHA GL_ONE
|
|
||||||
glBlendFunci 2 GL_SRC_ALPHA GL_ONE
|
glBlendFunci 2 GL_SRC_ALPHA GL_ONE
|
||||||
glUseProgram (pdata ^. cloudShader)
|
glUseProgram (pdata ^. cloudShader)
|
||||||
-- glDepthMask GL_TRUE
|
|
||||||
glDrawArrays GL_TRIANGLES 0 (fromIntegral nCloudVs * 6)
|
glDrawArrays GL_TRIANGLES 0 (fromIntegral nCloudVs * 6)
|
||||||
---
|
|
||||||
-- glEnable GL_CULL_FACE
|
|
||||||
-- glEnable GL_DEPTH_CLAMP
|
|
||||||
---- drawShader (_windowShader pdata) nWins
|
|
||||||
-- glDisable GL_DEPTH_CLAMP
|
|
||||||
-- glDisable GL_CULL_FACE
|
|
||||||
-- drawShader (_windowShader pdata) nWins
|
|
||||||
glBindFramebuffer GL_FRAMEBUFFER (pdata ^. fboPos . _1 . unFBO)
|
glBindFramebuffer GL_FRAMEBUFFER (pdata ^. fboPos . _1 . unFBO)
|
||||||
withArray [0, 0, 0, 0] $ \ptr ->
|
withArray [0, 0, 0, 0] $ \ptr ->
|
||||||
glClearNamedFramebufferfv
|
glClearNamedFramebufferfv
|
||||||
|
|||||||
@@ -32,7 +32,10 @@ import Data.Foldable
|
|||||||
import Data.Monoid
|
import Data.Monoid
|
||||||
|
|
||||||
testStringInit :: Universe -> [String]
|
testStringInit :: Universe -> [String]
|
||||||
testStringInit u = [show $ length $ u ^. uvWorld . cWorld . lWorld . walls]
|
testStringInit u = [ show $ fmap (
|
||||||
|
worldPosToScreen (u ^. uvWorld . wCam) )
|
||||||
|
$ u ^? uvWorld . cWorld . lWorld . creatures . ix 0 . crPos . _xy
|
||||||
|
]
|
||||||
-- [show $ foldMap (foldMap (Sum . length . (^. seObstacles)))
|
-- [show $ foldMap (foldMap (Sum . length . (^. seObstacles)))
|
||||||
-- $ u ^. uvWorld . cWorld . incGraph]
|
-- $ u ^. uvWorld . cWorld . incGraph]
|
||||||
-- foldMap prettyShort $ u ^? uvWorld . cWorld . lWorld . machines . ix 0 . mcType . _McProxSensor
|
-- foldMap prettyShort $ u ^? uvWorld . cWorld . lWorld . machines . ix 0 . mcType . _McProxSensor
|
||||||
|
|||||||
@@ -29,7 +29,8 @@ sizeFBOs cfig rdata =
|
|||||||
GL_RGBA16F -- could possibly recover using depth in a clever way
|
GL_RGBA16F -- could possibly recover using depth in a clever way
|
||||||
-- but probably not, because the projection matrix is
|
-- but probably not, because the projection matrix is
|
||||||
-- not always on-center
|
-- not always on-center
|
||||||
GL_RGBA16F -- make this smaller?
|
--GL_RGBA16F -- make this smaller?
|
||||||
|
GL_RGBA8_SNORM
|
||||||
rdata
|
rdata
|
||||||
fboBase
|
fboBase
|
||||||
>>= flip
|
>>= flip
|
||||||
|
|||||||
@@ -2704,7 +2704,7 @@ brightX src/Color.hs 116;" f
|
|||||||
btSPic src/Dodge/Render/ShapePicture.hs 129;" f
|
btSPic src/Dodge/Render/ShapePicture.hs 129;" f
|
||||||
btText src/Dodge/Inventory/SelectionList.hs 237;" f
|
btText src/Dodge/Inventory/SelectionList.hs 237;" f
|
||||||
bufferEBO src/Shader/Bind.hs 28;" f
|
bufferEBO src/Shader/Bind.hs 28;" f
|
||||||
bufferPerspectiveMatrixUBO src/Dodge/Render.hs 413;" f
|
bufferPerspectiveMatrixUBO src/Dodge/Render.hs 409;" f
|
||||||
bufferPokedVBO src/Shader/Bind.hs 19;" f
|
bufferPokedVBO src/Shader/Bind.hs 19;" f
|
||||||
bufferShaderLayers src/Shader/Bind.hs 32;" f
|
bufferShaderLayers src/Shader/Bind.hs 32;" f
|
||||||
bulletBeltBracer src/Dodge/Item/Equipment.hs 67;" f
|
bulletBeltBracer src/Dodge/Item/Equipment.hs 67;" f
|
||||||
@@ -3558,7 +3558,7 @@ getCrMoveSpeed src/Dodge/Creature/Statistics.hs 50;" f
|
|||||||
getCrsFromRooms src/Dodge/Room/Tutorial.hs 357;" f
|
getCrsFromRooms src/Dodge/Room/Tutorial.hs 357;" f
|
||||||
getCrsFromRooms' src/Dodge/Room/Tutorial.hs 344;" f
|
getCrsFromRooms' src/Dodge/Room/Tutorial.hs 344;" f
|
||||||
getDebugMouseOver src/Dodge/Update.hs 374;" f
|
getDebugMouseOver src/Dodge/Update.hs 374;" f
|
||||||
getDistortions src/Dodge/Render.hs 425;" f
|
getDistortions src/Dodge/Render.hs 421;" f
|
||||||
getEdgesCrossing src/Dodge/Path.hs 37;" f
|
getEdgesCrossing src/Dodge/Path.hs 37;" f
|
||||||
getGrenadeHitEffect src/Dodge/HeldUse.hs 1264;" f
|
getGrenadeHitEffect src/Dodge/HeldUse.hs 1264;" f
|
||||||
getInventoryPath src/Dodge/Inventory/Path.hs 9;" f
|
getInventoryPath src/Dodge/Inventory/Path.hs 9;" f
|
||||||
@@ -4821,7 +4821,7 @@ setTiles src/Dodge/Layout.hs 67;" f
|
|||||||
setTreeInts src/Dodge/Room/Tutorial.hs 98;" f
|
setTreeInts src/Dodge/Room/Tutorial.hs 98;" f
|
||||||
setViewDistance src/Dodge/Update/Camera.hs 239;" f
|
setViewDistance src/Dodge/Update/Camera.hs 239;" f
|
||||||
setViewPos src/Dodge/Creature/ReaderUpdate.hs 69;" f
|
setViewPos src/Dodge/Creature/ReaderUpdate.hs 69;" f
|
||||||
setViewport src/Dodge/Render.hs 430;" f
|
setViewport src/Dodge/Render.hs 426;" f
|
||||||
setVol src/Dodge/Config.hs 47;" f
|
setVol src/Dodge/Config.hs 47;" f
|
||||||
setWristShieldPos src/Dodge/Equipment.hs 49;" f
|
setWristShieldPos src/Dodge/Equipment.hs 49;" f
|
||||||
setWristShieldPos src/Dodge/Euse.hs 38;" f
|
setWristShieldPos src/Dodge/Euse.hs 38;" f
|
||||||
|
|||||||
Reference in New Issue
Block a user