OGRECave / ogre

scene-oriented, flexible 3D engine (C++, Python, C#, Java)
https://ogrecave.github.io/ogre/
MIT License
3.91k stars 963 forks source link

RTShader: Enable specular lighting when vertex colours are tracked #3155

Closed benjaminvdh closed 2 months ago

benjaminvdh commented 2 months ago

The RTShaderSystem only looks at specular colour and shininess when it checks whether specular lighting should be enabled or not. When specular is set to track the vertex colour in a material script, the actual colour value is still black, so specular lighting is disabled. I added an extra check to fix this.

It would also be possible to set the specular colour to white in the script translator if vertex colour tracking is enabled, but that might have other side effects.