Enable HDR lighting with Reinhard tonemapping across all world shaders

Replace hardcoded specular multipliers with uLightColor * uSpecularIntensity
uniforms in all 4 world shaders (terrain, WMO, M2, character), set HDR sun
color (1.5, 1.4, 1.3) and specular intensity 0.5 so highlights can exceed
1.0, and switch the post-process pass from passthrough to exposure-compensated
Reinhard (exposure=1.8) for soft highlight roll-off without clipping.
This commit is contained in:
Kelsi 2026-02-04 15:28:47 -08:00
parent 1f672e1d73
commit 09e1ee0ae2
6 changed files with 24 additions and 6 deletions

View file

@ -324,6 +324,7 @@ void TerrainRenderer::render(const Camera& camera) {
// Set lighting
shader->setUniform("uLightDir", glm::vec3(lightDir[0], lightDir[1], lightDir[2]));
shader->setUniform("uLightColor", glm::vec3(lightColor[0], lightColor[1], lightColor[2]));
shader->setUniform("uSpecularIntensity", 0.5f);
shader->setUniform("uAmbientColor", glm::vec3(ambientColor[0], ambientColor[1], ambientColor[2]));
// Set camera position