Expose native camera frame planning controls to managed pipeline assets and renderer features. Allow managed planning to override fullscreen stage heuristics while keeping CameraFramePlan as the native execution contract. Add scripting coverage, probe assets, and archive the phase plan after build, test, and editor smoke validation.
75 lines
1.7 KiB
C#
75 lines
1.7 KiB
C#
using XCEngine;
|
|
using XCEngine.Rendering;
|
|
|
|
namespace XCEngine.Rendering.Universal
|
|
{
|
|
public abstract class ScriptableRendererFeature
|
|
{
|
|
private bool m_disposed;
|
|
|
|
protected ScriptableRendererFeature()
|
|
{
|
|
}
|
|
|
|
public bool isActive { get; set; } = true;
|
|
|
|
internal void ReleaseRuntimeResourcesInstance()
|
|
{
|
|
if (m_disposed)
|
|
{
|
|
return;
|
|
}
|
|
|
|
ReleaseRuntimeResources();
|
|
m_disposed = true;
|
|
}
|
|
|
|
public virtual void Create()
|
|
{
|
|
}
|
|
|
|
public virtual void ConfigureCameraRenderRequest(
|
|
CameraRenderRequestContext context)
|
|
{
|
|
}
|
|
|
|
public virtual void ConfigureCameraFramePlan(
|
|
ScriptableRenderPipelinePlanningContext context)
|
|
{
|
|
}
|
|
|
|
public virtual void AddRenderPasses(
|
|
ScriptableRenderer renderer,
|
|
RenderingData renderingData)
|
|
{
|
|
}
|
|
|
|
protected bool HasDirectionalShadow(
|
|
CameraRenderRequestContext context)
|
|
{
|
|
return context != null &&
|
|
InternalCalls
|
|
.Rendering_CameraRenderRequestContext_GetHasDirectionalShadow(
|
|
context.nativeHandle);
|
|
}
|
|
|
|
protected void ClearDirectionalShadow(
|
|
CameraRenderRequestContext context)
|
|
{
|
|
if (context == null)
|
|
{
|
|
return;
|
|
}
|
|
|
|
InternalCalls
|
|
.Rendering_CameraRenderRequestContext_ClearDirectionalShadow(
|
|
context.nativeHandle);
|
|
}
|
|
|
|
protected virtual void ReleaseRuntimeResources()
|
|
{
|
|
}
|
|
}
|
|
}
|
|
|