mirror of https://github.com/godotengine/godot
When the same uniform set is bound multiple times within a render pass (e.g., OPAQUE pass then ALPHA pass with different instance buffers), the dynamic offset bits were being OR'd together, corrupting the packed frame indices. For example, if OPAQUE binds set 1 with frame_idx=1 (0x10) and ALPHA binds set 1 with frame_idx=2 (0x20), the OR produces 0x30 instead of the correct 0x20, causing the shader to read from the wrong buffer offset. This fix clears the relevant bits for each set being bound before OR'ing the new values, ensuring only the latest frame indices are used. Fixes rendering artifacts in the mobile renderer which uses two dynamic uniforms (uniform buffer + storage buffer) in set 1, unlike the clustered renderer which only has one. |
||
|---|---|---|
| .. | ||
| accesskit | ||
| alsa | ||
| alsamidi | ||
| apple | ||
| apple_embedded | ||
| backtrace | ||
| coreaudio | ||
| coremidi | ||
| d3d12 | ||
| egl | ||
| gl_context | ||
| gles3 | ||
| metal | ||
| png | ||
| pulseaudio | ||
| sdl | ||
| unix | ||
| vulkan | ||
| wasapi | ||
| windows | ||
| winmidi | ||
| xaudio2 | ||
| SCsub | ||
| register_driver_types.cpp | ||
| register_driver_types.h | ||