36 lines
1.3 KiB
C#
36 lines
1.3 KiB
C#
![]() |
using Godot;
|
||
|
|
||
|
namespace Rokojori
|
||
|
{
|
||
|
public class Overlay
|
||
|
{
|
||
|
public static readonly CachedResource<Shader> shader = new CachedResource<Shader>(
|
||
|
"res://addons/rokojori_action_library/Runtime/Shading/Shaders/Effects/Overlay/Overlay.gdshader"
|
||
|
);
|
||
|
|
||
|
public static readonly ColorPropertyName albedo = ColorPropertyName.Create( "albedo" );
|
||
|
public static readonly FloatPropertyName opacityModulationStrength = FloatPropertyName.Create( "opacityModulationStrength" );
|
||
|
public static readonly FloatPropertyName opacityModulationDuration = FloatPropertyName.Create( "opacityModulationDuration" );
|
||
|
|
||
|
}
|
||
|
|
||
|
public partial class OverlayMaterial:CustomMaterial
|
||
|
{
|
||
|
|
||
|
|
||
|
public readonly CustomMaterialProperty<Color> albedo;
|
||
|
public readonly CustomMaterialProperty<float> opacityModulationStrength;
|
||
|
public readonly CustomMaterialProperty<float> opacityModulationDuration;
|
||
|
|
||
|
public OverlayMaterial()
|
||
|
{
|
||
|
Shader = Overlay.shader.Get();
|
||
|
|
||
|
albedo = new CustomMaterialProperty<Color>( this, Overlay.albedo );
|
||
|
opacityModulationStrength = new CustomMaterialProperty<float>( this, Overlay.opacityModulationStrength );
|
||
|
opacityModulationDuration = new CustomMaterialProperty<float>( this, Overlay.opacityModulationDuration );
|
||
|
}
|
||
|
|
||
|
}
|
||
|
|
||
|
}
|