您最多选择25个主题
主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
31 行
1.2 KiB
31 行
1.2 KiB
#if URP_PRESENT
|
|
using UnityEngine.Rendering;
|
|
using UnityEngine.Rendering.Universal;
|
|
|
|
namespace UnityEngine.Perception.GroundTruth
|
|
{
|
|
class SemanticSegmentationUrpPass : ScriptableRenderPass
|
|
{
|
|
public SemanticSegmentationCrossPipelinePass m_SemanticSegmentationCrossPipelinePass;
|
|
|
|
public SemanticSegmentationUrpPass(Camera camera, RenderTexture targetTexture, SemanticSegmentationLabelConfig labelConfig)
|
|
{
|
|
m_SemanticSegmentationCrossPipelinePass = new SemanticSegmentationCrossPipelinePass(camera, labelConfig);
|
|
ConfigureTarget(targetTexture, targetTexture.depthBuffer);
|
|
m_SemanticSegmentationCrossPipelinePass.Setup();
|
|
}
|
|
|
|
public override void Execute(ScriptableRenderContext context, ref RenderingData renderingData)
|
|
{
|
|
var commandBuffer = CommandBufferPool.Get(nameof(SemanticSegmentationUrpPass));
|
|
m_SemanticSegmentationCrossPipelinePass.Execute(context, commandBuffer, renderingData.cameraData.camera, renderingData.cullResults);
|
|
CommandBufferPool.Release(commandBuffer);
|
|
}
|
|
|
|
public void Cleanup()
|
|
{
|
|
m_SemanticSegmentationCrossPipelinePass.Cleanup();
|
|
}
|
|
}
|
|
}
|
|
#endif
|