From 708222bb9a185606e71de2d68d558001b9a32132 Mon Sep 17 00:00:00 2001 From: Bastiaan Olij Date: Wed, 31 Aug 2022 16:35:54 +1000 Subject: Fix vector type for signed tangent in mobile shader --- servers/rendering/renderer_rd/shaders/scene_forward_mobile.glsl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'servers/rendering/renderer_rd') 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); -- cgit v1.2.3