mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-03 00:03:50 +00:00
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:
parent
1f672e1d73
commit
09e1ee0ae2
6 changed files with 24 additions and 6 deletions
|
|
@ -32,6 +32,9 @@ uniform vec3 uAmbientColor;
|
|||
// Camera
|
||||
uniform vec3 uViewPos;
|
||||
|
||||
// HDR specular
|
||||
uniform float uSpecularIntensity;
|
||||
|
||||
// Fog
|
||||
uniform vec3 uFogColor;
|
||||
uniform float uFogStart;
|
||||
|
|
@ -79,7 +82,7 @@ void main() {
|
|||
vec3 viewDir = normalize(uViewPos - FragPos);
|
||||
vec3 halfwayDir = normalize(lightDir + viewDir);
|
||||
float spec = pow(max(dot(norm, halfwayDir), 0.0), 32.0);
|
||||
vec3 specular = spec * uLightColor * 0.1;
|
||||
vec3 specular = spec * uLightColor * uSpecularIntensity;
|
||||
|
||||
// Combine lighting
|
||||
vec3 result = ambient + diffuse + specular;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue