47 lines
1.7 KiB
C#
47 lines
1.7 KiB
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using System.Text.RegularExpressions;
|
|
using System.Text;
|
|
using Godot;
|
|
|
|
namespace Rokojori
|
|
{
|
|
public class ScanGradient
|
|
{
|
|
public static readonly CachedResource<Shader> shader = new CachedResource<Shader>(
|
|
"res://addons/rokojori_action_library/Runtime/Shading/Shaders/Effects/ScanGradient/ScanGradient.gdshader"
|
|
);
|
|
|
|
public static readonly ColorPropertyName albedo = ColorPropertyName.Create( "albedo" );
|
|
public static readonly Texture2DPropertyName textureAlbedo = Texture2DPropertyName.Create( "texture_albedo" );
|
|
public static readonly FloatPropertyName grow = FloatPropertyName.Create( "grow" );
|
|
public static readonly FloatPropertyName offset = FloatPropertyName.Create( "offset" );
|
|
|
|
}
|
|
|
|
public partial class ScanGradientMaterial:CustomMaterial
|
|
{
|
|
public static readonly CachedResource<ScanGradientMaterial> White = CustomMaterial.Cached<ScanGradientMaterial>(
|
|
"res://addons/rokojori_action_library/Runtime/Shading/Shaders/Effects/ScanGradient/ScanGradient White.material"
|
|
);
|
|
|
|
public readonly CustomMaterialProperty<Color> albedo;
|
|
public readonly CustomMaterialProperty<Texture2D> textureAlbedo;
|
|
public readonly CustomMaterialProperty<float> grow;
|
|
|
|
public readonly CustomMaterialProperty<float> offset;
|
|
|
|
public ScanGradientMaterial()
|
|
{
|
|
Shader = ScanGradient.shader.Get();
|
|
|
|
albedo = new CustomMaterialProperty<Color>( this, ScanGradient.albedo );
|
|
textureAlbedo = new CustomMaterialProperty<Texture2D>( this, ScanGradient.textureAlbedo );
|
|
grow = new CustomMaterialProperty<float>( this, ScanGradient.grow );
|
|
|
|
offset = new CustomMaterialProperty<float>( this, ScanGradient.offset );
|
|
}
|
|
|
|
}
|
|
|
|
} |