2025-01-18 20:02:20 +00:00
|
|
|
using Godot;
|
|
|
|
|
|
|
|
namespace Rokojori
|
|
|
|
{
|
|
|
|
public class Outline
|
|
|
|
{
|
|
|
|
public static readonly CachedResource<Shader> shader = new CachedResource<Shader>(
|
|
|
|
"res://addons/rokojori_action_library/Runtime/Shading/Shaders/Effects/Outline/Outline.gdshader"
|
|
|
|
);
|
|
|
|
|
|
|
|
public static readonly ColorPropertyName albedo = ColorPropertyName.Create( "albedo" );
|
|
|
|
public static readonly FloatPropertyName size = FloatPropertyName.Create( "size" );
|
|
|
|
public static readonly FloatPropertyName sizeCloseScale = FloatPropertyName.Create( "sizeCloseScale" );
|
|
|
|
public static readonly FloatPropertyName sizeFarScale = FloatPropertyName.Create( "sizeFarScale" );
|
|
|
|
public static readonly FloatPropertyName closeDistance = FloatPropertyName.Create( "closeDistance" );
|
|
|
|
public static readonly FloatPropertyName farDistance = FloatPropertyName.Create( "farDistance" );
|
2025-01-19 20:35:51 +00:00
|
|
|
public static readonly FloatPropertyName opacityModulationStrength = FloatPropertyName.Create( "opacityModulationStrength" );
|
|
|
|
public static readonly FloatPropertyName opacityModulationDuration = FloatPropertyName.Create( "opacityModulationDuration" );
|
|
|
|
public static readonly FloatPropertyName opacityModulationOffset = FloatPropertyName.Create( "opacityModulationOffset" );
|
2025-01-18 20:02:20 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
public partial class OutlineMaterial:CustomMaterial
|
|
|
|
{
|
|
|
|
public static readonly CachedResource<OutlineMaterial> BoldYellow = CustomMaterial.Cached<OutlineMaterial>(
|
|
|
|
"res://addons/rokojori_action_library/Runtime/Shading/Shaders/Effects/Outline/Outline Bold Yellow.material"
|
|
|
|
);
|
|
|
|
public static readonly CachedResource<OutlineMaterial> ThinWhite = CustomMaterial.Cached<OutlineMaterial>(
|
|
|
|
"res://addons/rokojori_action_library/Runtime/Shading/Shaders/Effects/Outline/Outline Thin White.material"
|
|
|
|
);
|
|
|
|
|
|
|
|
public readonly CustomMaterialProperty<Color> albedo;
|
|
|
|
public readonly CustomMaterialProperty<float> size;
|
|
|
|
public readonly CustomMaterialProperty<float> sizeCloseScale;
|
|
|
|
public readonly CustomMaterialProperty<float> sizeFarScale;
|
|
|
|
public readonly CustomMaterialProperty<float> closeDistance;
|
|
|
|
public readonly CustomMaterialProperty<float> farDistance;
|
2025-01-19 20:35:51 +00:00
|
|
|
public readonly CustomMaterialProperty<float> opacityModulationStrength;
|
|
|
|
public readonly CustomMaterialProperty<float> opacityModulationDuration;
|
|
|
|
public readonly CustomMaterialProperty<float> opacityModulationOffset;
|
2025-01-18 20:02:20 +00:00
|
|
|
|
|
|
|
public OutlineMaterial()
|
|
|
|
{
|
|
|
|
Shader = Outline.shader.Get();
|
|
|
|
|
|
|
|
albedo = new CustomMaterialProperty<Color>( this, Outline.albedo );
|
|
|
|
size = new CustomMaterialProperty<float>( this, Outline.size );
|
|
|
|
sizeCloseScale = new CustomMaterialProperty<float>( this, Outline.sizeCloseScale );
|
|
|
|
sizeFarScale = new CustomMaterialProperty<float>( this, Outline.sizeFarScale );
|
|
|
|
closeDistance = new CustomMaterialProperty<float>( this, Outline.closeDistance );
|
|
|
|
farDistance = new CustomMaterialProperty<float>( this, Outline.farDistance );
|
2025-01-19 20:35:51 +00:00
|
|
|
opacityModulationStrength = new CustomMaterialProperty<float>( this, Outline.opacityModulationStrength );
|
|
|
|
opacityModulationDuration = new CustomMaterialProperty<float>( this, Outline.opacityModulationDuration );
|
|
|
|
opacityModulationOffset = new CustomMaterialProperty<float>( this, Outline.opacityModulationOffset );
|
2025-01-18 20:02:20 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|