rj-action-library/Runtime/Rendering/AssignedShaderProperty.cs

37 lines
637 B
C#
Raw Normal View History

2025-10-24 11:38:51 +00:00
using System.Diagnostics;
using System.Collections;
using System.Collections.Generic;
using System;
using Godot;
namespace Rokojori
{
public class AssignedShaderProperty
{
public ShaderProperty property;
public Variant value;
public static AssignedShaderProperty From( ShaderProperty sp )
{
var asp = new AssignedShaderProperty();
asp.property = sp;
return asp;
}
public void Update()
{
if ( (object)value == (object)property.GetValue() )
{
return;
}
property.ApplyGlobal();
value = property.GetValue();
}
}
}