Separate Clouds and Dust
This commit is contained in:
+9
-2
@@ -86,12 +86,19 @@ doDrawing' win pdata u = do
|
||||
(0, 0, 0)
|
||||
ws
|
||||
)
|
||||
(nCloudVs, nCloudIs) <-
|
||||
(nCloudVs', nCloudIs') <-
|
||||
-- Might want to sort the clouds based on z depth, not sure
|
||||
V.foldM'
|
||||
(pokeCloud (pdata ^. cloudVBO . vboPtr) (pdata ^. cloudEBO . eboPtr))
|
||||
(0, 0)
|
||||
(V.fromList $ w ^. cWorld . lWorld . clouds)
|
||||
(nCloudVs, nCloudIs) <-
|
||||
-- Might want to sort the clouds based on z depth, not sure
|
||||
V.foldM'
|
||||
(pokeDust (pdata ^. cloudVBO . vboPtr) (pdata ^. cloudEBO . eboPtr))
|
||||
(nCloudVs', nCloudIs')
|
||||
(V.fromList $ w ^. cWorld . lWorld . dusts)
|
||||
|
||||
--(sortOn (^. clPos . _3) $ w ^. cWorld . lWorld . clouds)
|
||||
-- bind wall points, silhouette data, surface geometry
|
||||
bufferShaderLayers shadV pokeCounts
|
||||
@@ -224,7 +231,7 @@ doDrawing' win pdata u = do
|
||||
renderLayer BloomLayer shadV pokeCounts
|
||||
-- draw clouds, transparency blocks some alpha
|
||||
glDepthMask GL_FALSE
|
||||
glBlendColor 0 0 0 0.2 -- using this and GL_CONSTANT_ALPHA below
|
||||
glBlendColor 0 0 0 0.1 -- using this and GL_CONSTANT_ALPHA below
|
||||
-- can allow for some underlighting of the clouds
|
||||
glBlendFuncSeparate GL_ZERO GL_ONE GL_CONSTANT_ALPHA GL_ONE_MINUS_SRC_ALPHA
|
||||
glUseProgram (pdata ^. cloudShader . shaderUINT)
|
||||
|
||||
Reference in New Issue
Block a user