Play around with alpha blending
This commit is contained in:
+6
-2
@@ -231,7 +231,9 @@ doDrawing' win pdata u = do
|
||||
withArray [0, 0, 0, 0] $
|
||||
glClearNamedFramebufferfv (pdata ^. fboBloom . _1 . unFBO) GL_COLOR 0
|
||||
glDepthFunc GL_LESS
|
||||
glBlendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
|
||||
--glBlendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
|
||||
--glBlendFunc GL_ONE GL_ONE_MINUS_SRC_ALPHA
|
||||
glBlendFunc GL_ONE GL_ONE
|
||||
glDepthMask GL_FALSE
|
||||
renderLayer BloomNoZWrite shadV pokeCounts
|
||||
glDepthMask GL_TRUE
|
||||
@@ -271,6 +273,7 @@ doDrawing' win pdata u = do
|
||||
glDepthFunc GL_LEQUAL
|
||||
glDepthMask GL_FALSE
|
||||
glBlendFuncSeparatei 0 GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA GL_ONE_MINUS_DST_ALPHA GL_ONE
|
||||
--glBlendFunci 0 GL_ONE GL_ONE_MINUS_SRC_ALPHA
|
||||
--withArray [GL_COLOR_ATTACHMENT0, GL_NONE] $
|
||||
withArray [GL_COLOR_ATTACHMENT0, GL_COLOR_ATTACHMENT1] $
|
||||
glNamedFramebufferDrawBuffers (pdata ^. fboCloud . _1 . unFBO) 2
|
||||
@@ -408,7 +411,8 @@ doDrawing' win pdata u = do
|
||||
glDepthFunc GL_ALWAYS
|
||||
glDepthMask GL_FALSE
|
||||
glEnable GL_BLEND
|
||||
glBlendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
|
||||
--glBlendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
|
||||
glBlendFunc GL_ONE GL_ONE_MINUS_SRC_ALPHA -- assume premultiplied alpha
|
||||
renderLayer DebugLayer shadV pokeCounts
|
||||
glBindBufferBase GL_UNIFORM_BUFFER 0 (pdata ^. matUBO)
|
||||
withArray (scaleMatrix (2 / windowXFloat cfig) (2 / windowYFloat cfig)) $
|
||||
|
||||
Reference in New Issue
Block a user