I have a GLSL shader and I'm writing gl_PointSize in my vertex shader.
To verify the value, I send it to my fragment shader and it has the
correct value, however, my points are all rendering according to
glPointSize() not gl_PointSize. Any ideas? OSX10.4.8 macintel radeon
x1600 Is there something I have to do aside from writing to the
value? I have point sprites enabled when drawing the points.
thanks,
wes
varying vec2 texcoord0;
varying float size;
void main (void)
{
// transform texcoords
texcoord0 = vec2(gl_TextureMatrix[0] * gl_MultiTexCoord0);
gl_PointSize = 10.;
size = gl_PointSize;
gl_Position = ftransform();
}
// texcoords
varying vec2 texcoord0;
// samplers
uniform sampler2D tex0;
varying float size;
void main (void)
{
vec4 color = texture2D(tex0, texcoord0);
gl_FragColor = vec4(vec3(size/10.), 1.);
}