Skip to content

Commit

Permalink
- less history for smooth surfaces
Browse files Browse the repository at this point in the history
  • Loading branch information
sultim-t committed Apr 19, 2022
1 parent 17fdf9f commit b1eb3d8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Source/Shaders/CmSVGFTemporalAccumulation.comp
Original file line number Diff line number Diff line change
Expand Up @@ -228,12 +228,12 @@ void main()

// specular
{
// const float roughness = texelFetch(framebufMetallicRoughness_Sampler, pix, 0).g;
const float roughness = texelFetch(framebufMetallicRoughness_Sampler, pix, 0).g;

// antilagAlpha_Spec *= (1 - roughness) * 0.9 + 0.1;

specHistoryLength *= pow(1.0 - antilagAlpha_Spec, 5);
specHistoryLength = clamp(specHistoryLength + 1.0, 1.0, 64.0);
specHistoryLength = clamp(specHistoryLength + 1.0, 1.0, mix(8.0, 64.0, roughness));

const float minAlpha = 0.01;
float alphaColor = max(minAlpha, 1.0 / specHistoryLength);
Expand Down

0 comments on commit b1eb3d8

Please sign in to comment.