Hey guys, suppose I have a lot of objects using the same material. I’d like to do some sort of effect to one of them, without changing the others. Maybe change the material, or maybe just use the same material but with some different properties, etc.
There’s tons of options here, and I’d like to know what you’d recommend.
1, On each object I could have two materials A,B, and by default only A is turned on. When I want to do some effect on a specific object, I could turn off A on it, turn on B, and play around with. I’m not sure how efficient something like this is - turning materials on/off often, etc. It’s also messy, but it might be the fastest way for me, and it could be easy for prototyping.
2, Maybe I could somehow change certain parameters of the object (just by normal scripting), and let the shader somehow notice it. Clearly shaders can somehow figure out things like normals, vertex positions etc, so if I could change some variable, the shader could notice this and act accordingly.
3, Just use a replacement shader. This seems pretty much equivalent to 2, but again, I’ll need 2 shaders, and it seems a bit less elegant. Should be efficient though.
I’m sure there’s other methods and I’d appreciate any recommendations.