Q&D trying to fix shadow terminator artefacts

been messing around in the brdf to get an extended or half lambert dot response for reverse light angles. trying to fix the “shadow terminator” artefacts on a demo model. how does one do that? any insight would be nice. i’m not a deferred nerd, yet.

came across this artefact aswell. currently a pure diffuse color response. i’m aware this is likely mesh normal precision. but this needs some adressing, aswell. the directional light looks okay. blocky, but okay. the point lamp throws some serious shadow artefacts tho, on a plain sphere test mesh. hmm…

When you say extended/ half lambert, what do you mean?

Also, the shadow terminator problem is pretty hard to solve for general cases. I think adobe’s Standard Shader paper had an implementation for path tracers?

1 Like

in forward rendering when you do a NoL dot product you get negative values for the angles facing away from the light. you can push those into the positive range by using the half lambert term. (it’s a source thing, just *.5 +.5 to get it there), but… this way you get access to the backside diffuse lobe. this crosses the shadow terminator and i would like to use it for some subsurface experiments. i have a good photo reference i wanna replicate in engine. : )

You’re doing subsurface scattering in the forward renderer? I’m very curious how you’re looking to implement that.

no… i’m not forward rendering. it was just an example. the half lambert should work in deferred aswell, tho. i modded the shader code the way it’s supposed to work, but it does not do it for some reason.

and subsurface in forward rendering is not hard. we used to flip the normals and got the passthru. the dot product covered the angularity and a texture blend does the intensity. shadow maps do occlusion. was faked good enough. i’m looking for more of a front and “side” surface normal response. that’s what the photo reference, i got, portraits very well.