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
- Graphics Settings shows default values instead of the real values in the Rendering Debugger when Volume.profile is assigned via script
- Deleting multiple Tags throws “NullReferenceException”, and "Retrieving array element that was out of bounds" errors when holding the Enter key
- Material Component has two horizontal lines under it when its foldouts are closed
- Some selected Mesh Renderer Materials lead to Assets folder when pinged
- Editor colors appear darkened out when HDR Display Output is enabled
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)