1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-03-30 09:06:43 +00:00

Merge pull request #2901 from Capostrophic/shaders

Minor shader fixes
This commit is contained in:
Chris Djali 2020-06-09 17:16:49 +01:00 committed by GitHub
commit 720700e957
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 3 deletions

View file

@ -49,7 +49,7 @@ uniform vec2 envMapLumaBias;
uniform mat2 bumpMapMatrix; uniform mat2 bumpMapMatrix;
#endif #endif
uniform bool simpleWater = false; uniform bool simpleWater;
varying float euclideanDepth; varying float euclideanDepth;
varying float linearDepth; varying float linearDepth;
@ -181,7 +181,8 @@ void main()
matSpec = passColor.xyz; matSpec = passColor.xyz;
#endif #endif
gl_FragData[0].xyz += getSpecular(normalize(viewNormal), normalize(passViewPos.xyz), shininess, matSpec) * shadowing; if (matSpec != vec3(0.0))
gl_FragData[0].xyz += getSpecular(normalize(viewNormal), normalize(passViewPos.xyz), shininess, matSpec) * shadowing;
#if @radialFog #if @radialFog
float depth = euclideanDepth; float depth = euclideanDepth;
// For the less detailed mesh of simple water we need to recalculate depth on per-pixel basis // For the less detailed mesh of simple water we need to recalculate depth on per-pixel basis

View file

@ -90,7 +90,8 @@ void main()
matSpec = passColor.xyz; matSpec = passColor.xyz;
#endif #endif
gl_FragData[0].xyz += getSpecular(normalize(viewNormal), normalize(passViewPos), shininess, matSpec) * shadowing; if (matSpec != vec3(0.0))
gl_FragData[0].xyz += getSpecular(normalize(viewNormal), normalize(passViewPos), shininess, matSpec) * shadowing;
#if @radialFog #if @radialFog
float fogValue = clamp((euclideanDepth - gl_Fog.start) * gl_Fog.scale, 0.0, 1.0); float fogValue = clamp((euclideanDepth - gl_Fog.start) * gl_Fog.scale, 0.0, 1.0);