How do I track down this error?

Godot Version

v4.3.stable.official [77dcf97d8]

Question

At some point my project started printing this error whenever I open the project. There is no indication of what part of my project is the origin of this. I think it might have something to GPU particles, but is not related to any shaders I’ve written as I’ve not written any custom shaders.

It doesn’t seem to cause anything from rendering or running incorrectly, so there’s no obvious place to look. Is there a way to track down what’s causing this?

Godot Engine v4.3.stable.official (c) 2007-present Juan Linietsky, Ariel Manzur & Godot Contributors.
  :9 - Unknown identifier in expression: 'VIEW'.
  Shader compilation failed.
  :14 - Unknown identifier in expression: 'VIEW'.
  Shader compilation failed.
  :15 - Unknown identifier in expression: 'VIEW'.
  Shader compilation failed.
--Main Shader--
    1 | shader_type canvas_item;
    2 | 
    3 | 
    4 | 
    5 |
    6 | void fragment() {
    7 | 
    8 |  float n_in3p3 = 1.00000;
E   9->  float n_out3p0 = pow(1.0 - clamp(dot(NORMAL, VIEW), 0.0, 1.0), n_in3p3);
   10 | 
   11 | 
   12 |  COLOR.rgb = vec3(n_out3p0);
   13 | }
   14 |

Change the shader type to spatial. VIEW isn’t defined in canvas_item.

Maybe try deleting your .godot/imported folder to re-import everything?

Looking at the variable names, you have a visual shader somewhere.

Did some further testing, I assumed the issue was that you used a fresnel node in visual shader (that dot pow blabla function is the fresnel node) and that there was some bug with the defaults using VIEW in a canvas shader.

After testing myself I couln’t manage to have the same behaviour: note how there is no VIEW used, only vec3(0.)

When you do find the shader, please file a bug report if it’s indeed a visual shader resource causing this. GitHub · Where software is built

1 Like

I forgot about that one. I opened a bug for it.