Search Issue Tracker
By Design
Votes
0
Found in
2019.2.0f1
2020.1
Issue ID
1186173
Regression
No
Textures are being flipped when using Graphics.CopyTexture to create cubemap
To reproduce:
1. Create a new project and import "cubemapCopyTextureBug.unitypackage"
2. Open scene "cu"
3. Press Play
4. Check generated Cubemap in the inspector window
Actual results: The generated cubemap is upside down
Expected results: The generated cubemap should be not flipped
Reproduced with: 2017.4.34f1; 2020.1.0a11
Note: The gif is attached by the user.
Code:
{
cubemap = new Cubemap(texture[0].width, texture[0].format, false);
Graphics.CopyTexture(texture[1], 0, cubemap, 0);
Graphics.CopyTexture(texture[3], 0, cubemap, 1);
Graphics.CopyTexture(texture[5], 0, cubemap, 2);
Graphics.CopyTexture(texture[4], 0, cubemap, 3);
Graphics.CopyTexture(texture[0], 0, cubemap, 4);
Graphics.CopyTexture(texture[2], 0, cubemap, 5);
}
-
zoooom
Apr 21, 2020 16:30
It would be great if this could be toggled off somehow at least.
-
ThomasCreate
Dec 16, 2019 10:52
HOW is this intended behaviour? I spent days tracking this down. It's also not both vertical and horizontal, it's only vertical. This is very, very annoying hidden behaviour.
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
- Articulation Body with 'Revolute' Joint Type has erratic behavior when Upper Limit is set to above 360
- WebGL Player fails to render Scene when Terrain with Detail Mesh is added and WebGPU Graphics API is used
- Inconsistent errors are logged when different types are passed into the Query "Q<>" method in UIToolkit and the ancestor VisualElement is null
- Crash on GetMaterialPropertyByIndex when opening a specific Scene
- Discrepancies in the styling are present when using a TSS file instead of a USS file in custom EditorWindow
Resolution Note:
this behavior is by design: if we speak about cubemaps they are intended to be sampled for reflection, i.e. with reflection vector, which means that we "want" image to be flipped both vert/horz and this is exactly what cubemap inspector does with images you assign to slots. When you copy textures you will get "mirrored" reflection (and you can see this in the preview too)