From aabf60c8e56b09c9922a158e103ef9b1df06efcf Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Fri, 19 Dec 2008 16:12:40 +0000 Subject: [PATCH] Added setting of the gl_ClipVertex to enable clip planes to affect preciptation --- src/osgParticle/PrecipitationEffect.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/osgParticle/PrecipitationEffect.cpp b/src/osgParticle/PrecipitationEffect.cpp index 6f067f2b2..71ae54246 100644 --- a/src/osgParticle/PrecipitationEffect.cpp +++ b/src/osgParticle/PrecipitationEffect.cpp @@ -553,6 +553,7 @@ void PrecipitationEffect::setUpGeometries(unsigned int numParticles) " v1.xy += dp*texCoord.x;\n" " \n" " gl_Position = gl_ProjectionMatrix * v1;\n" + " gl_ClipVertex = v1;\n" "}\n"; char fragmentShaderSource[] = @@ -624,6 +625,7 @@ void PrecipitationEffect::setUpGeometries(unsigned int numParticles) " v1.xyz += dv*texCoord.y;\n" " \n" " gl_Position = gl_ProjectionMatrix * v1;\n" + " gl_ClipVertex = v1;\n" "}\n"; char fragmentShaderSource[] = @@ -681,6 +683,7 @@ void PrecipitationEffect::setUpGeometries(unsigned int numParticles) " gl_PointSize = ceil(pointSize);\n" " \n" " colour.a = 0.05+(pointSize*pointSize)/(gl_PointSize*gl_PointSize);\n" + " gl_ClipVertex = v_current;\n" "}\n"; char fragmentShaderSource[] =