summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastiaan Olij <mux213@gmail.com>2022-08-31 16:35:54 +1000
committerBastiaan Olij <mux213@gmail.com>2022-08-31 16:35:54 +1000
commit708222bb9a185606e71de2d68d558001b9a32132 (patch)
tree1b1787d062cfe247794558434518ea5f75bf4660
parent8fa9d1ae467632daa5f12b278eb616fd580a94ec (diff)
Fix vector type for signed tangent in mobile shader
-rw-r--r--servers/rendering/renderer_rd/shaders/scene_forward_mobile.glsl2
1 files changed, 1 insertions, 1 deletions
diff --git a/servers/rendering/renderer_rd/shaders/scene_forward_mobile.glsl b/servers/rendering/renderer_rd/shaders/scene_forward_mobile.glsl
index 0960533917..0ffc72f78f 100644
--- a/servers/rendering/renderer_rd/shaders/scene_forward_mobile.glsl
+++ b/servers/rendering/renderer_rd/shaders/scene_forward_mobile.glsl
@@ -240,7 +240,7 @@ void main() {
#endif
#if defined(TANGENT_USED) || defined(NORMAL_MAP_USED) || defined(LIGHT_ANISOTROPY_USED)
- vec3 signed_tangent_attrib = tangent_attrib * 2.0 - 1.0;
+ vec2 signed_tangent_attrib = tangent_attrib * 2.0 - 1.0;
vec3 tangent = oct_to_vec3(vec2(signed_tangent_attrib.x, abs(signed_tangent_attrib.y) * 2.0 - 1.0));
float binormalf = sign(signed_tangent_attrib.y);
vec3 binormal = normalize(cross(normal, tangent) * binormalf);