# Tips ## Debanding Enabling the debanding anti-aliasing option in the project renderer settings will clear up banding in deep shadows. To enable this at runtime: ```python Viewport.use_debanding = true ``` This introduces a subtle dithering pattern which Godot warns increases screenshot sizes. Which is a non-issue when using [[Godot - Film Grain]]. Larger shadow atlases do not fix banding! ## Stylized Shadows ### Caustics with Dither Patterns ```c shader_type spatial; uniform float caustic = 5.0; // The higher this is, the more the light is focused in the effect. uniform sampler2D bayer; void fragment() { if (texture(bayer, FRAGCOORD.xy / 4.0).r > (1.0 - pow(dot(NORMAL, VIEW), caustic))) { discard; } } ``` ## Shadow Pop-In No settings intuitively alter the behavior of the shadows popping in at varying distances for very small shadows. - ! Figure this out later! # References See also: [[Image Dithering for Aesthetics]] ## Shadow Banding - https://www.reddit.com/r/godot/comments/tt4v1z/shadow_banding_on_large_objects/