# 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 - Shaders List#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!
## Detecting Shadow Shaders
```python
bool is_shadow_pass = PROJECTION_MATRIX[3][2] >= 1.0;
```
There is a functional builtin for this now, but I am not sure when it'll be released:
```python
IN_SHADOW_PASS
```
Also applying creative effects to shadows:
- https://bsky.app/profile/christinacoffin.bsky.social/post/3lqg6g7qswk2j
- https://github.com/godotengine/godot-proposals/issues/4443
- https://github.com/godotengine/godot-proposals/issues/11812
# References
See also: [[Image Dithering for Aesthetics]]
## Shadow Banding
- https://www.reddit.com/r/godot/comments/tt4v1z/shadow_banding_on_large_objects/