volumetric clouds frame mismatch fix

This commit is contained in:
Turánszki János
2025-01-07 11:39:38 +01:00
parent 39ef56b439
commit 3b779d8d3e
5 changed files with 5 additions and 5 deletions
@@ -67,7 +67,7 @@ static const uint POSTPROCESS_HBAO_THREADCOUNT = 320;
#define hbao_uv_to_view_A postprocess.params1.xy
#define hbao_uv_to_view_B postprocess.params1.zw
#define volumetricclouds_frame postprocess.params0.z
#define volumetricclouds_frame postprocess.params1.x
static const uint POSTPROCESS_MSAO_BLOCKSIZE = 16;
struct MSAO
@@ -762,7 +762,7 @@ void main(uint3 DTid : SV_DispatchThreadID)
{
const uint2 halfResIndexToCoordinateOffset[4] = { uint2(0, 0), uint2(1, 0), uint2(0, 1), uint2(1, 1) };
int subPixelIndex = GetFrame().frame_count % 4;
int subPixelIndex = uint(volumetricclouds_frame) % 4;
int checkerBoardIndex = ComputeCheckerBoardIndex(DTid.xy, subPixelIndex);
uint2 halfResCoord = DTid.xy * 2 + halfResIndexToCoordinateOffset[checkerBoardIndex];
@@ -175,7 +175,7 @@ void main(uint3 DTid : SV_DispatchThreadID)
for (int x = -1; x <= 1; x++)
{
// If it's middle then skip. We only evaluate neighbor samples
if ((abs(x) + abs(y)) == 0)
if (x == 0 && y == 0)
continue;
int2 offset = int2(x, y);
+1 -1
View File
@@ -16064,6 +16064,7 @@ void Postprocess_VolumetricClouds(
postprocess.resolution.y = res.final_resolution.y / 4;
postprocess.resolution_rcp.x = 1.0f / postprocess.resolution.x;
postprocess.resolution_rcp.y = 1.0f / postprocess.resolution.y;
volumetricclouds_frame = (float)res.frame;
// Parse reproject info
postprocess.params0.x = (float)res.texture_reproject[0].GetDesc().width;
@@ -16128,7 +16129,6 @@ void Postprocess_VolumetricClouds(
postprocess.resolution.y = res.final_resolution.y / 2;
postprocess.resolution_rcp.x = 1.0f / postprocess.resolution.x;
postprocess.resolution_rcp.y = 1.0f / postprocess.resolution.y;
volumetricclouds_frame = (float)res.frame;
int temporal_output = res.GetTemporalOutputIndex();
int temporal_history = res.GetTemporalInputIndex();
+1 -1
View File
@@ -9,7 +9,7 @@ namespace wi::version
// minor features, major updates, breaking compatibility changes
const int minor = 71;
// minor bug fixes, alterations, refactors, updates
const int revision = 648;
const int revision = 649;
const std::string version_string = std::to_string(major) + "." + std::to_string(minor) + "." + std::to_string(revision);