Skip to content

armgit / godot

Public Imported from GitHub
0

Godot Engine – Multi-platform 2D and 3D game engine

GLES3: Fix swapped binormal and tangent in light computations

BlueCube3310c138c019a51b
diff --git a/drivers/gles3/shaders/scene.glsl b/drivers/gles3/shaders/scene.glsl
index b885f33b20f..37a287123b7 100644
--- a/drivers/gles3/shaders/scene.glsl
+++ b/drivers/gles3/shaders/scene.glsl
@@ -2886,8 +2886,7 @@ void main() {
clearcoat, clearcoat_roughness, geo_normal,
#endif // LIGHT_CLEARCOAT_USED
#ifdef LIGHT_ANISOTROPY_USED
- tangent,
- binormal, anisotropy,
+ binormal, tangent, anisotropy,
#endif
diffuse_light, specular_light);
}
@@ -2911,8 +2910,7 @@ void main() {
clearcoat, clearcoat_roughness, geo_normal,
#endif // LIGHT_CLEARCOAT_USED
#ifdef LIGHT_ANISOTROPY_USED
- tangent,
- binormal, anisotropy,
+ binormal, tangent, anisotropy,
#endif
diffuse_light, specular_light);
}
@@ -3247,8 +3245,7 @@ void main() {
clearcoat, clearcoat_roughness, geo_normal,
#endif // LIGHT_RIM_USED
#ifdef LIGHT_ANISOTROPY_USED
- tangent,
- binormal, anisotropy,
+ binormal, tangent, anisotropy,
#endif
diffuse_light, specular_light);
#else