From ebfaa41b66959a88252e6c695e30294702037ea9 Mon Sep 17 00:00:00 2001 From: dawei-wang Date: Fri, 5 Apr 2024 13:18:47 -0700 Subject: [PATCH] Complete the example for "skip_vertex_transform" Fix godotengine/godot-docs#9108 (cherry picked from commit ec274eb46a4e766f4fa32278f03e71d6f761e76f) --- tutorials/shaders/shader_reference/spatial_shader.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tutorials/shaders/shader_reference/spatial_shader.rst b/tutorials/shaders/shader_reference/spatial_shader.rst index 9d1ea130e..8f2ac2b82 100644 --- a/tutorials/shaders/shader_reference/spatial_shader.rst +++ b/tutorials/shaders/shader_reference/spatial_shader.rst @@ -130,7 +130,8 @@ it manually with the following code: void vertex() { VERTEX = (MODELVIEW_MATRIX * vec4(VERTEX, 1.0)).xyz; NORMAL = normalize((MODELVIEW_MATRIX * vec4(NORMAL, 0.0)).xyz); - // same as above for binormal and tangent, if normal mapping is used + BINORMAL = normalize((MODELVIEW_MATRIX * vec4(BINORMAL, 0.0)).xyz); + TANGENT = normalize((MODELVIEW_MATRIX * vec4(TANGENT, 0.0)).xyz); } Other built-ins, such as UV, UV2 and COLOR, are also passed through to the fragment function if not modified.