mirror of
https://github.com/godotengine/godot.git
synced 2025-01-30 21:33:18 +08:00
Normalize normal tangent and binormal before interpolating in the mobile renderer to avoid precision errors on heavily scaled meshes (backport for 4.3)
This commit is contained in:
parent
711c725cf1
commit
4cb41925b9
@ -439,12 +439,12 @@ void main() {
|
|||||||
|
|
||||||
vertex_interp = vertex;
|
vertex_interp = vertex;
|
||||||
#ifdef NORMAL_USED
|
#ifdef NORMAL_USED
|
||||||
normal_interp = normal;
|
normal_interp = normalize(normal);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(TANGENT_USED) || defined(NORMAL_MAP_USED) || defined(LIGHT_ANISOTROPY_USED)
|
#if defined(TANGENT_USED) || defined(NORMAL_MAP_USED) || defined(LIGHT_ANISOTROPY_USED)
|
||||||
tangent_interp = tangent;
|
tangent_interp = normalize(tangent);
|
||||||
binormal_interp = binormal;
|
binormal_interp = normalize(binormal);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef MODE_RENDER_DEPTH
|
#ifdef MODE_RENDER_DEPTH
|
||||||
|
Loading…
Reference in New Issue
Block a user