Hi, sorry to trouble everyone again.
I'm trying to figure out the best way of setting shader constants on a per-scene-node basis, rather than just per material. I searched and found http://irrlicht.sourceforge.net/forum/v ... el#p251239 but that topic seemed to dribble off without the question being answered. Is there currently a way to specify shader constants/uniforms that should be set on a per-model basis? Or some other callback somewhere when a node is rendered that will let me specify shader constants?
Setting shader constants per-scene node
Re: Setting shader constants per-scene node
Not possible, as far as I know.
The workarounds are one material per node, or drawing the needed nodes separately instead of by the scene manager.
The workarounds are one material per node, or drawing the needed nodes separately instead of by the scene manager.
Re: Setting shader constants per-scene node
It can be done using a Lighting Manager. The lighting manager performs routines on a per node basis, so if you need something executed prior to a rendering, you can do it using a Lighting Manager. Then, in the shader constants set callbacks, you can react to anything done in the lighting manager.
"There is nothing truly useless, it always serves as a bad example". Arthur A. Schmitt
Re: Setting shader constants per-scene node
Yeah, it looks like I can make the LightManager work, with a little bit of work. I guess I just sort of automatically passed over the LightManager interface in my search, since what I'm trying to do isn't necessarily lighting-related. Thank you.