You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The shader does not show any error within godot, however when I tried to run the project, I see this:
E 0:00:01:0437 _compile_variant: Failed parse:
WARNING: 0:81: '' : all default precisions are highp; use precision statements to quiet warning, e.g.:
"precision mediump int; precision highp float;"
ERROR: 0:2342: 'model_normal_matrix' : undeclared identifier
ERROR: 0:2342: '' : compilation terminated
ERROR: 2 compilation errors. No code generated.
<C++ Source> servers/rendering/renderer_rd/shader_rd.cpp:294 @ _compile_variant()
(As an aside, the value I actually wanted was MODELVIEW_NORMAL_MATRIX which is not documented to be supported in fragment shaders at all.)
Steps to reproduce
Make a 3D fragment shader that uses MODEL_NORMAL_MATRIX and try to run the project that uses the shader.
Actual: Godot gives the above error. Observe that the shader editor does not show any error. Also observe that the documentation says that this should work.
Expected: The feedback from the shader editor, the documentation and the actual behavior should all match.
Godot version
4.2
System information
Godot v4.2.stable.mono - Windows 10.0.22621 - Vulkan (Forward+) - dedicated AMD Radeon RX 6600 XT (Advanced Micro Devices, Inc.; 31.0.22011.4008) - AMD Ryzen 9 5900 12-Core Processor (24 Threads)
Issue description
I wrote a 3D fragment shader using MODEL_NORMAL_MATRIX, which is documented as one of the builtins available in fragment shaders.
(https://docs.godotengine.org/en/stable/tutorials/shaders/shader_reference/spatial_shader.html#fragment-built-ins)
The shader does not show any error within godot, however when I tried to run the project, I see this:
(As an aside, the value I actually wanted was MODELVIEW_NORMAL_MATRIX which is not documented to be supported in fragment shaders at all.)
Steps to reproduce
Make a 3D fragment shader that uses MODEL_NORMAL_MATRIX and try to run the project that uses the shader.
Actual: Godot gives the above error. Observe that the shader editor does not show any error. Also observe that the documentation says that this should work.
Expected: The feedback from the shader editor, the documentation and the actual behavior should all match.
Minimal reproduction project
model-normal-matrix-demo-project.zip
The text was updated successfully, but these errors were encountered: