diff --git a/WickedEngine/shaders/ShaderInterop_Postprocess.h b/WickedEngine/shaders/ShaderInterop_Postprocess.h index 778fcbb83..7170a5b88 100644 --- a/WickedEngine/shaders/ShaderInterop_Postprocess.h +++ b/WickedEngine/shaders/ShaderInterop_Postprocess.h @@ -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 diff --git a/WickedEngine/shaders/volumetricCloud_renderCS.hlsl b/WickedEngine/shaders/volumetricCloud_renderCS.hlsl index 4f4f6db2b..40495fa2c 100644 --- a/WickedEngine/shaders/volumetricCloud_renderCS.hlsl +++ b/WickedEngine/shaders/volumetricCloud_renderCS.hlsl @@ -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]; diff --git a/WickedEngine/shaders/volumetricCloud_reprojectCS.hlsl b/WickedEngine/shaders/volumetricCloud_reprojectCS.hlsl index f19c45f4d..d38068756 100644 --- a/WickedEngine/shaders/volumetricCloud_reprojectCS.hlsl +++ b/WickedEngine/shaders/volumetricCloud_reprojectCS.hlsl @@ -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); diff --git a/WickedEngine/wiRenderer.cpp b/WickedEngine/wiRenderer.cpp index 29ffbf55e..ac061ebe8 100644 --- a/WickedEngine/wiRenderer.cpp +++ b/WickedEngine/wiRenderer.cpp @@ -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(); diff --git a/WickedEngine/wiVersion.cpp b/WickedEngine/wiVersion.cpp index 7c09a37ac..0fae23522 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 = 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);