When we call a method like shader.uniform_float("color", (1,1,1,1)),
we expect the shader's uniform to be updated regardless of whether the
shader is bound or not.
This is error proof.
Differential D15929
PyGPU: Automatically bind the shader in GPUShader.uniform_ methods Authored by Germano Cavalcante (mano-wii) on Sep 10 2022, 4:02 PM. Tags None Subscribers None
Details When we call a method like shader.uniform_float("color", (1,1,1,1)), This is error proof.
Diff Detail
Event TimelineComment Actions I think this is ok. All uniform functions are called from the shaders. On vulkan and metal backend the shader binding should even become optionnal. The only thing to make sure is that the shader binding is also inside the batch.draw() method. |