From c6ef8fb6d4e5acc5d14cd0146c59e6c3bf7eb481 Mon Sep 17 00:00:00 2001 From: Hugo Locurcio Date: Fri, 11 Feb 2022 20:18:49 +0100 Subject: Improve documentation for `GeometryInstance3D.transparency` --- doc/classes/GeometryInstance3D.xml | 4 +++- doc/classes/RenderingServer.xml | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/doc/classes/GeometryInstance3D.xml b/doc/classes/GeometryInstance3D.xml index c03a2b8b7c..1029533e94 100644 --- a/doc/classes/GeometryInstance3D.xml +++ b/doc/classes/GeometryInstance3D.xml @@ -57,7 +57,9 @@ If a material is assigned to this property, it will be used instead of any material set in any material slot of the mesh. - Transparency applied to the whole geometry. In spatial shaders, transparency is set as the default value of the [code]ALPHA[/code] built-in. + The transparency applied to the whole geometry (as a multiplier of the materials' existing transparency). [code]0.0[/code] is fully opaque, while [code]1.0[/code] is fully transparent. Values greater than [code]0.0[/code] (exclusive) will force the geometry's materials to go through the transparent pipeline, which is slower to render and can exhibit rendering issues due to incorrect transparency sorting. However, unlike using a transparent material, setting [member transparency] to a value greater than [code]0.0[/code] (exclusive) will [i]not[/i] disable shadow rendering. + In spatial shaders, [code]1.0 - transparency[/code] is set as the default value of the [code]ALPHA[/code] built-in. + [b]Note:[/b] [member transparency] is clamped between [code]0.0[/code] and [code]1.0[/code], so this property cannot be used to make transparent materials more opaque than they originally are. Starting distance from which the GeometryInstance3D will be visible, taking [member visibility_range_begin_margin] into account as well. The default value of 0 is used to disable the range check. diff --git a/doc/classes/RenderingServer.xml b/doc/classes/RenderingServer.xml index 82436b10a5..8ef10d1be4 100644 --- a/doc/classes/RenderingServer.xml +++ b/doc/classes/RenderingServer.xml @@ -1455,6 +1455,9 @@ Sets the transparency for the given geometry instance. Equivalent to [member GeometryInstance3D.transparency]. + A transparency of [code]0.0[/code] is fully opaque, while [code]1.0[/code] is fully transparent. Values greater than [code]0.0[/code] (exclusive) will force the geometry's materials to go through the transparent pipeline, which is slower to render and can exhibit rendering issues due to incorrect transparency sorting. However, unlike using a transparent material, setting [code]transparency[/code] to a value greater than [code]0.0[/code] (exclusive) will [i]not[/i] disable shadow rendering. + In spatial shaders, [code]1.0 - transparency[/code] is set as the default value of the [code]ALPHA[/code] built-in. + [b]Note:[/b] [code]transparency[/code] is clamped between [code]0.0[/code] and [code]1.0[/code], so this property cannot be used to make transparent materials more opaque than they originally are. -- cgit v1.2.3