浏览代码

Hacking HDRP 10.x.x support into ground truth

/resint_updates
Jon Hogins 4 年前
当前提交
5cb3f309
共有 5 个文件被更改,包括 20 次插入12 次删除
  1. 4
      com.unity.perception/Editor/Randomization/Editors/RunInUnitySimulationWindow.cs
  2. 7
      com.unity.perception/Runtime/GroundTruth/GroundTruthPass.cs
  3. 7
      com.unity.perception/Runtime/GroundTruth/InstanceSegmentationPass.cs
  4. 7
      com.unity.perception/Runtime/GroundTruth/LensDistortionPass.cs
  5. 7
      com.unity.perception/Runtime/GroundTruth/SemanticSegmentationPass.cs

4
com.unity.perception/Editor/Randomization/Editors/RunInUnitySimulationWindow.cs


{
scenes = new[] { AssetDatabase.GetAssetPath(m_MainSceneField.value) },
locationPathName = Path.Combine(projectBuildDirectory, $"{m_RunNameField.value}.x86_64"),
#if USE_CLOUD_RENDERING
target = BuildTarget.CloudRendering
#else
#endif
};
var report = BuildPipeline.BuildPlayer(buildPlayerOptions);
var summary = report.summary;

7
com.unity.perception/Runtime/GroundTruth/GroundTruthPass.cs


this.targetDepthBuffer = TargetBuffer.Custom;
}
protected sealed override void Execute(ScriptableRenderContext renderContext, CommandBuffer cmd, HDCamera hdCamera, CullingResults cullingResult)
//protected sealed override void Execute(ScriptableRenderContext renderContext, CommandBuffer cmd, HDCamera hdCamera, CullingResults cullingResult)
protected sealed override void Execute(CustomPassContext customPassContext)
if (hdCamera.camera != targetCamera)
if (customPassContext.hdCamera.camera != targetCamera)
ExecutePass(renderContext, cmd, hdCamera, cullingResult);
ExecutePass(customPassContext.renderContext, customPassContext.cmd, customPassContext.hdCamera, customPassContext.cullingResults);
}
protected abstract void ExecutePass(ScriptableRenderContext renderContext, CommandBuffer cmd, HDCamera hdCamera, CullingResults cullingResult);

7
com.unity.perception/Runtime/GroundTruth/InstanceSegmentationPass.cs


public InstanceSegmentationPass()
{}
protected override void Execute(ScriptableRenderContext renderContext, CommandBuffer cmd, HDCamera hdCamera, CullingResults cullingResult)
//protected override void Execute(ScriptableRenderContext renderContext, CommandBuffer cmd, HDCamera hdCamera, CullingResults cullingResult)
protected override void Execute(CustomPassContext customPassContext)
CoreUtils.SetRenderTarget(cmd, targetTexture, ClearFlag.All);
m_InstanceSegmentationCrossPipelinePass.Execute(renderContext, cmd, hdCamera.camera, cullingResult);
CoreUtils.SetRenderTarget(customPassContext.cmd, targetTexture, ClearFlag.All);
m_InstanceSegmentationCrossPipelinePass.Execute(customPassContext.renderContext, customPassContext.cmd, customPassContext.hdCamera.camera, customPassContext.cullingResults);
}
public void EnsureInit()

7
com.unity.perception/Runtime/GroundTruth/LensDistortionPass.cs


m_LensDistortionCrossPipelinePass.Setup();
}
protected override void Execute(ScriptableRenderContext renderContext, CommandBuffer cmd, HDCamera hdCamera, CullingResults cullingResult)
//protected override void Execute(ScriptableRenderContext renderContext, CommandBuffer cmd, HDCamera hdCamera, CullingResults cullingResult)
protected override void Execute(CustomPassContext customPassContext)
CoreUtils.SetRenderTarget(cmd, targetTexture);
m_LensDistortionCrossPipelinePass.Execute(renderContext, cmd, hdCamera.camera, cullingResult);
CoreUtils.SetRenderTarget(customPassContext.cmd, targetTexture);
m_LensDistortionCrossPipelinePass.Execute(customPassContext.renderContext, customPassContext.cmd, customPassContext.hdCamera.camera, customPassContext.cullingResults);
}
}
}

7
com.unity.perception/Runtime/GroundTruth/SemanticSegmentationPass.cs


m_SemanticSegmentationCrossPipelinePass.Setup();
}
protected override void Execute(ScriptableRenderContext renderContext, CommandBuffer cmd, HDCamera hdCamera, CullingResults cullingResult)
//protected override void Execute(ScriptableRenderContext renderContext, CommandBuffer cmd, HDCamera hdCamera, CullingResults cullingResult)
protected override void Execute(CustomPassContext customPassContext)
CoreUtils.SetRenderTarget(cmd, targetTexture);
m_SemanticSegmentationCrossPipelinePass.Execute(renderContext, cmd, hdCamera.camera, cullingResult);
CoreUtils.SetRenderTarget(customPassContext.cmd, targetTexture);
m_SemanticSegmentationCrossPipelinePass.Execute(customPassContext.renderContext, customPassContext.cmd, customPassContext.hdCamera.camera, customPassContext.cullingResults);
}
}
}
正在加载...
取消
保存