Figured out what I was missing:
onBind(gameObject: GameObjects.GameObject) {
super.onBind();
const data = gameObject.pipelineData;
this.set1f('uDyePaletteIndex', data.dyeIndex);
}
onBatch (gameObject: GameObjects.GameObject) {
if (gameObject) {
this.flush();
}
}
onBind is called on every game object that contains the pipeline and this is where you set your per object variables.
and then calling flush during onBatch does something, but makes it work.
You can just do everything in onBind, but the examples separate the two, not sure why.