Sign in to follow this  
ConfigSys

GL_POINT_SPRITE_ARB Texture Coords in GLSL

Recommended Posts

ConfigSys    122
Hi! I have some trouble generating the correct texture coordinates when drawing sprites in GLSL shaders. Afaik GLSL discards TexEnv setttings, so glTexEnvf( GL_POINT_SPRITE_ARB, GL_COORD_REPLACE_ARB, GL_TRUE ); does not have an influence. Currently my gl_TexCoord[0] is 0.0,0.0 for all fragments calculated, although the value is set to gl_MultiTexCoord0. The texture returns the correct value for any other texture coordinates i set manually. Anyone suggestions? Thanks for your help.

Share this post


Link to post
Share on other sites
zedzeek    529
point_sprites are useless (how the hell they made it inot gl2.0 i never know)
seems like youve discovered one of the many problems

Share this post


Link to post
Share on other sites
ConfigSys    122
Using quads increases my vertexes significantly. My vertex shader calculates the position of the particles with a texture fetch from the position texture. Since the nv 6800 is limited to apox 40.000.000 texture fetches thats quite bad for my millions of particles.

Additionally, i know sprites work with shaders, i've seen demos. I just don't know what i did wrong.

Share this post


Link to post
Share on other sites
ConfigSys    122
According to "OpenGL(R) Shading Language" by Randi J. Rost, the glTexEnv calls influence the states of the fixed function pipeline, but not the shader. It does not return an error and does not change the result if commented out.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this