2D Glow on object that is out of the viewport

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By 882039

I want a glow/shine effect on an object and the WorldEnviroment node works perfect but if the object is out of the cameras view the glow/shine instantly disappears. This is logical because there is no object to add a glow/shine effect to but I want to have a shine even if the object is just a few pixels out of the cameras view because now it looks bad/buggy when the object moves out of the screen.

:bust_in_silhouette: Reply From: Zylann

Correct, if objects don’t produce pixels in the viewport, they won’t glow even if that glow would have been visible. The same happens for various other screen-space effects, such as screen-space reflections which can’t capture what is behind the camera.

For glow, that would be a feature request for a sort of viewport “margin” in which a wider portion of the view is drawn to achieve such effect.
A workaround would be to render the world on a render-texture viewport at a slightly higher width, size and field of view, and draw the result as a full-screen texture rect, but cropped to match the normal field of view.