diff --git a/src/core/src/render_techniques/gi10/gi10.comp b/src/core/src/render_techniques/gi10/gi10.comp index aa19c6b..dbec14b 100644 --- a/src/core/src/render_techniques/gi10/gi10.comp +++ b/src/core/src/render_techniques/gi10/gi10.comp @@ -629,8 +629,8 @@ void PatchScreenProbes(in uint did : SV_DispatchThreadID) [numthreads(64, 1, 1)] void SampleScreenProbes(in uint did : SV_DispatchThreadID, in uint local_id : SV_GroupThreadID) { - uint max_probe_spawn_count = (g_BufferDimensions.x + g_ScreenProbesConstants.probe_spawn_tile_size - 1) / g_ScreenProbesConstants.probe_spawn_tile_size - * (g_BufferDimensions.y + g_ScreenProbesConstants.probe_spawn_tile_size - 1) / g_ScreenProbesConstants.probe_spawn_tile_size; + uint max_probe_spawn_count = ((g_BufferDimensions.x + g_ScreenProbesConstants.probe_spawn_tile_size - 1) / g_ScreenProbesConstants.probe_spawn_tile_size) + * ((g_BufferDimensions.y + g_ScreenProbesConstants.probe_spawn_tile_size - 1) / g_ScreenProbesConstants.probe_spawn_tile_size); uint probe_count = g_ScreenProbes_ProbeSpawnScanBuffer[max_probe_spawn_count - 1] + g_ScreenProbes_ProbeSpawnIndexBuffer[max_probe_spawn_count - 1]; @@ -1096,8 +1096,8 @@ void PopulateScreenProbesTraceRay(uint did, inout PopulateScreenProbesPayload pa void PopulateScreenProbes(uint did) { - uint max_probe_spawn_count = (g_BufferDimensions.x + g_ScreenProbesConstants.probe_spawn_tile_size - 1) / g_ScreenProbesConstants.probe_spawn_tile_size - * (g_BufferDimensions.y + g_ScreenProbesConstants.probe_spawn_tile_size - 1) / g_ScreenProbesConstants.probe_spawn_tile_size; + uint max_probe_spawn_count = ((g_BufferDimensions.x + g_ScreenProbesConstants.probe_spawn_tile_size - 1) / g_ScreenProbesConstants.probe_spawn_tile_size) + * ((g_BufferDimensions.y + g_ScreenProbesConstants.probe_spawn_tile_size - 1) / g_ScreenProbesConstants.probe_spawn_tile_size); uint probe_count = g_ScreenProbes_ProbeSpawnScanBuffer[max_probe_spawn_count - 1] + g_ScreenProbes_ProbeSpawnIndexBuffer[max_probe_spawn_count - 1]; @@ -1162,8 +1162,8 @@ void PopulateScreenProbesMain(in uint did : SV_DispatchThreadID) [numthreads(64, 1, 1)] void BlendScreenProbes(in uint did : SV_DispatchThreadID, in uint local_id : SV_GroupThreadID) { - uint max_probe_spawn_count = (g_BufferDimensions.x + g_ScreenProbesConstants.probe_spawn_tile_size - 1) / g_ScreenProbesConstants.probe_spawn_tile_size - * (g_BufferDimensions.y + g_ScreenProbesConstants.probe_spawn_tile_size - 1) / g_ScreenProbesConstants.probe_spawn_tile_size; + uint max_probe_spawn_count = ((g_BufferDimensions.x + g_ScreenProbesConstants.probe_spawn_tile_size - 1) / g_ScreenProbesConstants.probe_spawn_tile_size) + * ((g_BufferDimensions.y + g_ScreenProbesConstants.probe_spawn_tile_size - 1) / g_ScreenProbesConstants.probe_spawn_tile_size); uint probe_count = g_ScreenProbes_ProbeSpawnScanBuffer[max_probe_spawn_count - 1] + g_ScreenProbes_ProbeSpawnIndexBuffer[max_probe_spawn_count - 1]; @@ -1352,8 +1352,8 @@ void ReorderScreenProbes(in uint did : SV_DispatchThreadID) [numthreads(64, 1, 1)] void FilterScreenProbes(in uint did : SV_DispatchThreadID) { - uint max_probe_spawn_count = (g_BufferDimensions.x + g_ScreenProbesConstants.probe_spawn_tile_size - 1) / g_ScreenProbesConstants.probe_spawn_tile_size - * (g_BufferDimensions.y + g_ScreenProbesConstants.probe_spawn_tile_size - 1) / g_ScreenProbesConstants.probe_spawn_tile_size; + uint max_probe_spawn_count = ((g_BufferDimensions.x + g_ScreenProbesConstants.probe_spawn_tile_size - 1) / g_ScreenProbesConstants.probe_spawn_tile_size) + * ((g_BufferDimensions.y + g_ScreenProbesConstants.probe_spawn_tile_size - 1) / g_ScreenProbesConstants.probe_spawn_tile_size); uint probe_count = g_ScreenProbes_ProbeSpawnScanBuffer[max_probe_spawn_count - 1] + g_ScreenProbes_ProbeSpawnIndexBuffer[max_probe_spawn_count - 1]; @@ -1441,8 +1441,8 @@ void FilterScreenProbes(in uint did : SV_DispatchThreadID) [numthreads(64, 1, 1)] void ProjectScreenProbes(in uint did : SV_DispatchThreadID, in uint local_id : SV_GroupThreadID) { - uint max_probe_spawn_count = (g_BufferDimensions.x + g_ScreenProbesConstants.probe_spawn_tile_size - 1) / g_ScreenProbesConstants.probe_spawn_tile_size - * (g_BufferDimensions.y + g_ScreenProbesConstants.probe_spawn_tile_size - 1) / g_ScreenProbesConstants.probe_spawn_tile_size; + uint max_probe_spawn_count = ((g_BufferDimensions.x + g_ScreenProbesConstants.probe_spawn_tile_size - 1) / g_ScreenProbesConstants.probe_spawn_tile_size) + * ((g_BufferDimensions.y + g_ScreenProbesConstants.probe_spawn_tile_size - 1) / g_ScreenProbesConstants.probe_spawn_tile_size); uint probe_count = g_ScreenProbes_ProbeSpawnScanBuffer[max_probe_spawn_count - 1] + g_ScreenProbes_ProbeSpawnIndexBuffer[max_probe_spawn_count - 1]; diff --git a/src/core/src/render_techniques/gi10/gi10.cpp b/src/core/src/render_techniques/gi10/gi10.cpp index 9260d62..936ed28 100644 --- a/src/core/src/render_techniques/gi10/gi10.cpp +++ b/src/core/src/render_techniques/gi10/gi10.cpp @@ -108,8 +108,8 @@ void GI10::ScreenProbes::ensureMemoryIsAllocated(CapsaicinInternal const &capsai uint32_t const probe_mask_mip_count = gfxCalculateMipCount(probe_count[0], probe_count[1]); uint32_t const max_probe_count = probe_count[0] * probe_count[1]; - max_probe_spawn_count = (buffer_width + probe_spawn_tile_size_ - 1) / probe_spawn_tile_size_ - * (buffer_height + probe_spawn_tile_size_ - 1) / probe_spawn_tile_size_; + max_probe_spawn_count = ((buffer_width + probe_spawn_tile_size_ - 1) / probe_spawn_tile_size_) + * ((buffer_height + probe_spawn_tile_size_ - 1) / probe_spawn_tile_size_); max_ray_count = max_probe_spawn_count * probe_size_ * probe_size_;