Search Issue Tracker
By Design
Votes
0
Found in [Package]
7.1.7
Issue ID
1215108
Regression
No
Renderers drawn with DrawRenderer in a custom pass are rendring at a offset position
How to reproduce:
1. Open attached project "FireRendering.zip" and scene "Scn_FirePass"
2. In Hierarchy window, expand "_CustomRender" and select "Particle System"
3. In Scene window, press 2D button a few times (this should help in reproducing the bug if it is not already reproducing)
4. In Scene view, zoom in/out, rotate camera, fly around
Expected result: in Scene view, the selected particle effect is rendered without any artifacts
Actual result: in Scene view, the particle effect is rendered twice, one of the effects is rendered with an offset
Reproducible with: 2019.3.0f6 (7.1.8), 2020.1.0a20, 2020.1.0a21 (7.1.7)
Could not test with: 2017.4.36f1, 2018.4.16f1, 2019.2.20f1 (HDRP and "custom pass volume is not recognized" errors thrown), 2019.3.0f5, 2020.1.0a19 due to another bug case 1195214, 2020.1.0a20(7.1.8) and 2020.1.0a21(7.1.8) errors in the console window
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Skinned Mesh Renderer with multiple Animator Components does not render when "Optimize Game Objects" is enabled
- [iOS]Certain characters are not displayed when using iOS devices with 18 OS and newer
- Trees do not render in 'Unity Terrain - URP Demo Scene'
- Silent crash when clicking in Scene View in a specific project
- The Player renders black on a Quest headset when MSAA, Post Processing, and Spacewarm depth submission are enabled
Resolution Note:
Hello, this happens when you use CommandBuffer.SetRenderTarget instead of CoreUtils.SetRenderTarget which also sets the viewport of the render target and thus avoids scaling issues between multiple camera sizes.
So in your code if you replace `cmd.SetRenderTarget(_fireBuffer, depth, 0);` by `CoreUtils.SetRenderTarget(cmd, _fireBuffer, depth, 0);` it will fix the issue.