mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-21 19:51:27 +00:00
Fix model normals being distorted by MODELDEF scaling.
This commit is contained in:
parent
a02654339b
commit
fd07183585
1 changed files with 2 additions and 2 deletions
|
@ -80,13 +80,13 @@ void main()
|
||||||
|
|
||||||
#ifdef HAS_UNIFORM_VERTEX_DATA
|
#ifdef HAS_UNIFORM_VERTEX_DATA
|
||||||
if ((useVertexData & 2) == 0)
|
if ((useVertexData & 2) == 0)
|
||||||
vWorldNormal = NormalModelMatrix * vec4(uVertexNormal.xyz, 1.0);
|
vWorldNormal = NormalModelMatrix * vec4(normalize(uVertexNormal.xyz), 1.0);
|
||||||
else
|
else
|
||||||
vWorldNormal = NormalModelMatrix * vec4(normalize(mix(aNormal.xyz, aNormal2.xyz, uInterpolationFactor)), 1.0);
|
vWorldNormal = NormalModelMatrix * vec4(normalize(mix(aNormal.xyz, aNormal2.xyz, uInterpolationFactor)), 1.0);
|
||||||
#else
|
#else
|
||||||
vWorldNormal = NormalModelMatrix * vec4(normalize(mix(aNormal.xyz, aNormal2.xyz, uInterpolationFactor)), 1.0);
|
vWorldNormal = NormalModelMatrix * vec4(normalize(mix(aNormal.xyz, aNormal2.xyz, uInterpolationFactor)), 1.0);
|
||||||
#endif
|
#endif
|
||||||
vEyeNormal = NormalViewMatrix * vWorldNormal;
|
vEyeNormal = NormalViewMatrix * vec4(normalize(vWorldNormal.xyz), 1.0);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef SPHEREMAP
|
#ifdef SPHEREMAP
|
||||||
|
|
Loading…
Reference in a new issue