Skip to content

Commit

Permalink
Switch to relative depth weighting for bilateral blur
Browse files Browse the repository at this point in the history
Still not ideal, but maybe closer to how it should be?
  • Loading branch information
zeux committed Dec 20, 2024
1 parent 63e132c commit d01a31a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/shaders/shadowblur.comp.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ void main()

float gw = exp2(-abs(i) / 10);
float dv = znear / texelFetch(depthImage, uvoff, 0).r;
float dw = exp2(-abs(depth - dv) * 20);
float dw = exp2(-abs(depth / dv - 1) * 200);
float fw = gw * dw;

shadow += texelFetch(shadowImage, uvoff, 0).r * fw;
Expand Down

0 comments on commit d01a31a

Please sign in to comment.