41 lines
1.1 KiB
C#
41 lines
1.1 KiB
C#
using System;
|
|
using Echovoid.Runtime.Behavior.Rendering;
|
|
using UnityEngine;
|
|
using UnityEngine.Rendering;
|
|
using UnityEngine.Rendering.Universal;
|
|
|
|
namespace SLSUtilities.Rendering.PostProcessing
|
|
{
|
|
public enum CustomPostProcessInjectionPoint
|
|
{
|
|
AfterTransparent,
|
|
BeforePostProcess,
|
|
AfterPostProcess
|
|
}
|
|
|
|
public abstract class ScriptablePostProcessorVolume : VolumeComponent, IPostProcessComponent
|
|
{
|
|
public virtual CustomPostProcessInjectionPoint InjectionPoint =>
|
|
CustomPostProcessInjectionPoint.AfterPostProcess;
|
|
|
|
public virtual int OrderInInjectionPoint => 0;
|
|
|
|
protected Material material;
|
|
|
|
// 注入材质的句柄,由 Pass 调用
|
|
public void SetMaterial(Material mat) => material = mat;
|
|
|
|
public abstract string GetShaderName();
|
|
|
|
public virtual void Setup()
|
|
{
|
|
|
|
}
|
|
|
|
public abstract void Render(CommandBuffer cmd, ref RenderingData renderingData, RTHandle source, RTHandle destination);
|
|
|
|
public abstract bool IsActive();
|
|
|
|
public bool IsTileCompatible() => false;
|
|
}
|
|
} |