I have a problem understanding the working of gl_PointCoord correctly.
They way I get it is, if I draw a point with PointSize > 1 the pixels that light up on the display sourrounding the center pixel have gl_PointCoord values between 0 and 1 correct?
There should be nothing more to it than just access gl_PointCoord in the fragmentshader, no initialization other than using glDrawArrays(GL.GL_POINTS,…) correct?
I am getting always 0 for all my fragments. Searching for this gives a few results, but only on older openGL versions, in combination with nvidia driver problems. I dont really think I have faulty drivers here or anything. I rather think I am doing something wrong. So here goes the code:
#version 420 core
out vec3 fColor;
fColor = vec3(gl_PointCoord.s,gl_PointCoord.t,0.0);
[CODE=Main] gl.glPointSize(15.8f); gl.glDrawArrays(GL.GL_POINTS, 0, 6);
So instead of colorful cubes I just get white ones.
Also is there a difference between gl_PointCoord.s/t and gl_PointCoord.x/y ? What does s and t stand for?