Search Issue Tracker

By Design



Found in






Issue ID




[Android][Vulcan] "UNITY_DISPLAY_ORIENTATION_PRETRANSFORM" is always 0 when the render pipeline is URP



Steps to reproduce:
1. Open the attached “PrerotationTest” project
2. Build And Run the project on the device
3. Observe the cube in the device’s screen when rotating the device

Expected result: GameObject color changes
Actual result: GameObject color doesn’t change

Reproducible with: 2021.3.31f1, 2022.3.10f1, 2023.1.16f1, 2023.2.0b12, 2023.3.0a8

Reproducible on: macOS Ventura 13.5 (Intel)
Not reproducible on: No other environment tested

Reproducible with devices:
VLNQA00409 - Galaxy Z Fold3 5G (SM-F926B), CPU: Snapdragon 888, GPU: Adreno 660, OS: 11
VLNQA00498 - Google Pixel 7 (Pixel 7), CPU: Google Tensor G2, GPU: Mali-G710, OS: 13
VLNQA00513 - OnePlus Nord N10 5G (BE2029), CPU: Snapdragon 690 SM6350, GPU: Adreno 619, OS: 11
VLNQA00334 - Xiaomi Mi A3 (Mi A3), CPU: Snapdragon 665 SM6125, GPU: Adreno 610, OS: 11

Could not test with devices:
iOS (the cube is white by default)

- Doesn’t reproduce with Build-in RP
- Couldn’t test with other Graphics APIs as “UNITY_DISPLAY_ORIENTATION_PRETRANSFORM” requires Vulcan Graphics API

  1. Resolution Note:

    By design: UNITY_DISPLAY_ORIENTATION_PRETRANSFORM changes values only when rendering directly into back buffer, it does not apply when rendering to a render texture.

    In this case, the URP is using HDR and post processing, which makes it do all rending into a render texture, and then do a final blit of the texture into a back buffer, that's why all draw call shaders are getting UNITY_DISPLAY_ORIENTATION_PRETRANSFORM value 0.
    If the HDR and post processing are disabled, URP does render directly to back buffer, and the shaders do receive different UNITY_DISPLAY_ORIENTATION_PRETRANSFORM values depending on device orientation.

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.