Closed as duplicate of#107590
Closed as duplicate of#107590
Description
Tested versions
Reproducible in v4.5.beta1.official [46c495c]
Not Reproducible in v4.5-dev5 or earlier
System information
Godot v4.5.beta1 - Fedora Linux 42 (KDE Plasma Desktop Edition) on Wayland - X11 display driver, Multi-window, 3 monitors - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 3080 Ti (nvidia; 575.57.08) - Intel(R) Core(TM) i7-10700K CPU @ 3.80GHz (16 threads) - 31.22 GiB memory
Issue description
Whenever I try accessing the NORMAL built-in value in the light() function of a shader, the shader compilation fails.
It works perfectly fine if I store the NORMAL from the fragment() function as a varying and use said varying in the light() function.
Steps to reproduce
- Open a new project
- Create a ShaderMaterial
- Create a new .gdshader file for the ShaderMaterial
- Put the line "DIFFUSE_LIGHT = NORMAL;" in the light() function of the shader
- Apply the ShaderMaterial to a mesh or look at the preview in the inspector
When I do this, the engine freezes for a minute or two and the shader compilation fails.
Minimal reproduction project (MRP)
N/A