Files
Cielonos/Assets/Shaders/ScriptablePostProcessor/InternalShaderHelpers.cs
SoulliesOfficial ef7b479712 initial
2025-11-25 08:19:33 -05:00

44 lines
2.3 KiB
C#

using UnityEngine;
using UnityEngine.Rendering;
namespace Echovoid.Runtime.Behavior.Rendering
{
public static class InternalShaderHelpers
{
public const string RGBSplitGlitchShader = "Hidden/Custom/RGBSplitGlitch";
public const string RadialBlurShader = "Hidden/Custom/RadialBlur";
public const string SpeedLinesShader = "Mirza/Anime Speed Lines";
public static Material GenerateTransientMaterial(string shaderName)
{
var shader = Shader.Find(shaderName);
return CoreUtils.CreateEngineMaterial(shader);
}
public static class ID
{
// RGB Split Glitch
public static readonly int _RGBSplitGlitchParams = Shader.PropertyToID("_RGBSplitGlitchParams");
public static readonly int _RGBSplitGlitchIntensity = Shader.PropertyToID("_RGBSplitGlitchIntensity");
// Radial Blur
public static readonly int _RadialBlurParams = Shader.PropertyToID("_RadialBlurParams");
public static readonly int _BlurRadius = Shader.PropertyToID("_BlurRadius");
public static readonly int _RadialCenterX = Shader.PropertyToID("_RadialCenterX");
public static readonly int _RadialCenterY = Shader.PropertyToID("_RadialCenterY");
// Speed Lines
// --- 新增的 Speed Lines ID ---
// 这些名字必须与原 Shader 属性和 HLSL 变量名完全一致
public static readonly int _SpeedLinesColour = Shader.PropertyToID("_Colour");
public static readonly int _SpeedLinesTiling = Shader.PropertyToID("_SpeedLinesTiling");
public static readonly int _SpeedLinesRadialScale = Shader.PropertyToID("_SpeedLinesRadialScale");
public static readonly int _SpeedLinesPower = Shader.PropertyToID("_SpeedLinesPower");
public static readonly int _SpeedLinesRemap = Shader.PropertyToID("_SpeedLinesRemap");
public static readonly int _SpeedLinesAnimation = Shader.PropertyToID("_SpeedLinesAnimation");
public static readonly int _MaskScale = Shader.PropertyToID("_MaskScale");
public static readonly int _MaskHardness = Shader.PropertyToID("_MaskHardness");
public static readonly int _MaskPower = Shader.PropertyToID("_MaskPower");
}
}
}