Search Issue Tracker

By Design

Votes

0

Found in

2021.3.29f1

2022.3.8f1

2023.1.10f1

2023.2.0b6

2023.3.0a2

Issue ID

UUM-46684

Regression

No

GameObject is not visible in Player when using a custom shader and the WebGL platform

-

Reproduction steps:
1. Open the attached "PROJECTFILE" project
2. Make sure that the WebGL Platform is selected in the Build Settings (File > Build Settings)
3. Build And Run the project
4. Observe the Player

Expected result: “Capsule” GameObject is visible (like in the Game View window)
Actual result: “Capsule” GameObject is not visible

Reproducible with: 2021.3.29f1, 2022.3.8f1, 2023.1.10f1, 2023.2.0b6, 2023.3.0a2

Reproducible on: macOS 13.4.1 (M1 Max)
Not reproducible on: No other environment tested

Note: Not reproducible when the “Windows, Mac, Linux” platform is selected

  1. Resolution Note:

    By design: Depth buffer direction is different depending on graphics API, so the shader needs to take it into account when doing calculations. See example of world position reconstruction from depth buffer https://docs.unity3d.com/Packages/com.unity.render-pipelines.universal@16.0/manual/writing-shaders-urp-reconstruct-world-position.html

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.