This commit is contained in:
2025-11-20 16:05:02 +00:00
parent 602b162d41
commit bbb682242d
3 changed files with 8 additions and 5 deletions
+6 -3
View File
@@ -9,9 +9,12 @@ void main()
{ {
float d = dot(vControls,vControls); float d = dot(vControls,vControls);
if (d > 1) {discard;} if (d > 1) {discard;}
// the following is an alternative without using discard
// not sure how this would interact with bloom
//float d = min(dot(vControls,vControls),1); //float d = min(dot(vControls,vControls),1);
fCol = vec4(vCol.xyz,vCol.w*(1-d)); float a = vCol.w*(1-d);
fPos = vec4(vPos, fCol.w); fCol = vec4(vCol.xyz,a);
fPos = vec4(vPos, a);
//fNorm = vec4(-vControls, -0.1 + 0.2 * d ,fCol.w); //fNorm = vec4(-vControls, -0.1 + 0.2 * d ,fCol.w);
fNorm = vec4(-vControls, -0.1 + 0.3 * d ,fCol.w); fNorm = vec4(-vControls, -0.1 + 0.3 * d ,a);
} }
+1 -1
View File
@@ -296,7 +296,7 @@ doDrawing' win pdata u = do
(pdata ^. fboCloud . _2 . _3) (pdata ^. fboCloud . _2 . _3)
lightPoints lightPoints
pdata pdata
--draw windows onto window buffer --draw windows into window textures
glBindFramebuffer GL_FRAMEBUFFER (pdata ^. fboWindow . _1 . unFBO) glBindFramebuffer GL_FRAMEBUFFER (pdata ^. fboWindow . _1 . unFBO)
glBindTextureUnit 3 (pdata ^. fboPos . _2 . unTO) glBindTextureUnit 3 (pdata ^. fboPos . _2 . unTO)
withArray [GL_COLOR_ATTACHMENT0, GL_COLOR_ATTACHMENT1] $ withArray [GL_COLOR_ATTACHMENT0, GL_COLOR_ATTACHMENT1] $
+1 -1
View File
@@ -805,7 +805,7 @@ updateCloud w c
& clTimer -~ 1 & clTimer -~ 1
) )
where where
newVel@(V3 _ _ nvz) = (0.95 *.*.* springVels) +.+.+ V3 0 0 (0.01 * vertVel) newVel@(V3 _ _ nvz) = (0.95 *^ springVels) + V3 0 0 (0.01 * vertVel)
newVel2 = stripZ newVel newVel2 = stripZ newVel
vertVel = min 5 $ clAlt c - opz vertVel = min 5 $ clAlt c - opz
springVels = foldl' (clClSpringVel c) (_clVel c) (clsNearPoint oldPos2 w) springVels = foldl' (clClSpringVel c) (_clVel c) (clsNearPoint oldPos2 w)