Files
Cielonos/Assets/Shaders/ScriptablePostProcessor/Base/InternalShaderHelpers.cs
SoulliesOfficial 33b1795c1f 更新
2026-01-03 18:19:39 -05:00

72 lines
4.3 KiB
C#

using UnityEngine;
using UnityEngine.Rendering;
namespace Echovoid.Runtime.Behavior.Rendering
{
public static class InternalShaderHelpers
{
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
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");
// --- Strobe Flash ---
public static readonly int _StrobeColorHigh = Shader.PropertyToID("_StrobeColorHigh");
public static readonly int _StrobeColorLow = Shader.PropertyToID("_StrobeColorLow");
public static readonly int _StrobeParams = Shader.PropertyToID("_StrobeParams");
public static readonly int _StrobeAdvParams = Shader.PropertyToID("_StrobeAdvParams");
public static readonly int _LuminanceWeights = Shader.PropertyToID("_LuminanceWeights");
// --- Sharpen ---
public static readonly int _SharpnessParams = Shader.PropertyToID("_SharpnessParams");
// --- Advanced Chromatic Aberration ---
public static readonly int _ACA_Params1 = Shader.PropertyToID("_ACA_Params1");
public static readonly int _ACA_Params2 = Shader.PropertyToID("_ACA_Params2");
public static readonly int _ACA_Split = Shader.PropertyToID("_ACA_Split");
public static readonly int _DispersionMap = Shader.PropertyToID("_DispersionMap");
// --- Advanced Vignette ---
public static readonly int _ColorInner = Shader.PropertyToID("_ColorInner");
public static readonly int _ColorOuter = Shader.PropertyToID("_ColorOuter");
public static readonly int _VignetteParams1 = Shader.PropertyToID("_VignetteParams1");
public static readonly int _VignetteCenter = Shader.PropertyToID("_VignetteCenter");
// --- Anime Bloom ---
public static readonly int _BloomParams = Shader.PropertyToID("_BloomParams");
public static readonly int _BloomTint = Shader.PropertyToID("_BloomTint");
public static readonly int _AnimeBloom_BlurRadius = Shader.PropertyToID("_BlurRadius");
public static readonly int _BloomTex = Shader.PropertyToID("_BloomTex");
// --- Anime ACES ---
public static readonly int _TonemapParams = Shader.PropertyToID("_TonemapParams");
public static readonly int _ACESCoeffs = Shader.PropertyToID("_ACESCoeffs");
public static readonly int _ACES_E = Shader.PropertyToID("_ACES_E");
public static readonly int _ColorFilter = Shader.PropertyToID("_ColorFilter");
}
}
}