Hi Luke,
I'm currently trying to render an STL object in a glViewWidget, and everything seems to be working fine except for the lighting. All of the shaders except "shaded" are fine. When I use the "shaded" shader, the outside of my object is very dark and the inside is well-lit. It's almost as if the light is inside the object (no matter how I scale the object either before or after adding the item to the glViewWidget). I would like to add some lighting functionality to this shader, but I am not very familiar with modern OpenGL (I've never used a shader). I've used older OpenGL (ie. glBegin and glEnd) and was able to add lights, and I was hoping that you would be able either help me fix the current lighting situation or add my own lighting tools. When I run the shaders example, the lighting appears to be working fine on the "shaded" object (the light moves with the camera, correct?), so I don't know why it isn't working for my object. Is there something simple I could do to ensure that the outside of my object receives more light? Below are some screenshots. The first two are view from the outside (very dark and difficult to see details) and the third is a view from the inside (well-lit)
I would appreciate any advice, and I would be open to learning and adding more lighting/shading tools with some help (where to start, what functions to modify, etc.).
Thanks,
Barrett