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
Editor uses 100% cpu and hangs on compilation of a shader. This happens as soon as the builtin INV_PROJECTION_MATRIX is added to the code. The only useful logs i could get which may or may not be related is:
INV_PROJECTION_MATRIX is renamed to inv_projection_matrix by Godot's shader compiler. But the fragment shader only has access to scene_data.inv_projection_matrix so we need to define inv_projection_matrix somewhere above the user's fragment shader code.
Godot version
4.0 dev 35eec4d
System information
popOS! (Ubuntu), RTX2060, Vulkan
Issue description
Editor uses 100% cpu and hangs on compilation of a shader. This happens as soon as the builtin INV_PROJECTION_MATRIX is added to the code. The only useful logs i could get which may or may not be related is:
at: _compile_variant (servers/rendering/renderer_rd/shader_rd.cpp:280)
ERROR: Error compiling Fragment shader, variant #7 (
#define MODE_MULTIPLE_RENDER_TARGETS
).
at: _compile_variant (servers/rendering/renderer_rd/shader_rd.cpp:276)
ERROR: Failed parse:
WARNING: 0:72: '' : all default precisions are highp; use precision statements to quiet warning, e.g.:
"precision mediump int; precision highp float;"
ERROR: 0:2054: 'inv_projection_matrix' : undeclared identifier
ERROR: 0:2054: '' : compilation terminated
ERROR: 2 compilation errors. No code generated.
at: _compile_variant (servers/rendering/renderer_rd/shader_rd.cpp:277)
ERROR: code:
Steps to reproduce
create new project, add new shader resource and start writing - using INV_PROJECTION_MATRIX.
tested with:
void fragment(){
float depth = texture(DEPTH_TEXTURE, SCREEN_UV).x;
vec3 ndc = vec3(SCREEN_UV * 2.0 - 1.0, depth);
vec4 view = INV_PROJECTION_MATRIX * vec4(ndc, 1.0);
}
Minimal reproduction project
No response
The text was updated successfully, but these errors were encountered: