Cyanilux / URP_ShaderGraphCustomLighting

Some custom lighting functions/sub-graphs for Shader Graph, Universal Render Pipeline
MIT License
558 stars 63 forks source link

Depth and Normal Bias don't seem to affect the result #3

Closed tyunderwood closed 3 years ago

tyunderwood commented 3 years ago

image Artifacting seems to not be resolvable by tweaking depth and normal bias. Am I missing something or is this not implemented?

Thanks

Cyanilux commented 3 years ago

As in the depth/normal biases aren't affecting the result at all? The biases aren't implemented in my code as they should be handled in the ShadowCaster pass. Shader Graph already handles it automatically. If you're writing shader code though, you'll want to make sure that pass uses the ApplyShadowBias function from Shadows.hlsl. (see ShadowCastPass.hlsl for example)

I think this might just be how shadows look in URP so not sure I can help. Can try increasing the shadow quality or cascades settings. Maybe smoothing the terrain out a bit. Textures, diffuse (e.g. N dot L) and ambient lighting can also hide the artifacts a bit.