Merge pull request #99411 from clayjohn/mobile-normal-interp-43

[4.3] Normalize normal tangent and binormal before interpolating in the mobile renderer to avoid precision errors on heavily scaled meshes
This commit is contained in:
Rémi Verschelde
2025-01-30 12:52:52 +01:00

View File

@ -439,12 +439,12 @@ void main() {
vertex_interp = vertex;
#ifdef NORMAL_USED
normal_interp = normal;
normal_interp = normalize(normal);
#endif
#if defined(TANGENT_USED) || defined(NORMAL_MAP_USED) || defined(LIGHT_ANISOTROPY_USED)
tangent_interp = tangent;
binormal_interp = binormal;
tangent_interp = normalize(tangent);
binormal_interp = normalize(binormal);
#endif
#ifdef MODE_RENDER_DEPTH