-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
- using a static variable will automatically include it as a shader uniform
example:
class Shader : CanvasShader
{
public float time;
public override ColorF GetPixelColor(Vector2 position)
{
return new ColorF(float.Sin(time), 0, 0, 1);
}
}
// time would have to be set before the shader is usedwould become:
class Shader : CanvasShader
{
public override ColorF GetPixelColor(Vector2 position)
{
return new ColorF(float.Sin(Time.TotalTime), 0, 0, 1);
}
}Metadata
Metadata
Assignees
Labels
No labels