2026-04-21 01:54:02 +08:00
|
|
|
using XCEngine;
|
|
|
|
|
using XCEngine.Rendering;
|
|
|
|
|
|
|
|
|
|
namespace XCEngine.Rendering.Universal
|
|
|
|
|
{
|
|
|
|
|
internal sealed class NativeSceneFeaturePass
|
|
|
|
|
: ScriptableRenderPass
|
|
|
|
|
{
|
2026-04-21 22:52:08 +08:00
|
|
|
private readonly NativeSceneFeaturePassId m_featurePassId;
|
2026-04-21 01:54:02 +08:00
|
|
|
|
|
|
|
|
public NativeSceneFeaturePass(
|
2026-04-21 22:52:08 +08:00
|
|
|
NativeSceneFeaturePassId featurePassId,
|
2026-04-21 01:54:02 +08:00
|
|
|
RenderPassEvent passEvent)
|
|
|
|
|
{
|
2026-04-21 22:52:08 +08:00
|
|
|
m_featurePassId =
|
|
|
|
|
featurePassId;
|
2026-04-21 01:54:02 +08:00
|
|
|
renderPassEvent = passEvent;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void Configure(
|
|
|
|
|
RenderPassEvent passEvent)
|
|
|
|
|
{
|
|
|
|
|
renderPassEvent = passEvent;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected override bool RecordRenderGraph(
|
|
|
|
|
ScriptableRenderContext context,
|
|
|
|
|
RenderingData renderingData)
|
|
|
|
|
{
|
|
|
|
|
return context != null &&
|
|
|
|
|
renderingData != null &&
|
|
|
|
|
renderingData.isMainSceneStage &&
|
|
|
|
|
context.RecordNativeSceneFeaturePass(
|
2026-04-21 22:52:08 +08:00
|
|
|
m_featurePassId);
|
2026-04-21 01:54:02 +08:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|