75 lines
1.7 KiB
C#
75 lines
1.7 KiB
C#
using XCEngine;
|
|
|
|
namespace XCEngine.Rendering
|
|
{
|
|
public abstract class ScriptableRenderPipelineAsset : RenderPipelineAsset
|
|
{
|
|
private int m_runtimeResourceVersion = 1;
|
|
|
|
protected ScriptableRenderPipelineAsset()
|
|
{
|
|
}
|
|
|
|
internal void ReleaseRuntimeResourcesInstance()
|
|
{
|
|
ReleaseRuntimeResources();
|
|
}
|
|
|
|
internal void ConfigureCameraFramePlanInstance(
|
|
ScriptableRenderPipelinePlanningContext context)
|
|
{
|
|
ConfigureCameraFramePlan(context);
|
|
}
|
|
|
|
internal int GetRuntimeResourceVersionInstance()
|
|
{
|
|
return m_runtimeResourceVersion;
|
|
}
|
|
|
|
protected virtual ScriptableRenderPipeline CreatePipeline()
|
|
{
|
|
return null;
|
|
}
|
|
|
|
protected virtual void ConfigureCameraRenderRequest(
|
|
CameraRenderRequestContext context)
|
|
{
|
|
}
|
|
|
|
protected virtual void ConfigureCameraFramePlan(
|
|
ScriptableRenderPipelinePlanningContext context)
|
|
{
|
|
}
|
|
|
|
protected virtual FinalColorSettings GetDefaultFinalColorSettings()
|
|
{
|
|
return FinalColorSettings.CreateDefault();
|
|
}
|
|
|
|
protected virtual string GetPipelineRendererAssetKey()
|
|
{
|
|
return string.Empty;
|
|
}
|
|
|
|
protected virtual void ReleaseRuntimeResources()
|
|
{
|
|
}
|
|
|
|
protected void SetDirty()
|
|
{
|
|
ReleaseRuntimeResources();
|
|
|
|
unchecked
|
|
{
|
|
++m_runtimeResourceVersion;
|
|
}
|
|
|
|
if (m_runtimeResourceVersion <= 0)
|
|
{
|
|
m_runtimeResourceVersion = 1;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|