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);
}
Comments (2)
-
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
- Volumetric fog shader variants are missing from build when "Strict Shader Variant Matching" is disabled
- Unnecessary modifications clutter the Scene when using a RectTransform driven by a LayoutGroup in a Prefab
- Files in the target folder are deleted without a proper warning when building an iOS project
- Character animation freezes when toggling animator on/off in a coroutine
- Certain textures are incorrectly marked in the render pass list when observed through Render Graph Viewer
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)