Hello,
Right now to handle objects fading in/out with transparency I clone the datablock, affect it to the object and update the datablock's colour every frame until fading is complete, this works well but I don't think it's really fancy.
In the same time I'd like to learn more about HLMS so I digged into it. I found how to add properties per renderable to customize the shader code (HlmsPbs::calculateHashForPreCreate), how to add custom values to datablocks (HlmsListener::getPassBufferSize and HlmsListener::preparePassBuffer) but how can I customize what is sent to the shader per renderable?
I'm looking for something like ACT_CUSTOM from Ogre 1 where we can retrieve in the shader a customParameter set on a Renderable.
I believe it could be achieved with Hlms::fillBuffersFor, but it gets really complicated at this point, between commandbuffer, texbuffer, constbuffer, etc..
Doing that in Ogre 1 was fairly quick, so did I dig too much in HLMS and missed something obvious in the way? How would you achieve such effect otherwise? Thanks.