Search Issue Tracker

Won't Fix

Unknown (hidden) 2020.3.X, 2021.3.X, 2022.1.X, 2022.2.X, 2023.1.X

Votes

3

Found in

2020.3.39f1

2021.3.8f1

2022.1.14f1

2022.2.0b6

2023.1.0a8

Issue ID

UUM-12646

Regression

No

Compute Shaders rendering incorrectly when using Vulkan Graphics API for Windows

-

Reproduction steps:
1. Open the user’s attached project
2. Click Edit > Project Settings > Player > Other Settings
3. Switch to Vulkan under Graphics API for Windows
4. Wait for Unity Editor to restart
5. Open the “Assets/instancer/_Scene.unity” scene
6. Enter Play Mode
7. Observe the spheres on the “floor” GameObject

Expected result: No gaps between spheres
Actual result: Gaps between spheres

Reproducible with: 2020.3.39f1, 2021.3.8f1, 2022.1.14f1, 2022.2.0b6, 2023.1.0a8

Reproducible on: Windows 10 Pro 21H2

Note: Does not reproduce when using D3D11/12.

  1. Resolution Note:

    This is not necessarily a bug in Unity but more of a discrepancy between graphics APIs.

    The shader keyword unity_InstanceID is translated into gl_InstanceIndex when using Vulkan and this index does not start from 0 and it implicitly has a base. See https://github.com/KhronosGroup/GLSL/blob/master/extensions/khr/GL_KHR_vulkan_glsl.txt line #1650.

    Therefore, manually adding a base offset to the instance ID in this case would shift the instance ID out of bound and create the 'gap' between LODs.

    (Please refer to my last comment for a fix to the issue)

  2. Resolution Note (2023.1.X):

    Won't fix. This is not necessarily a bug in Unity, but rather part of how Vulkan works.

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.