diff options
Diffstat (limited to 'doc/classes/CanvasGroup.xml')
-rw-r--r-- | doc/classes/CanvasGroup.xml | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/doc/classes/CanvasGroup.xml b/doc/classes/CanvasGroup.xml index 37827defec..45f77ba484 100644 --- a/doc/classes/CanvasGroup.xml +++ b/doc/classes/CanvasGroup.xml @@ -8,9 +8,12 @@ [b]Note:[/b] The [CanvasGroup] uses a custom shader to read from the backbuffer to draw its children. Assigning a [Material] to the [CanvasGroup] overrides the builtin shader. To duplicate the behavior of the builtin shader in a custom [Shader] use the following: [codeblock] shader_type canvas_item; + render_mode unshaded; + + uniform sampler2D screen_texture : hint_screen_texture, repeat_disable, filter_nearest; void fragment() { - vec4 c = textureLod(SCREEN_TEXTURE, SCREEN_UV, 0.0); + vec4 c = textureLod(screen_texture, SCREEN_UV, 0.0); if (c.a > 0.0001) { c.rgb /= c.a; |