Search Issue Tracker
By Design
Votes
0
Found in
2018.2.2f1
Issue ID
1069414
Regression
No
[iOS] [Metal] RenderTexture produce colored mosaic instead of expected texture
Reproduction steps:
1. Open the attached project.
2. Play the 'SampleScene' in the Editor to see the Expected behavior.
3. Build and run this scene to an iOS device.
Actual behavior (Screenshots attached):
- The texture will look like a colored mosaic.
Reproduced with:
iOS Metal
iPhone 7 iOS 11.0, iPhone 7+ iOS 11.1.1
2017.4.9f1, 2018.1.9f1, 2018.2.3f1, 2018.3.0a8
Not reproducible with:
iOS GLES
Editor Metal
-
Khakionion
Oct 11, 2018 07:11
If you’re using DiscardContents(), remember that it discards *both* color and depth. So if your shader misses "ZTest off" you get "random" depth values for depth test and keep "random" color values from color buffer when the depth test fails. If you add "ZTest off" to your shader then it should work.
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 (2018.3.X):
Ztest is something you never use for "blit" shaders. Just add "ZTest off" to your shader (near ZWrite Off) and it will work.