This commit is contained in:
2023-03-21 16:04:56 +00:00
parent d5fbc06332
commit 9570becd1b
6 changed files with 36 additions and 103 deletions
+2 -8
View File
@@ -282,16 +282,10 @@ doDrawing' win pdata u = do
2
ptr
glEnable GL_BLEND
--glDisable GL_BLEND
-- the idea is to (roughly) get the average position
--glBlendFunci 1 GL_ONE_MINUS_DST_ALPHA GL_DST_ALPHA
-- or, if we order the clouds, just get the top pos
--glBlendFunci 1 GL_ONE GL_ZERO
-- we sum the positions weighted by alpha, and sum the alpha
glBlendFuncSeparatei 1 GL_SRC_ALPHA GL_ONE GL_ONE GL_ONE
-- and to sum the normals (based on the alpha)
-- and sum the normals weighted by alpha
glBlendFunci 2 GL_SRC_ALPHA GL_ONE
-- just get the top normal
-- glBlendFunci 2 GL_ONE GL_ZERO
glUseProgram (pdata ^. cloudShader . shaderUINT)
glBindVertexArray $ pdata ^. cloudShader . shaderVAO . vaoName
glDrawElements