osre
osre copied to clipboard
When no texture is loaded the light calculation is wrong
Describe the bug When a loaded model does not have any textures the texture calculation gets wrong.
To Reproduce Steps to reproduce the behavior:
- Load obj box without texures
- Check render result
Expected behavior Lightning applied
Screenshots
Desktop (please complete the following information):
- OS: All
Additional context N/A
Seems that we need to do the calculation of phong in the fragment shader: https://stackoverflow.com/questions/55778950/how-to-combine-texture-and-lighting-in-opengl