diff --git a/Content/Shaders/GI/GlobalSurfaceAtlas.flax b/Content/Shaders/GI/GlobalSurfaceAtlas.flax index c0ee573e0..1b0173ba5 100644 --- a/Content/Shaders/GI/GlobalSurfaceAtlas.flax +++ b/Content/Shaders/GI/GlobalSurfaceAtlas.flax @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:64a53e850ac662cb98ce91a8122dece7a43562f55a85c37f830f44324e4d16c5 -size 12925 +oid sha256:0f34bf867df5f4296ca66ac691c2bca4efa168fb9e21ca4e613e8086669575cf +size 13296 diff --git a/Source/Shaders/GI/GlobalSurfaceAtlas.shader b/Source/Shaders/GI/GlobalSurfaceAtlas.shader index 387620c5c..6778a7cd7 100644 --- a/Source/Shaders/GI/GlobalSurfaceAtlas.shader +++ b/Source/Shaders/GI/GlobalSurfaceAtlas.shader @@ -242,7 +242,7 @@ void CS_CullObjects(uint3 DispatchThreadId : SV_DispatchThreadID, uint3 GroupId if (BoxIntersectsSphere(groupMin, groupMax, objectBounds.xyz, objectBounds.w)) { uint sharedIndex; - InterlockedAdd(SharedCulledObjectsCount, 1, sharedIndex); + InterlockedAdd(SharedCulledObjectsCount, 1u, sharedIndex); if (sharedIndex < GLOBAL_SURFACE_ATLAS_SHARED_CULL_SIZE) SharedCulledObjects[sharedIndex] = objectAddress; } @@ -271,7 +271,7 @@ void CS_CullObjects(uint3 DispatchThreadId : SV_DispatchThreadID, uint3 GroupId // Allocate object data size in the buffer uint objectsStart; uint objectsSize = objectsCount + 1; // Include objects count before actual objects data - RWGlobalSurfaceAtlasCulledObjects.InterlockedAdd(0, objectsSize, objectsStart); // Counter at 0 + RWGlobalSurfaceAtlasCulledObjects.InterlockedAdd(0u, objectsSize, objectsStart); // Counter at 0 if (objectsStart + objectsSize > CulledObjectsCapacity) { // Not enough space in the buffer