Page MenuHome

PyGPU: Automatically bind the shader in GPUShader.uniform_ methods
ClosedPublic

Authored by Germano Cavalcante (mano-wii) on Sep 10 2022, 4:02 PM.

Details

Summary

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.

Diff Detail

Repository
rB Blender
Branch
master
Build Status
Buildable 23695
Build 23695: arc lint + arc unit

Event Timeline

Germano Cavalcante (mano-wii) requested review of this revision.Sep 10 2022, 4:02 PM
Germano Cavalcante (mano-wii) created this revision.

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.

This revision was not accepted when it landed; it landed in state Needs Review.Sep 19 2022, 2:40 PM
This revision was automatically updated to reflect the committed changes.