Closed as duplicate of#107590
Closed as duplicate of#107590
Description
Tested versions
- Reproducible in: v4.5.beta1.mono.official [46c495c]
- Not Reproducible (working fine) in:
System information
Godot v4.5.dev5.mono - macOS Sequoia (15.5.0) - Multi-window, 2 monitors - Vulkan (Forward+) - integrated Apple M3 Max - Apple M3 Max (14 threads)
Issue description
gdshader cannot compile after switching to v4.5 beta 1.
I am trying to access NORMAL
in light()
function.
For now the better way might be passing NORMAL
by using varying
.
Steps to reproduce
- create a gdshader file
- access
NORMAL
in the gdshaderlight()
function:
shader_type spatial;
varying vec3 normal;
void vertex() {
// Called for every vertex the material is visible on.
}
void fragment() {
// Called for every pixel the material is visible on.
ALBEDO = vec3(1.0, 1.0 ,1.0);
float test = dot(ALBEDO, vec3(1.0, 1.0 ,1.0));
normal = NORMAL;
}
void light() {
//// Called for every pixel for every light affecting the material.
//// Uncomment to replace the default light processing function with this one.
//float test_var;
//
//float test = dot(normal, vec3(1.0, 1.0 ,1.0));
//float test = dot(NORMAL, vec3(1.0, 1.0 ,1.0));
//float test = dot(LIGHT, vec3(1.0, 1.0, 1.0));
vec3 test = NORMAL;
}
Minimal reproduction project (MRP)
Error log also attached: