Skip to content

Instantly share code, notes, and snippets.

@aleiby
aleiby / main.gd
Created April 8, 2026 01:31
MRP for Godot bug: Texture2DRD reassignment in CompositorEffect callback invalidates material uniform sets, fires 'Uniforms were never supplied for set (3)'
extends Node3D
# Minimal reproduction for "Uniforms were never supplied for set (3)".
#
# Required ingredients (verified by elimination):
# 1. A global uniform sampler2D declared in project.godot
# 2. A Texture2DRD wrapping an RD texture, published as the global's value
# via RenderingServer.global_shader_parameter_set
# 3. A CompositorEffect whose _render_callback reassigns that wrapper's
# texture_rd_rid (which internally calls TextureStorage::texture_replace,