浏览代码

Fix HDRP warnings on 2020.X (#260)

* Fix HDRP warnings on 2020.2

* Updating changelog

* Fixing HDRP version expression on 2019.4
/0.8.0-preview.1_staging
GitHub 4 年前
当前提交
bdde3ec1
共有 6 个文件被更改,包括 49 次插入3 次删除
  1. 2
      com.unity.perception/CHANGELOG.md
  2. 13
      com.unity.perception/Runtime/GroundTruth/RenderPasses/HdrpPasses/GroundTruthPass.cs
  3. 10
      com.unity.perception/Runtime/GroundTruth/RenderPasses/HdrpPasses/InstanceSegmentationPass.cs
  4. 10
      com.unity.perception/Runtime/GroundTruth/RenderPasses/HdrpPasses/LensDistortionPass.cs
  5. 10
      com.unity.perception/Runtime/GroundTruth/RenderPasses/HdrpPasses/SemanticSegmentationPass.cs
  6. 7
      com.unity.perception/Runtime/Unity.Perception.Runtime.asmdef

2
com.unity.perception/CHANGELOG.md


### Fixed
Fixed compiler warnings in projects with HDRP on 2020.1 and later
## [0.8.0-preview.2] - 2021-03-15
### Upgrade Notes

13
com.unity.perception/Runtime/GroundTruth/RenderPasses/HdrpPasses/GroundTruthPass.cs


targetDepthBuffer = TargetBuffer.Custom;
}
protected sealed override void Execute(
ScriptableRenderContext renderContext, CommandBuffer cmd, HDCamera hdCamera, CullingResults cullingResult)
//overrides obsolete member in HDRP on 2020.1+. Re-address when removing 2019.4 support or the API is dropped
#if HDRP_9_OR_NEWER
protected override void Execute(CustomPassContext ctx)
{
ScriptableRenderContext renderContext = ctx.renderContext;
var cmd = ctx.cmd;
var hdCamera = ctx.hdCamera;
var cullingResult = ctx.cullingResults;
#else
protected override void Execute(ScriptableRenderContext renderContext, CommandBuffer cmd, HDCamera hdCamera, CullingResults cullingResult)
#endif
// CustomPasses are executed for each camera. We only want to run for the target camera
if (hdCamera.camera != targetCamera)
return;

10
com.unity.perception/Runtime/GroundTruth/RenderPasses/HdrpPasses/InstanceSegmentationPass.cs


[UsedImplicitly]
public InstanceSegmentationPass() {}
//overrides obsolete member in HDRP on 2020.1+. Re-address when removing 2019.4 support or the API is dropped
#if HDRP_9_OR_NEWER
protected override void Execute(CustomPassContext ctx)
{
ScriptableRenderContext renderContext = ctx.renderContext;
var cmd = ctx.cmd;
var hdCamera = ctx.hdCamera;
var cullingResult = ctx.cullingResults;
#else
#endif
CoreUtils.SetRenderTarget(cmd, targetTexture, ClearFlag.All);
m_InstanceSegmentationCrossPipelinePass.Execute(renderContext, cmd, hdCamera.camera, cullingResult);
}

10
com.unity.perception/Runtime/GroundTruth/RenderPasses/HdrpPasses/LensDistortionPass.cs


lensDistortionCrossPipelinePass.Setup();
}
//overrides obsolete member in HDRP on 2020.1+. Re-address when removing 2019.4 support or the API is dropped
#if HDRP_9_OR_NEWER
protected override void Execute(CustomPassContext ctx)
{
ScriptableRenderContext renderContext = ctx.renderContext;
var cmd = ctx.cmd;
var hdCamera = ctx.hdCamera;
var cullingResult = ctx.cullingResults;
#else
#endif
CoreUtils.SetRenderTarget(cmd, targetTexture);
lensDistortionCrossPipelinePass.Execute(renderContext, cmd, hdCamera.camera, cullingResult);
}

10
com.unity.perception/Runtime/GroundTruth/RenderPasses/HdrpPasses/SemanticSegmentationPass.cs


m_SemanticSegmentationCrossPipelinePass.Setup();
}
//overrides obsolete member in HDRP on 2020.1+. Re-address when removing 2019.4 support or the API is dropped
#if HDRP_9_OR_NEWER
protected override void Execute(CustomPassContext ctx)
{
ScriptableRenderContext renderContext = ctx.renderContext;
var cmd = ctx.cmd;
var hdCamera = ctx.hdCamera;
var cullingResult = ctx.cullingResults;
#else
#endif
CoreUtils.SetRenderTarget(cmd, targetTexture);
m_SemanticSegmentationCrossPipelinePass.Execute(renderContext, cmd, hdCamera.camera, cullingResult);
}

7
com.unity.perception/Runtime/Unity.Perception.Runtime.asmdef


"name": "com.unity.simulation.capture",
"expression": "0.0.10-preview.16",
"define": "SIMULATION_CAPTURE_0_0_10_PREVIEW_16_OR_NEWER"
},
{
"name": "com.unity.render-pipelines.high-definition",
"expression": "9.0",
"define": "HDRP_9_OR_NEWER"
}
}
正在加载...
取消
保存