Title: Distance Estimated Soft Shadow Banding Artifact Post by: Geometrian on May 05, 2013, 06:03:27 PM I'm getting banding artifacts in my soft shadow algorithm (functionally the same as that described by http://iquilezles.org/www/articles/rmshadows/rmshadows.htm (http://iquilezles.org/www/articles/rmshadows/rmshadows.htm)). Here's a render; notice the banding along shadow edges, especially in the main holes of the L1 sponge:
(http://img543.imageshack.us/img543/1264/menger.png) I don't know what the problem is, although I conjecture it might be because different rays' minimum distance estimates may not actually be the minimum distances of tangency. I'm sure this problem has been seen before; how is it solved? Thanks, -G Title: Re: Distance Estimated Soft Shadow Banding Artifact Post by: elphinstone on May 05, 2013, 06:21:59 PM Probably you have alread checked it... but are you sure that you are NOT using regular sampling? Usually these artifacts appear when you sample points on a regular grid. Jittered sampling can solve the problem. EDIT: I don't remember where and in which context, but I read somewhere that making the rays start at different positions can help solving similar problems. Code: rayOrigin = viewOrigin + rand(0.0, EPSILON) * rayDirection I hope this helps :) |