Search Issue Tracker
Fixed in 2022.2.X
Compute Shader is not using defined constants when setting data with SetConstantBuffer
How to reproduce:
1. Open project "ComputeShaderSetConstantBuffer.zip"
2. Enter Play Mode
3. Observe the Console
For Dx11 / 12 API: Run the project as is with above instructions.
For Vullkan/Metal/OpenGL API's :
#pragma enable_cbuffer needs to be added right after #pragma kernel Execute in ComputeShaderSetConstantBufferTest.compute under \Assets directory else all tests will fail
Expected result: Console shows: "Result is 3. Should be: 3"
Actual result: Console shows: "Result is 0. Should be: 3"
- Reproducible on Windows and macOS
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
- Mouse inputs cannot be inputted when searching the Shortcuts Menu by type "Shortcut"
- "Debug Assertion Failed!" error when launching Windows Dedicated Server Player with Script Debugging enabled
- [Cinematic Studio][3D HDRP] Shader warnings thrown in the Console window when creating a new project with Cinematic Studio template
- Autoplay is triggered on Audio Assets when changing Asset Bundle tags
- Inspector Asset Bundle section has no indication for Variants, AssetBundle is written without a space, and Variant dropdown menu is available without setting the Asset Bundle first