Search Issue Tracker

Fixed in 2021.1.X

Fixed in 2019.4.X, 2020.3.X

Votes

0

Found in

2018.4

2019.4.10f1

2021.1

Issue ID

1279714

Regression

No

Using Graphics.Blit on temporary RenderTexture results in different output textures different Graphics APIs and platforms

Mobile Graphics

-

Reproduction steps:
1. Open the project in "read-pixels-bug.zip"
2. Open SampleScene and enter Play Mode
3. Inspect how the 2 first textures look (2 first from left)
4. Build the project for iOS and deploy it
5. Inspect how the 2 first textures look (2 first from left)

Expected result: textures will look the same as in Editor (both red)
Actual result: one of the red textures will be white with a red outline

Reproducible with: 2018.4.27f1, 2019.4.10f1, 2020.1.6f1, 2020.2.0b4
Could not test with 2019.4.11f1 because the app crashed in XCode

Standalone platforms tested:
Not reproducible:
iMac 10.15.6, 3,4 GHz Quad-Core Intel Core i5, Radeon Pro 570 4 GB (OpenGLCore, Metal)
Geforce GTX 1660 ti, i7-8700 3.2 GHz, Windows 10 (DX11, Vulkan)
Reproducible with:
Geforce GTX 1660 ti, i7-8700 3.2 GHz, Windows 10 (OpenGL ES2, OpenGL ES3)

Graphics APIs tested (Mobile devices):
Metal:
Reproducible with:
iPad Pro 12.9 1st gen (iOS 13.4.1)
iPad Air 2 (iOS 11.0.3)
iPhone 8+ (iOS 12.0)
iPhone XR (iOS 13.4.1)
iPad 9.7’ 6th gen (iOS 14.2)
Vulkan:
Not reproducible with:
N/A, Samsung Galaxy S9 (SM-G960F), Android 8.0.0, CPU: Exynos 9 Series 9810, GPU: Mali-G72
VLNQA00316, Samsung Galaxy Note10 (SM-N970F), Android 9, CPU: Exynos 9 Series 9825, GPU: Mali-G76
N/A, Lge LG V50 ThinQ (LM-V500N), Android 10, CPU: Snapdragon 855 SM8150, GPU: Adreno (TM) 640
VLNQA00024, Xiaomi Mi 5 (MI 5), Android 7.0, CPU: Snapdragon 820 MSM8996, GPU: Adreno (TM) 530
OpenGL ES 2, 3:
Reproducible with:
N/A, Samsung Galaxy S9 (SM-G960F), Android 8.0.0, CPU: Exynos 9 Series 9810, GPU: Mali-G72
VLNQA00316, Samsung Galaxy Note10 (SM-N970F), Android 9, CPU: Exynos 9 Series 9825, GPU: Mali-G76
Not reproducible with:
N/A, Lge LG V50 ThinQ (LM-V500N), Android 10, CPU: Snapdragon 855 SM8150, GPU: Adreno (TM) 640
VLNQA00024, Xiaomi Mi 5 (MI 5), Android 7.0, CPU: Snapdragon 820 MSM8996, GPU: Adreno (TM) 530
iPad Pro 12.9 1st gen (iOS 13.4.1)
iPad Air 2 (iOS 11.0.3)
iPhone 8+ (iOS 12.0)
iPhone XR (iOS 13.4.1)
iPad 9.7’ 6th gen (iOS 14.2)
iPhone 5C (iOS 10.3.3) OpenGL ES 2 only

  1. Resolution Note (fix version 2021.1):

    This observed issue was caused due to a temporary RenderTexture remaining active after being used as the target of a Graphics.Blit operation when RenderTexture.ReleaseTemporary wascalled on it, followed by being reallocated with RenderTexture.GetTemporary. GetTemporary internally invalidates the texture which causes incorrect load/store actions to be set due to it being still bound as active. This causes the difference in rendering on mobile devices in comparison with desktop, as load/store actions have different effects there. The observed effect of this in this particular case is that the first blit operation on mobile would be discarded incorrectly.

    A fix has been made such that if a temporary RenderTexture remains active after RenderTexture.ReleaseTemporary followed by being reallocated by RenderTexture.GetTemporary then the RenderTexture will not be invalidated, to avoid this issue.

    Fixed in 2021.2.0a4.739

  2. Resolution Note (fix version 2021.1):

    Fixed in 2021.1.0b10.2062

  3. Resolution Note (fix version 2020.3):

    Fixed in 2020.3.0f1.21

  4. Resolution Note (fix version 2019.4):

    2019.4.22f1 (9fdda2fe27ad)

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.