Skip to content

RendererFadeAnimation only supports material.color eg: "_Color" shader property #11

@kkjamie

Description

@kkjamie

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions