How to create object masks to use in Compositor Effects

Godot Version

v4.3.beta2.official [b75f0485b]

Question

How can I pass custom shader information to the render pipeline in order to mask objects.

I want to create different effects that require objects to be masked, for convenience I would like to use Compositor Effects for that:

  • Implement high contrast mode, where different items are colored depending on type (background white, character blue, interactives yellow)
  • Implement blur effect, but only on a region of the image
  • Implement flares around lights (the compositor needs to know what pixels are lights)

Apparently shaders don’t allow for custom output.


Example of High Contrast mode

Thanks!

1 Like

+1 to this, I have a lot of masking effects using multiple viewports that I would really like to convert to compositor effects