diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2022-08-31 09:12:31 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-31 09:12:31 +0200 |
commit | c40855f8189e603bdadca8d32fa7988a249ed96b (patch) | |
tree | 8208d48aa25b7ff2ac4958237cfc28055530f971 /servers/rendering/renderer_rd/shaders | |
parent | c80ea41e3bb49d9198c69e297c67ad0f9d38bb86 (diff) | |
parent | 708222bb9a185606e71de2d68d558001b9a32132 (diff) |
Merge pull request #65130 from BastiaanOlij/fix_mobile_signed_tangent
Fix vector type for signed tangent in mobile shader
Diffstat (limited to 'servers/rendering/renderer_rd/shaders')
-rw-r--r-- | servers/rendering/renderer_rd/shaders/scene_forward_mobile.glsl | 2 |
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); |