A Godot project for playing around with compositor effects.
Benchmarks
These benchmarks are rough estimates pulled from the Visual Debugger.
| Effect | Time |
|---|---|
| Stencil | ~0.03ms |
| Extraction | ~0.06ms |
| Jump Flood | ~0.5ms |
| Outline | ~0.02ms |
| Panini Projection | ~0.12ms |
Currently, Godot does not expose the stencil buffer to be sampled.
StencilEffectworks around this with 8 render passes - one per bit.- Each pass sets
compare_mask = reference = (1 << i)withCOMPARE_OP_EQUAL, isolating that bit as the pass condition. - Passing pixels write
(1 << i)as a float into the output texture - Additive blending (
ONE + ONE, BLEND_OP_ADD) accumulates all 8 passes into the final[0-255]output.
| Link | Description |
|---|---|
| Stencil Buffer Texture | Originally based on this. |
| CodePage12 | Font texture used for debug shader. |
Stencil → Extraction → Jump Flood → Outline
| Link | Description |
|---|---|
| Outline Shader - Roystan | One of the articles that inspired me to implement this after reading years ago. |
| Distance Field Outlines - Pink Arcana | First saw it when it came out in 2024. Great learning material. |
| Getting started with CompositorEffects and Compute shaders - Pink Arcana | Discussion on the above. |
| Before | After |
|---|---|
![]() |
![]() |
FOV = 130°
FSR 2.0 → Scaling = 2.0
| Link |
|---|
| Scene Data Include |
| Include Scene Data Virtually |
| Compute Shader Textures |



