mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-09-22 11:23:27 -04:00
disable sun specular underwater
This commit is contained in:
parent
0c95d62e89
commit
5f22732876
@ -171,6 +171,10 @@ void main(void)
|
|||||||
float specular = pow(atan(phongTerm * SPEC_MAGIC), SPEC_HARDNESS) * SPEC_BRIGHTNESS;
|
float specular = pow(atan(phongTerm * SPEC_MAGIC), SPEC_HARDNESS) * SPEC_BRIGHTNESS;
|
||||||
specular = clamp(specular, 0.0, 1.0) * shadow * sunSpec.a;
|
specular = clamp(specular, 0.0, 1.0) * shadow * sunSpec.a;
|
||||||
|
|
||||||
|
// disable sun specular when underwater
|
||||||
|
if (cameraPos.z < 0.0)
|
||||||
|
specular = 0.0;
|
||||||
|
|
||||||
// artificial specularity to make rain ripples more noticeable
|
// artificial specularity to make rain ripples more noticeable
|
||||||
vec3 skyColorEstimate = vec3(max(0.0, mix(-0.3, 1.0, sunFade)));
|
vec3 skyColorEstimate = vec3(max(0.0, mix(-0.3, 1.0, sunFade)));
|
||||||
vec3 rainSpecular = abs(rainRipple.w)*mix(skyColorEstimate, vec3(1.0), 0.05)*0.5;
|
vec3 rainSpecular = abs(rainRipple.w)*mix(skyColorEstimate, vec3(1.0), 0.05)*0.5;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user