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
- “[Worker0] Could not generate preview image“ error when opening macOS native plugin in the Inspector with Architecture to build for set to ARM 64-bit
- [iOS] Application.absoluteURL is empty on Awake/Start when opening via deep link with Splash Screen disabled
- Crash on MemoryManager::Deallocate when rapidly calling Addressables.LoadAssetAsync
- Crash on physx::shdfnd::atomicIncrement when adjusting values on a character controller component after entering Play mode in Prefab edit mode
- [Rendering Debugger] [NewInputSystem] Debug Overlays in Play mode throws InvalidOperationException when using New Input System
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)