Just figured it out, partially, at least: The original vertices are
still present, the fragment is being shifted procedurally; So, culling
is taking place based on the static vertices. Turning GL_CLIP_PLANEi
and GL_CULL_FACE etc don't solve anything. Is there another state
variable that i can disable so the moved frags don't get culled?
Thanks for any advice,
Charles
Charles Cosse wrote:
Hello OSG Users,
i'm having trouble with my viewing frustum not updating when using
shaders. Specifically, i've implemented the confetti cannon example
and have the particles being emitted with random 3D velocities. My
vertex and frag shaders are just like the GLSL book, with gl_Position
being updated as:
vert=gl_Vertex + vec4(Velocity * t,0.0);//t is a Uniform updated ea frame
gl_Position=gl_ModelViewProjectionMatrix * vert;
Depending on the viewpoint, however, particles disappear as they get
farther away from the source. They re-appear if you change the
viewpoint, or sometimes it's necessary to zoom out, as well. In fact,
the same can be seen in the glsl_confetti.osg example by
rotating/zooming.
It seems like while the viewpoint is updated, the original view
frustum _volume_ is not. Is there any cure for this? Thank you!
Charles Cosse
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/