Files
Cielonos/Assets/Shaders/ScriptablePostProcessor/Base/ScriptablePostProcessorVolume.cs

41 lines
1.1 KiB
C#
Raw Normal View History

2025-11-25 08:19:33 -05:00
using System;
using Echovoid.Runtime.Behavior.Rendering;
using UnityEngine;
using UnityEngine.Rendering;
using UnityEngine.Rendering.Universal;
2026-02-13 09:22:11 -05:00
namespace SLSUtilities.Rendering.PostProcessing
2025-11-25 08:19:33 -05:00
{
public enum CustomPostProcessInjectionPoint
{
AfterTransparent,
BeforePostProcess,
AfterPostProcess
}
2025-12-23 19:47:06 -05:00
public abstract class ScriptablePostProcessorVolume : VolumeComponent, IPostProcessComponent
2025-11-25 08:19:33 -05:00
{
public virtual CustomPostProcessInjectionPoint InjectionPoint =>
CustomPostProcessInjectionPoint.AfterPostProcess;
public virtual int OrderInInjectionPoint => 0;
protected Material material;
2025-12-23 19:47:06 -05:00
// 注入材质的句柄,由 Pass 调用
public void SetMaterial(Material mat) => material = mat;
public abstract string GetShaderName();
2025-11-25 08:19:33 -05:00
public virtual void Setup()
{
2025-12-23 19:47:06 -05:00
2025-11-25 08:19:33 -05:00
}
public abstract void Render(CommandBuffer cmd, ref RenderingData renderingData, RTHandle source, RTHandle destination);
public abstract bool IsActive();
public bool IsTileCompatible() => false;
}
}