Promote ScriptableRenderer renderer-recording context methods to the primary Universal execution seam and route the renderer-driven pipeline through that seam. Update managed probes and scripting expectations to cover the new non-public renderer recording contract, and archive the completed phase plan.
54 lines
1.5 KiB
C#
54 lines
1.5 KiB
C#
using XCEngine;
|
|
using XCEngine.Rendering;
|
|
|
|
namespace XCEngine.Rendering.Universal
|
|
{
|
|
public abstract class RendererDrivenRenderPipeline
|
|
: ScriptableRenderPipeline
|
|
{
|
|
protected RendererDrivenRenderPipeline()
|
|
{
|
|
}
|
|
|
|
protected sealed override bool SupportsStageRenderGraph(
|
|
CameraFrameStage stage)
|
|
{
|
|
return SupportsRendererRecording(
|
|
new RendererRecordingContext(stage));
|
|
}
|
|
|
|
protected sealed override bool RecordStageRenderGraph(
|
|
ScriptableRenderContext context)
|
|
{
|
|
if (context == null)
|
|
{
|
|
return false;
|
|
}
|
|
|
|
return RecordRenderer(
|
|
new RendererRecordingContext(context));
|
|
}
|
|
|
|
protected virtual bool SupportsRendererRecording(
|
|
RendererRecordingContext context)
|
|
{
|
|
ScriptableRenderer renderer =
|
|
ResolveRenderer(context);
|
|
return renderer != null &&
|
|
renderer.SupportsRendererRecordingInstance(context);
|
|
}
|
|
|
|
protected virtual bool RecordRenderer(
|
|
RendererRecordingContext context)
|
|
{
|
|
ScriptableRenderer renderer =
|
|
ResolveRenderer(context);
|
|
return renderer != null &&
|
|
renderer.RecordRendererInstance(context);
|
|
}
|
|
|
|
protected abstract ScriptableRenderer ResolveRenderer(
|
|
RendererRecordingContext context);
|
|
}
|
|
}
|