From 372136fe75e9f042d2284bae46d2879950f4d399 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Wed, 1 Jul 2020 14:18:13 +0200 Subject: Environment: Refactor code for readability + more - Makes all boolean setters/getters consistent. - Fixes bug where `glow_hdr_bleed_scale` was not used. - Split CameraEffects to their own source file. - Reorder all Environment method and properties declarations, definitions and bindings to be consistent with each other and with the order of property bindings. - Bind missing enum values added with SDFGI. - Remove unused SDFGI enhance_ssr boolean. - Sync doc changes after SDFGI merge and other misc changes. --- doc/classes/AcceptDialog.xml | 1 + doc/classes/CameraEffects.xml | 4 +- doc/classes/DisplayServer.xml | 4 +- doc/classes/Environment.xml | 80 ++++++++++++++++++++++++---------- doc/classes/FileSystemDock.xml | 18 ++++---- doc/classes/GIProbe.xml | 2 +- doc/classes/Image.xml | 9 ++++ doc/classes/Light3D.xml | 7 +-- doc/classes/MainLoop.xml | 16 +++++-- doc/classes/Node.xml | 26 ++++++----- doc/classes/ProjectSettings.xml | 14 +++--- doc/classes/ReflectionProbe.xml | 25 ++++++----- doc/classes/RenderingDevice.xml | 26 +++++++++++ doc/classes/RenderingServer.xml | 95 +++++++++++++++++++++++------------------ doc/classes/Viewport.xml | 13 +++--- 15 files changed, 222 insertions(+), 118 deletions(-) (limited to 'doc') diff --git a/doc/classes/AcceptDialog.xml b/doc/classes/AcceptDialog.xml index 99b566e74f..6b1864b679 100644 --- a/doc/classes/AcceptDialog.xml +++ b/doc/classes/AcceptDialog.xml @@ -67,6 +67,7 @@ The text displayed by the dialog. + diff --git a/doc/classes/CameraEffects.xml b/doc/classes/CameraEffects.xml index ea9ab85b80..7a874d31db 100644 --- a/doc/classes/CameraEffects.xml +++ b/doc/classes/CameraEffects.xml @@ -34,9 +34,9 @@ The length of the transition between the near blur and no-blur area. - The exposure override value to use. Higher values will result in a brighter scene. Only effective if [member override_exposure_enable] is [code]true[/code]. + The exposure override value to use. Higher values will result in a brighter scene. Only effective if [member override_exposure_enabled] is [code]true[/code]. - + If [code]true[/code], overrides the manual or automatic exposure defined in the [Environment] with the value in [member override_exposure]. diff --git a/doc/classes/DisplayServer.xml b/doc/classes/DisplayServer.xml index f8306cbd72..1fb1de2c12 100644 --- a/doc/classes/DisplayServer.xml +++ b/doc/classes/DisplayServer.xml @@ -44,9 +44,9 @@ - + - + diff --git a/doc/classes/Environment.xml b/doc/classes/Environment.xml index 3642d92771..bbab0bf8cf 100644 --- a/doc/classes/Environment.xml +++ b/doc/classes/Environment.xml @@ -24,7 +24,7 @@ Returns [code]true[/code] if the glow level [code]idx[/code] is specified, [code]false[/code] otherwise. - + @@ -46,7 +46,7 @@ The global contrast value of the rendered scene (default value is 1). Effective only if [code]adjustment_enabled[/code] is [code]true[/code]. - + If [code]true[/code], enables the [code]adjustment_*[/code] properties provided by this resource. If [code]false[/code], modifications to the [code]adjustment_*[/code] properties will have no effect on the rendered scene. @@ -65,7 +65,7 @@ - + If [code]true[/code], enables the tonemapping auto exposure mode of the scene renderer. If [code]true[/code], the renderer will automatically determine the exposure setting to adapt to the scene's illumination and the observed light. @@ -158,25 +158,25 @@ The glow intensity. When using the GLES2 renderer, this should be increased to 1.5 to compensate for the lack of HDR rendering. - + If [code]true[/code], the 1st level of glow is enabled. This is the most "local" level (least blurry). - + If [code]true[/code], the 2th level of glow is enabled. - + If [code]true[/code], the 3th level of glow is enabled. - + If [code]true[/code], the 4th level of glow is enabled. - + If [code]true[/code], the 5th level of glow is enabled. - + If [code]true[/code], the 6th level of glow is enabled. - + If [code]true[/code], the 7th level of glow is enabled. This is the most "global" level (blurriest). @@ -186,6 +186,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + The [Sky] resource used for this [Environment]. @@ -285,6 +309,18 @@ Use the [Sky] for reflections regardless of what the background is. + + Linear tonemapper operator. Reads the linear data and passes it on unmodified. + + + Reinhardt tonemapper operator. Performs a variation on rendered pixels' colors by this formula: [code]color = color / (1 + color)[/code]. + + + Filmic tonemapper operator. + + + Academy Color Encoding System tonemapper operator. + Additive glow blending mode. Mostly used for particles, glows (bloom), lens flare, bright sources. @@ -300,18 +336,6 @@ Mixes the glow with the underlying color to avoid increasing brightness as much while still maintaining a glow effect. - - Linear tonemapper operator. Reads the linear data and passes it on unmodified. - - - Reinhardt tonemapper operator. Performs a variation on rendered pixels' colors by this formula: [code]color = color / (1 + color)[/code]. - - - Filmic tonemapper operator. - - - Academy Color Encoding System tonemapper operator. - No blur for the screen-space ambient occlusion effect (fastest). @@ -324,5 +348,17 @@ 3×3 blur for the screen-space ambient occlusion effect. Increases the radius of the blur for a smoother look, but can result in checkerboard-like artifacts. + + + + + + + + + + + + diff --git a/doc/classes/FileSystemDock.xml b/doc/classes/FileSystemDock.xml index fdf29f89b2..c553f90e37 100644 --- a/doc/classes/FileSystemDock.xml +++ b/doc/classes/FileSystemDock.xml @@ -10,11 +10,11 @@ - + - + - + @@ -22,11 +22,11 @@ - + - + - + @@ -34,9 +34,9 @@ - + - + @@ -44,7 +44,7 @@ - + diff --git a/doc/classes/GIProbe.xml b/doc/classes/GIProbe.xml index 23dd562653..8885f360a3 100644 --- a/doc/classes/GIProbe.xml +++ b/doc/classes/GIProbe.xml @@ -19,7 +19,7 @@ - Bakes the effect from all [GeometryInstance3D]s marked with [constant GeometryInstance3D.GI_MODE_BAKED] and [Light3D]s marked with either [constant Light3D.BAKE_INDIRECT] or [constant Light3D.BAKE_ALL]. If [code]create_visual_debug[/code] is [code]true[/code], after baking the light, this will generate a [MultiMesh] that has a cube representing each solid cell with each cube colored to the cell's albedo color. This can be used to visualize the [GIProbe]'s data and debug any issues that may be occurring. + Bakes the effect from all [GeometryInstance3D]s marked with [constant GeometryInstance3D.GI_MODE_BAKED] and [Light3D]s marked with either [constant Light3D.BAKE_DYNAMIC] or [constant Light3D.BAKE_STATIC]. If [code]create_visual_debug[/code] is [code]true[/code], after baking the light, this will generate a [MultiMesh] that has a cube representing each solid cell with each cube colored to the cell's albedo color. This can be used to visualize the [GIProbe]'s data and debug any issues that may be occurring. diff --git a/doc/classes/Image.xml b/doc/classes/Image.xml index d29fcfd96f..5aa5de1dae 100644 --- a/doc/classes/Image.xml +++ b/doc/classes/Image.xml @@ -364,6 +364,15 @@ Loads an image from the binary contents of a PNG file. + + + + + + + Loads an image from the binary contents of a TGA file. + + diff --git a/doc/classes/Light3D.xml b/doc/classes/Light3D.xml index dda6faa80a..6979efa569 100644 --- a/doc/classes/Light3D.xml +++ b/doc/classes/Light3D.xml @@ -148,12 +148,9 @@ Light is ignored when baking. [b]Note:[/b] Hiding a light does [i]not[/i] affect baking. - - Only indirect lighting will be baked (default). + - - Both direct and indirect light will be baked. - [b]Note:[/b] You should hide the light if you don't want it to appear twice (dynamic and baked). + diff --git a/doc/classes/MainLoop.xml b/doc/classes/MainLoop.xml index 7bb478fce2..55ae54d12b 100644 --- a/doc/classes/MainLoop.xml +++ b/doc/classes/MainLoop.xml @@ -142,13 +142,21 @@ Notification received from the OS when an update of the Input Method Engine occurs (e.g. change of IME cursor position or composition string). Specific to the macOS platform. - - Notification received from the OS when the app is resumed. + + Notification received from the OS when the application is resumed. Specific to the Android platform. - - Notification received from the OS when the app is paused. + + Notification received from the OS when the application is paused. Specific to the Android platform. + + Notification received from the OS when the application is focused, i.e. when changing the focus from the OS desktop or a thirdparty application to any open window of the Godot instance. + Implemented on desktop platforms. + + + Notification received from the OS when the application is defocused, i.e. when changing the focus from any open window of the Godot instance to the OS desktop or a thirdparty application. + Implemented on desktop platforms. + diff --git a/doc/classes/Node.xml b/doc/classes/Node.xml index 9617ee0437..e921cbd58a 100644 --- a/doc/classes/Node.xml +++ b/doc/classes/Node.xml @@ -926,13 +926,11 @@ Notification received from the OS when the mouse leaves the game window. Implemented on desktop and web platforms. - - Notification received from the OS when the game window is focused. - Implemented on all platforms. + + Notification received from the OS when the node's parent [Window] is focused. This may be a change of focus between two windows of the same engine instance, or from the OS desktop or a third-party application to a window of the game (in which case [constant NOTIFICATION_APPLICATION_FOCUS_IN] is also emitted). - - Notification received from the OS when the game window is unfocused. - Implemented on all platforms. + + Notification received from the OS when the node's parent [Window] is defocused. This may be a change of focus between two windows of the same engine instance, or from a window of the game to the OS desktop or a third-party application (in which case [constant NOTIFICATION_APPLICATION_FOCUS_OUT] is also emitted). Notification received from the OS when a close request is sent (e.g. closing the window with a "Close" button or [kbd]Alt + F4[/kbd]). @@ -963,14 +961,22 @@ Notification received from the OS when an update of the Input Method Engine occurs (e.g. change of IME cursor position or composition string). Specific to the macOS platform. - - Notification received from the OS when the app is resumed. + + Notification received from the OS when the application is resumed. Specific to the Android platform. - - Notification received from the OS when the app is paused. + + Notification received from the OS when the application is paused. Specific to the Android platform. + + Notification received from the OS when the application is focused, i.e. when changing the focus from the OS desktop or a thirdparty application to any open window of the Godot instance. + Implemented on desktop platforms. + + + Notification received from the OS when the application is defocused, i.e. when changing the focus from any open window of the Godot instance to the OS desktop or a thirdparty application. + Implemented on desktop platforms. + Inherits pause mode from the node's parent. For the root node, it is equivalent to [constant PAUSE_MODE_STOP]. Default. diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml index 7191492098..799c4d2e75 100644 --- a/doc/classes/ProjectSettings.xml +++ b/doc/classes/ProjectSettings.xml @@ -1078,13 +1078,13 @@ Sets the screen-space antialiasing mode for the default screen [Viewport]. Screen-space antialiasing works by selectively blurring edges in a post-process shader. It differs from MSAA which takes multiple coverage samples while rendering objects. Screen-space AA methods are typically faster than MSAA and will smooth out specular aliasing, but tend to make scenes appear blurry. - Another way to combat specular aliasing is to enable [member rendering/quality/screen_filters/screen_space_roughness_limiter]. + Another way to combat specular aliasing is to enable [member rendering/quality/screen_filters/screen_space_roughness_limiter_enabled]. - - Enables the screen-space roughness limiter which increases material roughness in areas with a high normal frequency (i.e. when normals change a lot from pixel to pixel). This helps to reduce the amount of specular aliasing in a scene. Specular aliasing looks like random bright pixels that occur in reflections. + - - Curves the amount of the roughness limited effect. A higher value limits the effect to very sharply curved surfaces, while a lower threshold extends the effect to smoother surfaces. + + + Sets the quality for rough screen-space reflections. Turning off will make all screen space reflections sharp, while higher values make rough reflections look better. @@ -1152,6 +1152,10 @@ If [code]true[/code], uses nearest-neighbor mipmap filtering when using mipmaps (also called "bilinear filtering"), which will result in visible seams appearing between mipmap stages. This may increase performance in mobile as less memory bandwidth is used. If [code]false[/code], linear mipmap filtering (also called "trilinear filtering") is used. + + + + Thread model for rendering. Rendering on a thread can vastly improve performance, but synchronizing to the main thread can cause a bit more jitter. diff --git a/doc/classes/ReflectionProbe.xml b/doc/classes/ReflectionProbe.xml index 84f87c3e71..07d7b646a1 100644 --- a/doc/classes/ReflectionProbe.xml +++ b/doc/classes/ReflectionProbe.xml @@ -13,6 +13,12 @@ + + + + + + If [code]true[/code], enables box projection. This makes reflections look more correct in rectangle-shaped rooms by offsetting the reflection center depending on the camera's location. @@ -28,17 +34,8 @@ Defines the reflection intensity. Intensity modulates the strength of the reflection. - - Sets the ambient light color to be used when this probe is set to [member interior_enable]. - - - Sets the contribution value for how much the reflection affects the ambient light for this reflection probe when set to [member interior_enable]. Useful so that ambient light matches the color of the room. - - - Sets the energy multiplier for this reflection probe's ambient light contribution when set to [member interior_enable]. - - - If [code]true[/code], reflections will ignore sky contribution. Ambient lighting is then controlled by the [code]interior_ambient_*[/code] properties. + + If [code]true[/code], reflections will ignore sky contribution. Sets the max distance away from the probe an object can be before it is culled. @@ -57,5 +54,11 @@ Update the probe every frame. This is needed when you want to capture dynamic objects. However, it results in an increased render time. Use [constant UPDATE_ONCE] whenever possible. + + + + + + diff --git a/doc/classes/RenderingDevice.xml b/doc/classes/RenderingDevice.xml index 8a44d213e8..7e5df9c40d 100644 --- a/doc/classes/RenderingDevice.xml +++ b/doc/classes/RenderingDevice.xml @@ -152,6 +152,8 @@ + + @@ -188,6 +190,8 @@ + + @@ -293,6 +297,16 @@ + + + + + + + + + + @@ -301,6 +315,14 @@ + + + + + + + + @@ -496,6 +518,8 @@ + + @@ -1285,6 +1309,8 @@ + + diff --git a/doc/classes/RenderingServer.xml b/doc/classes/RenderingServer.xml index 8832c0ec4d..7539f8ff43 100644 --- a/doc/classes/RenderingServer.xml +++ b/doc/classes/RenderingServer.xml @@ -1470,6 +1470,16 @@ Sets whether to use a dual paraboloid or a cubemap for the shadow map. Dual paraboloid is faster but may suffer from artifacts. Equivalent to [member OmniLight3D.omni_shadow_mode]. + + + + + + + + + + @@ -1560,17 +1570,6 @@ Sets the color of the shadow cast by the light. Equivalent to [member Light3D.shadow_color]. - - - - - - - - - Sets whether GI probes capture light information from this light. - - @@ -2292,40 +2291,37 @@ To place in a scene, attach this reflection probe to an instance using [method instance_set_base] using the returned RID. - + - + - If [code]true[/code], reflections will ignore sky contribution. Equivalent to [member ReflectionProbe.interior_enable]. - + - + - Sets the render cull mask for this reflection probe. Only instances with a matching cull mask will be rendered by this probe. Equivalent to [member ReflectionProbe.cull_mask]. - + - + - If [code]true[/code], uses box projection. This can make reflections look more correct in certain situations. Equivalent to [member ReflectionProbe.box_projection]. - + @@ -2333,62 +2329,62 @@ - If [code]true[/code], computes shadows in the reflection probe. This makes the reflection much slower to compute. Equivalent to [member ReflectionProbe.enable_shadows]. + If [code]true[/code], reflections will ignore sky contribution. Equivalent to [member ReflectionProbe.interior]. - + - + - Sets the size of the area that the reflection probe will capture. Equivalent to [member ReflectionProbe.extents]. + Sets the render cull mask for this reflection probe. Only instances with a matching cull mask will be rendered by this probe. Equivalent to [member ReflectionProbe.cull_mask]. - + - + - Sets the intensity of the reflection probe. Intensity modulates the strength of the reflection. Equivalent to [member ReflectionProbe.intensity]. + If [code]true[/code], uses box projection. This can make reflections look more correct in certain situations. Equivalent to [member ReflectionProbe.box_projection]. - + - + - Sets the ambient light color for this reflection probe when set to interior mode. Equivalent to [member ReflectionProbe.interior_ambient_color]. + If [code]true[/code], computes shadows in the reflection probe. This makes the reflection much slower to compute. Equivalent to [member ReflectionProbe.enable_shadows]. - + - + - Sets the energy multiplier for this reflection probes ambient light contribution when set to interior mode. Equivalent to [member ReflectionProbe.interior_ambient_energy]. + Sets the size of the area that the reflection probe will capture. Equivalent to [member ReflectionProbe.extents]. - + - + - Sets the contribution value for how much the reflection affects the ambient light for this reflection probe when set to interior mode. Useful so that ambient light matches the color of the room. Equivalent to [member ReflectionProbe.interior_ambient_contrib]. + Sets the intensity of the reflection probe. Intensity modulates the strength of the reflection. Equivalent to [member ReflectionProbe.intensity]. @@ -3261,6 +3257,12 @@ Represents the size of the [enum LightParam] enum. + + + + + + Use a dual paraboloid shadow map for omni lights. @@ -3288,6 +3290,12 @@ Reflection probe will update each frame. This mode is necessary to capture moving objects. + + + + + + @@ -3412,13 +3420,16 @@ Draws the screen space ambient occlusion texture instead of the scene so that you can clearly see how it is affecting objects. In order for this display mode to work, you must have [member Environment.ssao_enabled] set in your [WorldEnvironment]. - - Draws the roughness limiter post process over the Viewport so you can see where it has an effect. It must be enabled in [member ProjectSettings.rendering/quality/screen_filters/screen_space_roughness_limiter] to work. - - + Colors each PSSM split for the [DirectionalLight3D]s in the scene a different color so you can see where the splits are. In order they will be colored red, green, blue, yellow. - + + + + + + + Uses high quality importance sampling to process the radiance map. In general, this results in much higher quality than [constant Sky.PROCESS_MODE_REALTIME] but takes much longer to generate. This should not be used if you plan on changing the sky at runtime. If you are finding that the reflection is not blurry enough and is showing sparkles or fireflies, try increasing [member ProjectSettings.rendering/quality/reflections/ggx_samples]. diff --git a/doc/classes/Viewport.xml b/doc/classes/Viewport.xml index 3b52c80c9a..8a2c6b73d8 100644 --- a/doc/classes/Viewport.xml +++ b/doc/classes/Viewport.xml @@ -377,15 +377,18 @@ Draws the screen-space ambient occlusion texture instead of the scene so that you can clearly see how it is affecting objects. In order for this display mode to work, you must have [member Environment.ssao_enabled] set in your [WorldEnvironment]. - - Draws the roughness limiter post process over the Viewport so you can see where it has an effect. It must be enabled in [member ProjectSettings.rendering/quality/screen_filters/screen_space_roughness_limiter] to work. - - + Colors each PSSM split for the [DirectionalLight3D]s in the scene a different color so you can see where the splits are. In order, they will be colored red, green, blue, and yellow. - + Draws the decal atlas used by [Decal]s and light projector textures in the upper left quadrant of the [Viewport]. + + + + + + The texture filter reads from the nearest pixel only. The simplest and fastest method of filtering, but the texture will look pixelized. -- cgit v1.2.3