This commit is contained in:
2025-11-14 01:32:09 +00:00
parent 295a5f7e1d
commit c79e5df683
4 changed files with 13 additions and 18 deletions
+4 -13
View File
@@ -196,15 +196,15 @@ doDrawing' win pdata u = do
renderLayer BloomLayer shadV pokeCounts
-- draw clouds to block bloom particles, transparency blocks some alpha
glDepthMask GL_FALSE
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.1 -- using this and GL_CONSTANT_ALPHA below
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
-- rethought, either do another pass and write just the depth or even remove
-- the layer entirely
glBlendFuncSeparate GL_ZERO GL_ONE GL_CONSTANT_ALPHA GL_ONE_MINUS_SRC_ALPHA
glUseProgram (pdata ^. cloudShader)
glDrawArrays GL_TRIANGLES 0 (fromIntegral nCloudVs * 6)
glDepthMask GL_TRUE
--setup downscale viewport for blurring bloom
--setViewportSize (round winx `div` (2 * resFact)) (round winy `div` (2 * resFact))
@@ -262,20 +262,11 @@ doDrawing' win pdata u = do
glEnable GL_BLEND
-- 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_ONE GL_ZERO GL_ONE GL_ZERO
-- we sill divide by the alpha later
-- and sum the normals weighted by alpha
--glBlendFunci 2 GL_SRC_ALPHA GL_ONE
glBlendFunci 2 GL_SRC_ALPHA GL_ONE
glUseProgram (pdata ^. cloudShader)
-- glDepthMask GL_TRUE
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)
withArray [0, 0, 0, 0] $ \ptr ->
glClearNamedFramebufferfv
+4 -1
View File
@@ -32,7 +32,10 @@ import Data.Foldable
import Data.Monoid
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)))
-- $ u ^. uvWorld . cWorld . incGraph]
-- foldMap prettyShort $ u ^? uvWorld . cWorld . lWorld . machines . ix 0 . mcType . _McProxSensor
+2 -1
View File
@@ -29,7 +29,8 @@ sizeFBOs cfig rdata =
GL_RGBA16F -- could possibly recover using depth in a clever way
-- but probably not, because the projection matrix is
-- not always on-center
GL_RGBA16F -- make this smaller?
--GL_RGBA16F -- make this smaller?
GL_RGBA8_SNORM
rdata
fboBase
>>= flip