Search Issue Tracker
By Design
Votes
1
Found in
2018.4
2019.4
2020.3
2020.3.9f1
2021.1
2021.2
Issue ID
1338426
Regression
No
Camera.RenderToCubemap is inversed when using RenderTextureDescriptor
How to reproduce:
1. Open the attached project "rendercubemap_descriptor.zip"
2. Open Assets/scene.unity
3. Select "BugRepro" in the Hierarchy
4. In the Inspector window open "Cubemap Not Ok"
Expected result: Cubemap is displayed correctly
Actual result: Cubemap is displayed inversed
Reproducible with: 2018.4.35f1, 2019.4.27f1, 2020.3.10f1, 2021.1.9f1, 2021.2.0a18
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
- Fixing Message Loss in UMPE During Domain Reload
- The Editor freezes when ScheduleReadOnly of IJobParallelForTransform with dependency is used
- Text is truncated in the Inspector when the display scale is set to 150%
- CancellationTokenSource(<timeout>) has incorrect cancellation status when used in WebGL Player
- VFX property value names are cut off when properties with 'Arc' are viewed in the VFX Blackboard
Resolution Note:
This is by design. Creating a RenderTextureDescriptor struct by using the default constructor initializes the struct with zero values, including the flags. This means the struct is not initialized with some flags with the recommended values, including the RenderTextureCreationFlags.AllowVerticalFlip. The documentation warns for this unfortunate behavior of C#: 'Avoid using the default constructor as it does not initialize some flags with the recommended values' (https://docs.unity3d.com/ScriptReference/RenderTextureDescriptor.html). You can solve this by creating the struct using one of the other constructors, such as RenderTextureDescriptor(width, height).