I have a bunch of points which I display as GL_POINTS. Each one has a normal
vector, and if the normal points towards the camera, then it gets nicely lit,
but if it points away, then we see the “back” of the point, which isn’t lit.
Is there some way of getting two-sided lighting of GL_POINTS like we can with
polygons?
Hi mobeen, I’ve considered having only diffuse lighting with pairs of opposing
lights, but I really want specular lighting. I think I might be able to do it
with a spherical texture map, or I could write a shader. I’m just wondering if
I’ve missed something simple before I set off down one of these paths.
Yeah i think u should go ahead with a custom shader it gives u full control. Two sided lighting should be quite easy since for basic diffuse model we do something like this
float NdotL = max(dot(N,L),0);
For two sided lighting you could do this
float NdotL = abs(dot(N,L));
You should start with diffuse lighting and make sure it works before u move on to specular lighting.
I dont think the FFP has anything like two sided lighting for GL_POINTS but this is based on my meager knowledge.