ssr and raytraced reflections denoise improvement
This commit is contained in:
@@ -249,6 +249,7 @@ void main(uint3 DTid : SV_DispatchThreadID)
|
||||
|
||||
float4 H;
|
||||
float3 L;
|
||||
float jitter;
|
||||
if (roughness > 0.05f)
|
||||
{
|
||||
float3x3 tangentBasis = GetTangentBasis(N);
|
||||
@@ -314,19 +315,19 @@ void main(uint3 DTid : SV_DispatchThreadID)
|
||||
#endif
|
||||
|
||||
L = reflect(-V, H.xyz);
|
||||
jitter = InterleavedGradientNoise(DTid.xy, g_xFrame_FrameCount);
|
||||
}
|
||||
else
|
||||
{
|
||||
H = float4(N.xyz, 1.0f);
|
||||
L = reflect(-V, H.xyz);
|
||||
jitter = 0;
|
||||
}
|
||||
|
||||
float2 hitPixel = float2(0.0f, 0.0f);
|
||||
float3 hitPoint = float3(0.0f, 0.0f, 0.0f);
|
||||
float iterations = 0.0f;
|
||||
|
||||
float jitter = InterleavedGradientNoise(DTid.xy, g_xFrame_FrameCount);
|
||||
|
||||
bool hit = ScreenSpaceRayTrace(P, L, jitter, roughness, hitPixel, hitPoint, iterations);
|
||||
|
||||
float hitDepth = texture_depth.SampleLevel(sampler_point_clamp, hitPixel, 0);
|
||||
|
||||
@@ -96,6 +96,13 @@ void main(uint3 DTid : SV_DispatchThreadID, uint3 GTid : SV_GroupThreadID, uint3
|
||||
{
|
||||
const float2 uv = (DTid.xy + 0.5f) * xPPResolution_rcp;
|
||||
|
||||
const float roughness = texture_gbuffer1.SampleLevel(sampler_point_clamp, uv, 0).a;
|
||||
if (roughness < 0.05)
|
||||
{
|
||||
output[DTid.xy] = resolve_current[DTid.xy];
|
||||
return;
|
||||
}
|
||||
|
||||
const float2 velocity = texture_gbuffer2.SampleLevel(sampler_point_clamp, uv, 0).xy;
|
||||
const float2 prevUV = uv + velocity;
|
||||
if (!is_saturated(prevUV))
|
||||
|
||||
@@ -9,7 +9,7 @@ namespace wiVersion
|
||||
// minor features, major updates, breaking compatibility changes
|
||||
const int minor = 56;
|
||||
// minor bug fixes, alterations, refactors, updates
|
||||
const int revision = 0;
|
||||
const int revision = 1;
|
||||
|
||||
const std::string version_string = std::to_string(major) + "." + std::to_string(minor) + "." + std::to_string(revision);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user