Holiday notice: Cycling '74 will be closed on Dec 25th, 26th, and Jan 1st. Manual authorization, support cases, and manual order processing will be delayed.
I'd like to make use of the gl_PointSize within a shader, but I have had no luck. I'm trying to use this to size individual vertices by overriding the global @point_size attribute in a jit.gl.mesh.
I've seen mention that this can be enabled with a call to glEnable( GL_VERTEX_PROGRAM_POINT_SIZE) and glEnable(GL_POINT_SPRITE), which I guessed could be done via jit.gl.sketch. I tried doing this but haven't seen any change in the mesh appearance.
I've attached example maxpat and jxs files to illustrate. Any thoughts?
unfortunately not yet, but it's still on my radar for max 8.
I still would rec geometry shaders for this. if you need an example patch i've got something i can dig up.
here's a very basic example that uses the factory billboard shader to draw the points, and the Z position to change the size. you could improve on this in many ways, such as adding in a custom vertex attribute (as in your patch above) that you pass to the geometry shader via a varying attribute, using that in place of the uniform scale attribute (in the same way that texdim is passed from vertex to geometry in the billboard shader).
you could also draw the circle in the fragment shader instead of using the texture, using something like this: