I am writing a small particle system demo. It uses the attached
vertex, geometry and fragment shaders to draw the particles. The
geometry shader is a dummy pass through shader just passing the
vertex position which is simply an index to a 2D texture containing
the actual position. The particle position texture is updated using a
fragment shader in a different part of the program that works fine.
The trouble is that I can only read the particle position from
texture in the geometry shader if I also use the same texture in the
fragment shader. I have to actually read something from the texture.
Just having the sampler is not enough.
To be precise, if I comment out the two dummies in the (attached)
fragment program, the particle system ceases to work. If I just
remove one dummy, the corresponding texture read in the geometry
shader does not work.
In some of my experiments I could also make it work by simply
removing the fragment shader but then the textures would, not so
surprisingly, influence the color and of course I could not disable
the texturing. It also does not work if I read from the texture in
the vertex shader, so the problem is about using textures in either
the vertex or geometry shader while ignoring them in the fragment
shader.
I would assume that this is a wild bug that only occurs in
conjunction with the point primitive. My platform is a MacBook Pro
with a Geforce 8800M GT running Tiger 10.4.11
Has anyone else encountered this?
If you are interested in reproducing the bug, I will be happy to also
supply the C++ program.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Mac-opengl mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden