-
Notifications
You must be signed in to change notification settings - Fork 4
Description
RendererFadeAnimation only really works with some standard shaders and built in components. I think we need a more abstract set of animations for material/shader properties.
My suggestions are
FloatShaderPropertyAnimation(Renderer renderer, string propertyName, float from, float to, etc....)ColorShaderPropertyAnimation(Renderer renderer, string propertyName, Color from, Color to, etc....)
The issue we may face is that a Renderer can have multiple materials. We can default to the material 0, and have overloads to pass in specific materials (or material index). We have to keep the render thorugh because we need a TargetObject (GameObject) for all animations. It may get to the point of loads of parameters.
There are also instances where we may want to allow control over whether we are changing the instanced material or the shared material.... Change colour of material for every object that has it. In that case it doesn't make sense to have a TargetObject though.