Tweak clouds

This commit is contained in:
2023-03-20 22:32:01 +00:00
parent 7d0bb7f229
commit 9bba0a43a4
3 changed files with 46 additions and 44 deletions
+2 -2
View File
@@ -16,7 +16,6 @@ import qualified Data.Vector.Unboxed.Mutable as UMV
import Dodge.Data.Universe
import Dodge.Render.Lights
import Dodge.Render.Picture
import Dodge.Render.Shadow
import Dodge.Render.ShapePicture
import Dodge.Render.Walls
import Foreign
@@ -275,8 +274,9 @@ doDrawing' win pdata u = do
2
ptr
glEnable GL_BLEND
glBlendColor 0.5 0.5 0.5 0.5
-- the idea is to (roughly) get the average position
glBlendFunci 1 GL_ONE_MINUS_DST_ALPHA GL_DST_ALPHA
-- and to sum the normals
glBlendFunci 2 GL_ONE GL_ONE
glUseProgram (pdata ^. cloudShader . shaderUINT)
glBindVertexArray $ pdata ^. cloudShader . shaderVAO . vaoName