Search Issue Tracker
By Design
Votes
0
Found in
2021.3.38f1
2022.3.27f1
6000.0.0f1
Issue ID
UUM-71009
Regression
No
[URP][Comp] Texture is stored upside down when using Blit
How to reproduce:
1. Open the “IN-74459_repro“ project
2. Open the “SampleScene“
3. Enter Play Mode and exit Play Mode
4. Navigate to Assets → Shaders and select “DebugRenderTexture“
5. In the Inspector window, observe the preview
Expected result: The texture is right side up
Actual result: The texture is upside down
Reproducible with: 2021.3.38f1, 2022.3.27f1, 6000.0.0f1
Reproducible on: Windows 10, Windows 11 (user’s device)
Not reproducible on: No other environment tested
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
- “Open” button in Inspector does not function for certain Assets
- Channel remapping dropdown in the Terrain Layer does not open when clicked on the title
- The Editor freezes indefinitely when a large number of elements are entered in the Subgraphs or Categories lists
- Some Visual Effects package Assets links to documentation are not working
- Heatmap asset’s documentation button in the Inspector window leads to “Sorry... that page seems to be missing!” page when clicked
Resolution Note:
Hi, we have looked into the case and analyzed the frame. The debug blit pass copied CustomRenderTexture to DebugRenderTexture. And the CustomRenderTexture is generated by rendering the scene in a pass called "Render Scene With RTHandle".
The graphics API used in the project is DX11.
Unity handles render texture coordinates in a Gfx API dependent way. For DX11 like API, the coordinate is 0 at the top and increases downward as described in https://docs.unity3d.com/Manual/SL-PlatformDifferences.html
So the "upside down" is unfortunately by-design according to that spec. We understand this is confusing but this is currently the Unity way to handle this.
Removing yflip is something we discuss but it is a breaking change that won't be considered for a bug-fix.
Work around is to add "yflip" logic in a custom blit shader if project has to write to a render texture not flipped. The potential issue with that approach is that other part of the system may flip uv before sampling the texture in shader which will not be compatible with a not flipped texture(all of this is DX11 like API only issue).