切换主武器
This commit is contained in:
@@ -13,7 +13,7 @@ namespace SLSFramework.Rendering.PostProcessing
|
||||
AfterPostProcess
|
||||
}
|
||||
|
||||
public abstract class ScriptablePostProcessorVolume : VolumeComponent, IPostProcessComponent, IDisposable
|
||||
public abstract class ScriptablePostProcessorVolume : VolumeComponent, IPostProcessComponent
|
||||
{
|
||||
public virtual CustomPostProcessInjectionPoint InjectionPoint =>
|
||||
CustomPostProcessInjectionPoint.AfterPostProcess;
|
||||
@@ -22,26 +22,18 @@ namespace SLSFramework.Rendering.PostProcessing
|
||||
|
||||
protected Material material;
|
||||
|
||||
protected abstract string GetShaderName();
|
||||
// 注入材质的句柄,由 Pass 调用
|
||||
public void SetMaterial(Material mat) => material = mat;
|
||||
|
||||
public abstract string GetShaderName();
|
||||
|
||||
public virtual void Setup()
|
||||
{
|
||||
material = InternalShaderHelpers.GenerateTransientMaterial(GetShaderName());
|
||||
|
||||
}
|
||||
|
||||
public abstract void Render(CommandBuffer cmd, ref RenderingData renderingData, RTHandle source, RTHandle destination);
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
Dispose(true);
|
||||
GC.SuppressFinalize(this);
|
||||
}
|
||||
|
||||
public virtual void Dispose(bool disposing)
|
||||
{
|
||||
CoreUtils.Destroy(material);
|
||||
}
|
||||
|
||||
public abstract bool IsActive();
|
||||
|
||||
public bool IsTileCompatible() => false;
|
||||
|
||||
Reference in New Issue
Block a user