Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Opening project/material using visual shader instance uniforms results in many errors failure to compile shaders #83431

Closed
lostminds opened this issue Oct 16, 2023 · 1 comment

Comments

@lostminds
Copy link

Godot version

v4.2.beta1.official [b137180]

System information

Godot v4.2.beta1 - macOS 13.6.0 - Vulkan (Mobile) - integrated Apple M2 Pro - Apple M2 Pro (10 Threads)

Issue description

It appears something has broken in compiling shaders (maybe visual shaders) using instance shader uniforms in the Mobile renderer. Opening a scene where one is used gives me the following errors:

servers/rendering/renderer_rd/forward_mobile/scene_shader_forward_mobile.cpp:183 - Condition "!shader_singleton->shader.version_is_valid(version)" is true.
  servers/rendering/renderer_rd/forward_mobile/scene_shader_forward_mobile.cpp:183 - Condition "!shader_singleton->shader.version_is_valid(version)" is true.
  servers/rendering/renderer_rd/shader_rd.cpp:293 - Error compiling Fragment shader, variant #2 (
  #define MODE_RENDER_DEPTH
  ).
  servers/rendering/renderer_rd/shader_rd.cpp:294 - Failed parse:
 WARNING: 0:73: '' : all default precisions are highp; use precision statements to quiet warning, e.g.:
           "precision mediump int; precision highp float;" 
  ERROR: 0:1763: 'instance_index' : undeclared identifier 
  ERROR: 0:1763: '[]' : scalar integer expression required 
  ERROR: 0:1763: '' : compilation terminated 
  ERROR: 3 compilation errors.  No code generated.

Followed by 27000+ error lines of what looks like complete printouts of some very long godot internal shaders like servers/rendering/renderer_rd/shader_rd.cpp

Screenshot 2023-10-16 at 11 37 21

Considering the number of shader compilation errors lines, perhaps it would be a good idea to limit the output of full shader code? As this probably does not contribute to making the issue easier to find and also slows down the interface a little in cases like this.

Steps to reproduce

Open the attached empty project with just a material referencing a visual shader.
If it's not selected already, select the material in the FileSystem browser to get the errors.

Minimal reproduction project

InstanceShaderTest.zip

@clayjohn
Copy link
Member

Duplicate of #83391

Fixed by #83400

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants