diff options
Diffstat (limited to 'doc/classes')
-rw-r--r-- | doc/classes/DisplayServer.xml | 10 | ||||
-rw-r--r-- | doc/classes/GeometryInstance3D.xml | 4 | ||||
-rw-r--r-- | doc/classes/PhysicalSkyMaterial.xml | 12 | ||||
-rw-r--r-- | doc/classes/ProceduralSkyMaterial.xml | 14 | ||||
-rw-r--r-- | doc/classes/RenderingServer.xml | 3 |
5 files changed, 27 insertions, 16 deletions
diff --git a/doc/classes/DisplayServer.xml b/doc/classes/DisplayServer.xml index ca3d1138b9..a6b854e36a 100644 --- a/doc/classes/DisplayServer.xml +++ b/doc/classes/DisplayServer.xml @@ -403,8 +403,14 @@ <return type="float" /> <argument index="0" name="screen" type="int" default="-1" /> <description> - Returns the current refresh rate of the specified screen. If [code]screen[/code] is [code]SCREEN_OF_MAIN_WINDOW[/code] (the default value), a screen with the main window will be used. - [b]Note:[/b] Returns [code]60.0[/code] if the DisplayServer fails to find the refresh rate for the specified screen. On HTML5, [method screen_get_refresh_rate] will always return [code]60.0[/code] as there is no way to retrieve the refresh rate on that platform. + Returns the current refresh rate of the specified screen. If [code]screen[/code] is [constant SCREEN_OF_MAIN_WINDOW] (the default value), a screen with the main window will be used. + [b]Note:[/b] Returns [code]-1.0[/code] if the DisplayServer fails to find the refresh rate for the specified screen. On HTML5, [method screen_get_refresh_rate] will always return [code]-1.0[/code] as there is no way to retrieve the refresh rate on that platform. + To fallback to a default refresh rate if the method fails, try: + [codeblock] + var refresh_rate = DisplayServer.screen_get_refresh_rate() + if refresh_rate < 0: + refresh_rate = 60.0 + [/codeblock] </description> </method> <method name="screen_get_scale" qualifiers="const"> 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. </member> <member name="transparency" type="float" setter="set_transparency" getter="get_transparency" default="0.0"> - 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. </member> <member name="visibility_range_begin" type="float" setter="set_visibility_range_begin" getter="get_visibility_range_begin" default="0.0"> 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/PhysicalSkyMaterial.xml b/doc/classes/PhysicalSkyMaterial.xml index e1e50a2b51..5f10cb3c82 100644 --- a/doc/classes/PhysicalSkyMaterial.xml +++ b/doc/classes/PhysicalSkyMaterial.xml @@ -17,14 +17,14 @@ <member name="exposure" type="float" setter="set_exposure" getter="get_exposure" default="0.1"> Sets the exposure of the sky. Higher exposure values make the entire sky brighter. </member> - <member name="ground_color" type="Color" setter="set_ground_color" getter="get_ground_color" default="Color(1, 1, 1, 1)"> + <member name="ground_color" type="Color" setter="set_ground_color" getter="get_ground_color" default="Color(0.1, 0.07, 0.034, 1)"> Modulates the [Color] on the bottom half of the sky to represent the ground. </member> <member name="mie_coefficient" type="float" setter="set_mie_coefficient" getter="get_mie_coefficient" default="0.005"> Controls the strength of mie scattering for the sky. Mie scattering results from light colliding with larger particles (like water). On earth, mie scattering results in a whitish color around the sun and horizon. </member> - <member name="mie_color" type="Color" setter="set_mie_color" getter="get_mie_color" default="Color(0.63, 0.77, 0.92, 1)"> - Controls the [Color] of the mie scattering effect. While not physically accurate, this allows for the creation of alien looking planets. + <member name="mie_color" type="Color" setter="set_mie_color" getter="get_mie_color" default="Color(0.69, 0.729, 0.812, 1)"> + Controls the [Color] of the mie scattering effect. While not physically accurate, this allows for the creation of alien-looking planets. </member> <member name="mie_eccentricity" type="float" setter="set_mie_eccentricity" getter="get_mie_eccentricity" default="0.8"> Controls the direction of the mie scattering. A value of [code]1[/code] means that when light hits a particle it's passing through straight forward. A value of [code]-1[/code] means that all light is scatter backwards. @@ -35,14 +35,14 @@ <member name="rayleigh_coefficient" type="float" setter="set_rayleigh_coefficient" getter="get_rayleigh_coefficient" default="2.0"> Controls the strength of the Rayleigh scattering. Rayleigh scattering results from light colliding with small particles. It is responsible for the blue color of the sky. </member> - <member name="rayleigh_color" type="Color" setter="set_rayleigh_color" getter="get_rayleigh_color" default="Color(0.26, 0.41, 0.58, 1)"> - Controls the [Color] of the Rayleigh scattering. While not physically accurate, this allows for the creation of alien looking planets. For example, setting this to a red [Color] results in a Mars looking atmosphere with a corresponding blue sunset. + <member name="rayleigh_color" type="Color" setter="set_rayleigh_color" getter="get_rayleigh_color" default="Color(0.3, 0.405, 0.6, 1)"> + Controls the [Color] of the Rayleigh scattering. While not physically accurate, this allows for the creation of alien-looking planets. For example, setting this to a red [Color] results in a Mars-looking atmosphere with a corresponding blue sunset. </member> <member name="sun_disk_scale" type="float" setter="set_sun_disk_scale" getter="get_sun_disk_scale" default="1.0"> Sets the size of the sun disk. Default value is based on Sol's perceived size from Earth. </member> <member name="turbidity" type="float" setter="set_turbidity" getter="get_turbidity" default="10.0"> - Sets the thickness of the atmosphere. High turbidity creates a foggy looking atmosphere, while a low turbidity results in a clearer atmosphere. + Sets the thickness of the atmosphere. High turbidity creates a foggy-looking atmosphere, while a low turbidity results in a clearer atmosphere. </member> </members> </class> diff --git a/doc/classes/ProceduralSkyMaterial.xml b/doc/classes/ProceduralSkyMaterial.xml index e3db74894b..dc6ead1b01 100644 --- a/doc/classes/ProceduralSkyMaterial.xml +++ b/doc/classes/ProceduralSkyMaterial.xml @@ -11,7 +11,7 @@ <tutorials> </tutorials> <members> - <member name="ground_bottom_color" type="Color" setter="set_ground_bottom_color" getter="get_ground_bottom_color" default="Color(0.12, 0.12, 0.13, 1)"> + <member name="ground_bottom_color" type="Color" setter="set_ground_bottom_color" getter="get_ground_bottom_color" default="Color(0.2, 0.169, 0.133, 1)"> Color of the ground at the bottom. Blends with [member ground_horizon_color]. </member> <member name="ground_curve" type="float" setter="set_ground_curve" getter="get_ground_curve" default="0.02"> @@ -20,25 +20,25 @@ <member name="ground_energy" type="float" setter="set_ground_energy" getter="get_ground_energy" default="1.0"> Amount of energy contribution from the ground. </member> - <member name="ground_horizon_color" type="Color" setter="set_ground_horizon_color" getter="get_ground_horizon_color" default="Color(0.37, 0.33, 0.31, 1)"> + <member name="ground_horizon_color" type="Color" setter="set_ground_horizon_color" getter="get_ground_horizon_color" default="Color(0.6463, 0.6558, 0.6708, 1)"> Color of the ground at the horizon. Blends with [member ground_bottom_color]. </member> - <member name="sky_curve" type="float" setter="set_sky_curve" getter="get_sky_curve" default="0.09"> + <member name="sky_curve" type="float" setter="set_sky_curve" getter="get_sky_curve" default="0.15"> How quickly the [member sky_horizon_color] fades into the [member sky_top_color]. </member> <member name="sky_energy" type="float" setter="set_sky_energy" getter="get_sky_energy" default="1.0"> Amount of energy contribution from the sky. </member> - <member name="sky_horizon_color" type="Color" setter="set_sky_horizon_color" getter="get_sky_horizon_color" default="Color(0.55, 0.69, 0.81, 1)"> + <member name="sky_horizon_color" type="Color" setter="set_sky_horizon_color" getter="get_sky_horizon_color" default="Color(0.6463, 0.6558, 0.6708, 1)"> Color of the sky at the horizon. Blends with [member sky_top_color]. </member> - <member name="sky_top_color" type="Color" setter="set_sky_top_color" getter="get_sky_top_color" default="Color(0.35, 0.46, 0.71, 1)"> + <member name="sky_top_color" type="Color" setter="set_sky_top_color" getter="get_sky_top_color" default="Color(0.385, 0.454, 0.55, 1)"> Color of the sky at the top. Blends with [member sky_horizon_color]. </member> - <member name="sun_angle_max" type="float" setter="set_sun_angle_max" getter="get_sun_angle_max" default="100.0"> + <member name="sun_angle_max" type="float" setter="set_sun_angle_max" getter="get_sun_angle_max" default="30.0"> Distance from center of sun where it fades out completely. </member> - <member name="sun_curve" type="float" setter="set_sun_curve" getter="get_sun_curve" default="0.05"> + <member name="sun_curve" type="float" setter="set_sun_curve" getter="get_sun_curve" default="0.15"> How quickly the sun fades away between the edge of the sun disk and [member sun_angle_max]. </member> </members> 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 @@ <argument index="1" name="transparency" type="float" /> <description> 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. </description> </method> <method name="instance_geometry_set_visibility_range"> |