What causes the ERROR: Uniforms supplied for set (0)?

Godot Version

4.5

Question

I am looking at https://www.youtube.com/watch?v=tnCUzDhBGB0 and found its github at GitHub - 2Retr0/GodotOceanWaves: FFT-based ocean-wave rendering, implemented in Godot

As the video was posted back in 2024, it was Godot 4.3, but right now, I tried to open the project on github link above with Godot 4.5, and I got this error being thrown non-stop flooded the Godot’s text console:

ERROR: Uniforms supplied for set (0):
Set: 0 Binding: 0 Type: Image Writable: Y Length: 1
are not the same format as required by the pipeline shader. Pipeline shader requires the following bindings:
Set: 0 Binding: 0 Type: Image Writable: N Length: 1
Set: 1 Binding: 0 Type: StorageBuffer Writable: Y Length: 0
   at: (servers/rendering/rendering_device.cpp:5313)
   GDScript backtrace (most recent call first):
       [0] <anonymous lambda> (res://assets/render_context.gd:118)
       [1] _update (res://assets/water/wave_generator.gd:73)
       [2] _process (res://assets/water/wave_generator.gd:62)

I don’t understand the meaning of this error, so any help is appreciated.

Would this need just a simple fix or does this require a thorough checkup?

PS. the reason I posted here is because the github link has not been updated for a long while now, so I think the author might not be back to it anymore.

1 Like

Hi, I also had this error with some code after upgrading to 4.5.

From what I can see, the error occurs because uniform set is created with the set id of a writeable uniform in the shader, and is then it is assigned to a set that is readonly.

I am guessing that pre 4.5 it was possible to assign a writeable uniform to a readonly one.

I was able to workaround this by removing the readonly requirement from my uniform set in the shader.

Hope this helps.