Sign in to follow this  
Dark Engineer

OpenGL mesh with light

Recommended Posts

EarthBanana    1794

I'm assuming that you had your scene and meshes and textures and all that stuff working and displayed on the screen before you tried to insert a light - if this is the case did you make sure that your shaders compiled? I noticed that you used two different extensions for your lighting shader and regular shaders - you have .glsl and .fragmentShader and .vertexShader

 

Other than that your lighting verttex and fragment shaders look okay to me as long as your setting the uniforms correctly in your code and they are compiling and linking together they should work. I've been wrong before though.

Share this post


Link to post
Share on other sites
cr88192    1570

assuming relevant:

maybe verify that the mesh draws as intended without using lighting (fullbright);

maybe verify (if applicable) that things like vertex normals are correct;

maybe try to verify if any calculations should behave as intended;

...

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this