From 5cb4baa1ff8e76ffd4efba9b2a66b91a594c2c13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tur=C3=A1nszki=20J=C3=A1nos?= Date: Thu, 20 Jan 2022 14:29:18 +0100 Subject: [PATCH] ddgi update --- WickedEngine/shaders/ddgi_updateCS.hlsl | 10 +++++----- WickedEngine/wiVersion.cpp | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/WickedEngine/shaders/ddgi_updateCS.hlsl b/WickedEngine/shaders/ddgi_updateCS.hlsl index 1fd28735b..61f093584 100644 --- a/WickedEngine/shaders/ddgi_updateCS.hlsl +++ b/WickedEngine/shaders/ddgi_updateCS.hlsl @@ -12,9 +12,6 @@ PUSHCONSTANT(push, DDGIPushConstants); StructuredBuffer ddgiRayBuffer : register(t0); -static const uint CACHE_SIZE = 64; -groupshared DDGIRayDataPacked ray_cache[CACHE_SIZE]; - static const float WEIGHT_EPSILON = 0.0001; #ifdef DDGI_UPDATE_DEPTH @@ -25,6 +22,9 @@ static const uint THREADCOUNT = DDGI_COLOR_RESOLUTION; RWTexture2D output : register(u0); #endif // DDGI_UPDATE_DEPTH +static const uint CACHE_SIZE = THREADCOUNT * THREADCOUNT; +groupshared DDGIRayData ray_cache[CACHE_SIZE]; + [numthreads(THREADCOUNT, THREADCOUNT, 1)] void main(uint3 GTid : SV_GroupThreadID, uint3 Gid : SV_GroupID, uint groupIndex : SV_GroupIndex) { @@ -55,14 +55,14 @@ void main(uint3 GTid : SV_GroupThreadID, uint3 Gid : SV_GroupID, uint groupIndex if (groupIndex < num_rays) { - ray_cache[groupIndex] = ddgiRayBuffer[probeIndex * DDGI_MAX_RAYCOUNT + groupIndex + offset]; + ray_cache[groupIndex] = ddgiRayBuffer[probeIndex * DDGI_MAX_RAYCOUNT + groupIndex + offset].load(); } GroupMemoryBarrierWithGroupSync(); for (uint r = 0; r < num_rays; ++r) { - DDGIRayData ray = ray_cache[r].load(); + DDGIRayData ray = ray_cache[r]; #ifdef DDGI_UPDATE_DEPTH float ray_probe_distance; diff --git a/WickedEngine/wiVersion.cpp b/WickedEngine/wiVersion.cpp index e1c7e12fe..7eed9fe8f 100644 --- a/WickedEngine/wiVersion.cpp +++ b/WickedEngine/wiVersion.cpp @@ -9,7 +9,7 @@ namespace wi::version // minor features, major updates, breaking compatibility changes const int minor = 60; // minor bug fixes, alterations, refactors, updates - const int revision = 19; + const int revision = 20; const std::string version_string = std::to_string(major) + "." + std::to_string(minor) + "." + std::to_string(revision);