Search Issue Tracker

Active

Under Consideration for 2022.3.X, 6000.0.X, 6000.1.X

Votes

0

Found in

2022.3.53f1

6000.0.29f1

6000.1.0a6

Issue ID

UUM-88092

Regression

No

[Android] Performing hardware comparison using "SAMPLE_TEXTURE2D_SHADOW" results in no shadow being rendered when the GameObject is instantiated manually

--

-

How to reproduce:
1. Open the “ReproProject“ project
2. Open the “ShadowTest“ scene
3. Build and Run for Android
4. Wait for a few seconds for the “Sphere (Clone)“ GameObject to instantiate
5. Observe the shadows

Expected result: The shadow cast by the “Sphere (Clone)“ GameObject is visible
Actual result: No shadow is visible

Reproducible with: 2022.3.53f1, 6000.0.29f1, 6000.1.0a6
Could not test with: 2021.3.46f1 (“Shader error in '<custom_shader_name>': undeclared identifier 'sampler_LinearClampCompare'“)

Reproducible environment: macOS 14.6.1 (Intel)
Not reproducible environment: No other environment tested

Reproducible with these devices:
VLNQA00518, Google Pixel 4 (Pixel 4), Android 13, CPU: Snapdragon 855 SM8150, GPU: Adreno (TM) 640
VLNQA00423, Google Pixel 3 (Pixel 3), Android 9, CPU: Snapdragon 845, GPU: Adreno (TM) 630

Not reproducible with these devices:
VLNQA00335, Samsung Galaxy S20+ 5G (SM-G986B), Android 10, CPU: Exynos 990, GPU: Mali-G77
VLNQA00511, Samsung Galaxy S8 (SM-G950F), Android 9, CPU: Exynos 9 Octa 8895, GPU: Mali-G71
VLNQA00526, Samsung Galaxy A12 (SM-A125F), Android 12, CPU: MediaTek Helio P35 (MT6765), GPU: PowerVR Rogue GE8320
VLNQA00178, Xiaomi Redmi Note 4 (Redmi Note 4), Android 6.0, CPU: MediaTek Helio X20 MT6797M, GPU: Mali-T880
VLNQA00363, Samsung Galaxy Z Fold2 5G (SM-F916B), Android 12, CPU: Snapdragon 865 SM8250, GPU: Adreno (TM) 650
VLNQA00278, Xiaomi - (Redmi Note 7), Android 10, CPU: Snapdragon 660, GPU: Adreno (TM) 512

Could not test with these devices:
VLNQA00107, Huawei Nexus 6P (Nexus 6P), Android 8.1.0, CPU: Snapdragon 810 MSM8994, GPU: Adreno (TM) 430 (APK in the device does not open)
VLNQA00535, iPhone XS (MT9F2ET/A), CPU: Apple A12 Bionic, GPU: Apple designed, OS: 17.6.1 (No shadows appear with both “SAMPLE_TEXTURE2D_SHADOW“ and “SAMPLE_TEXTURE2D“)
VLNQA00416, iPhone 13 Pro (MLVA3ET/A), CPU: Apple A15 Bionic, GPU: Apple designed, OS: 16.1.1 (No shadows appear with both “SAMPLE_TEXTURE2D_SHADOW“ and “SAMPLE_TEXTURE2D“)

Workaround: Instead of “SAMPLE_TEXTURE2D_SHADOW(textureName, samplerName, coord3)“ use “SAMPLE_TEXTURE2D(textureName, samplerName, coord2)“ in the shader for manual comparison. Can be observed in the “ReproProject“ project, when the “switch shadow“ button is pressed

Notes:
- Could not test with the Editor and the Standalone build, the “Sphere(Clone)“ GameObject does not instantiate
- Only reproduces if the shadow caster, the “Sphere (Clone)“ is instantiated manually, if the “Sphere“ prefab is added to the scene, the shadows appear when using “SAMPLE_TEXTURE2D_SHADOW“
- Reproduces with both OpenGLES3 and Vulkan Graphic API’s

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.