From b7b46093d84b33e925fbfa1c096eb0a99c7a665c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Mon, 20 Apr 2020 11:48:00 +0200 Subject: [PATCH] doc: Sync classref with current source Add missing enum bindings. --- doc/classes/@GlobalScope.xml | 38 +++--- doc/classes/BaseMaterial3D.xml | 2 +- doc/classes/DynamicFont.xml | 2 +- doc/classes/EditorInspector.xml | 6 + doc/classes/EditorProperty.xml | 8 ++ doc/classes/GeometryInstance3D.xml | 18 +++ doc/classes/GraphEdit.xml | 6 + doc/classes/HSlider.xml | 2 + doc/classes/JNISingleton.xml | 13 ++ doc/classes/Light3D.xml | 3 + doc/classes/PhysicalBone3D.xml | 20 ++- doc/classes/ProjectSettings.xml | 2 + doc/classes/RenderingServer.xml | 181 ++++++++++++++++++++++++-- doc/classes/ShaderGlobalsOverride.xml | 13 ++ doc/classes/SubViewport.xml | 24 ++-- doc/classes/VSlider.xml | 2 + doc/classes/Viewport.xml | 55 ++++---- scene/3d/light_3d.cpp | 1 + scene/main/viewport.cpp | 34 ++--- scene/main/viewport.h | 1 - servers/rendering_server.cpp | 39 +++++- servers/rendering_server.h | 36 +++-- 22 files changed, 397 insertions(+), 109 deletions(-) create mode 100644 doc/classes/JNISingleton.xml create mode 100644 doc/classes/ShaderGlobalsOverride.xml diff --git a/doc/classes/@GlobalScope.xml b/doc/classes/@GlobalScope.xml index f462aa989d9..03176af8db2 100644 --- a/doc/classes/@GlobalScope.xml +++ b/doc/classes/@GlobalScope.xml @@ -12,9 +12,6 @@ - - The [XRServer] singleton. - The [AudioServer] singleton. @@ -95,6 +92,9 @@ The [VisualScriptEditor] singleton. + + The [XRServer] singleton. + @@ -1345,52 +1345,52 @@ Deprecated hint, unused. - + Deprecated hint, unused. - + Hints that an integer property is a bitmask with named bit flags. For example, to allow toggling bits 0, 1, 2 and 4, the hint could be something like [code]"Bit0,Bit1,Bit2,,Bit4"[/code]. - + Hints that an integer property is a bitmask using the optionally named 2D render layers. - + Hints that an integer property is a bitmask using the optionally named 2D physics layers. - + Hints that an integer property is a bitmask using the optionally named 3D render layers. - + Hints that an integer property is a bitmask using the optionally named 3D physics layers. - + Hints that a string property is a path to a file. Editing it will show a file dialog for picking the path. The hint string can be a set of filters with wildcards like [code]"*.png,*.jpg"[/code]. - + Hints that a string property is a path to a directory. Editing it will show a file dialog for picking the path. - + Hints that a string property is an absolute path to a file outside the project folder. Editing it will show a file dialog for picking the path. The hint string can be a set of filters with wildcards like [code]"*.png,*.jpg"[/code]. - + Hints that a string property is an absolute path to a directory outside the project folder. Editing it will show a file dialog for picking the path. - + Hints that a property is an instance of a [Resource]-derived type, optionally specified via the hint string (e.g. [code]"Texture2D"[/code]). Editing it will show a popup menu of valid resource types to instantiate. - + Hints that a string property is text with line breaks. Editing it will show a text input field where line breaks can be typed. - + Hints that a string property should have a placeholder text visible on its input field, whenever the property is empty. The hint string is the placeholder text to use. - + Hints that a color property should be edited without changing its alpha component, i.e. only R, G and B channels are edited. - + Hints that an image is compressed using lossy compression. - + Hints that an image is compressed using lossless compression. diff --git a/doc/classes/BaseMaterial3D.xml b/doc/classes/BaseMaterial3D.xml index 145809aabca..76abc31451f 100644 --- a/doc/classes/BaseMaterial3D.xml +++ b/doc/classes/BaseMaterial3D.xml @@ -440,7 +440,7 @@ Texture specifying per-pixel detail normal. - Texture holding, ambient occlusion, roughness, and metallic. + Texture holding ambient occlusion, roughness, and metallic. Represents the size of the [enum TextureParam] enum. diff --git a/doc/classes/DynamicFont.xml b/doc/classes/DynamicFont.xml index 11610fa523c..0864c3ba36e 100644 --- a/doc/classes/DynamicFont.xml +++ b/doc/classes/DynamicFont.xml @@ -12,7 +12,7 @@ dynamic_font.size = 64 $"Label".set("custom_fonts/font", dynamic_font) [/codeblock] - [b]Note:[/b] DynamicFont doesn't support features such as right-to-left typesetting, ligatures, text shaping, variable fonts and optional font features yet. If you wish to "bake" an optional font feature into a TTF font file, you can use [url=https://fontforge.org/]FontForge[/url] to do so. In FontForge, use [b]File > Generate Fonts[/b], click [b]Options[/b], choose the desired features then generate the font. + [b]Note:[/b] DynamicFont doesn't support features such as right-to-left typesetting, ligatures, text shaping, variable fonts and optional font features yet. If you wish to "bake" an optional font feature into a TTF font file, you can use [url=https://fontforge.org/]FontForge[/url] to do so. In FontForge, use [b]File > Generate Fonts[/b], click [b]Options[/b], choose the desired features then generate the font. diff --git a/doc/classes/EditorInspector.xml b/doc/classes/EditorInspector.xml index 61d240c1dcd..99a78d147c6 100644 --- a/doc/classes/EditorInspector.xml +++ b/doc/classes/EditorInspector.xml @@ -26,6 +26,12 @@ + + + + + + diff --git a/doc/classes/EditorProperty.xml b/doc/classes/EditorProperty.xml index 3216541b206..4da3b58b944 100644 --- a/doc/classes/EditorProperty.xml +++ b/doc/classes/EditorProperty.xml @@ -78,6 +78,8 @@ Used by the inspector, when the property is checked. + + Used by the inspector, when the property must draw with error color. @@ -128,6 +130,12 @@ Emitted when a property was checked. Used internally. + + + + + + diff --git a/doc/classes/GeometryInstance3D.xml b/doc/classes/GeometryInstance3D.xml index 7df5f0ea50d..518a1729731 100644 --- a/doc/classes/GeometryInstance3D.xml +++ b/doc/classes/GeometryInstance3D.xml @@ -18,6 +18,14 @@ Returns the [enum GeometryInstance3D.Flags] that have been set for this object. + + + + + + + + @@ -38,6 +46,16 @@ Sets the [enum GeometryInstance3D.Flags] specified. See [enum GeometryInstance3D.Flags] for options. + + + + + + + + + + diff --git a/doc/classes/GraphEdit.xml b/doc/classes/GraphEdit.xml index c41ffd4bff1..750ac8085cd 100644 --- a/doc/classes/GraphEdit.xml +++ b/doc/classes/GraphEdit.xml @@ -273,6 +273,12 @@ Emitted when a GraphNode is selected. + + + + + + Emitted when the user presses [code]Ctrl + V[/code]. diff --git a/doc/classes/HSlider.xml b/doc/classes/HSlider.xml index 27389580583..afe9d10d2ed 100644 --- a/doc/classes/HSlider.xml +++ b/doc/classes/HSlider.xml @@ -19,6 +19,8 @@ The background of the area to the left of the grabber. + + The texture for the grabber when it's disabled. diff --git a/doc/classes/JNISingleton.xml b/doc/classes/JNISingleton.xml new file mode 100644 index 00000000000..84ab1a49c11 --- /dev/null +++ b/doc/classes/JNISingleton.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/doc/classes/Light3D.xml b/doc/classes/Light3D.xml index ef9c3b49b78..cb21db2d00a 100644 --- a/doc/classes/Light3D.xml +++ b/doc/classes/Light3D.xml @@ -99,6 +99,9 @@ Constant for accessing [member OmniLight3D.omni_range] or [member SpotLight3D.spot_range]. + + Constant for accessing [member light_size]. + Constant for accessing [member OmniLight3D.omni_attenuation] or [member SpotLight3D.spot_attenuation]. diff --git a/doc/classes/PhysicalBone3D.xml b/doc/classes/PhysicalBone3D.xml index 75f1f3eab4a..58930aae37d 100644 --- a/doc/classes/PhysicalBone3D.xml +++ b/doc/classes/PhysicalBone3D.xml @@ -25,6 +25,14 @@ + + + + + + + + @@ -43,6 +51,16 @@ + + + + + + + + + + @@ -84,7 +102,7 @@ Sets the joint's transform. - + Sets the joint's rotation in radians. diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml index b327819a153..7edbd227560 100644 --- a/doc/classes/ProjectSettings.xml +++ b/doc/classes/ProjectSettings.xml @@ -974,6 +974,8 @@ [Environment] that will be used as a fallback environment in case a scene does not specify its own environment. The default environment is loaded in at scene load time regardless of whether you have set an environment or not. If you do not rely on the fallback environment, it is best to delete [code]default_env.tres[/code], or to specify a different default environment here. + + Max amount of elements renderable in a frame. If more than this are visible per frame, they will be dropped. Keep in mind elements refer to mesh surfaces and not meshes themselves. diff --git a/doc/classes/RenderingServer.xml b/doc/classes/RenderingServer.xml index 7dd5e8bd8de..4e0762a68bd 100644 --- a/doc/classes/RenderingServer.xml +++ b/doc/classes/RenderingServer.xml @@ -947,6 +947,58 @@ Returns the id of a white texture. Creates one if none exists. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -3110,12 +3162,6 @@ Unused enum in Godot 3.x. - - The minimum renderpriority of all materials. - - - The maximum renderpriority of all materials. - @@ -3149,6 +3195,12 @@ Represents the size of the [enum ShaderMode] enum. + + The minimum renderpriority of all materials. + + + The maximum renderpriority of all materials. + Array is a vertex array. @@ -3224,14 +3276,14 @@ Flag used to mark a compressed index array. + + Used to set flags [constant ARRAY_COMPRESS_NORMAL], [constant ARRAY_COMPRESS_TANGENT], [constant ARRAY_COMPRESS_COLOR], [constant ARRAY_COMPRESS_TEX_UV] and [constant ARRAY_COMPRESS_TEX_UV2] quickly. + Flag used to mark that the array contains 2D vertices. - - Used to set flags [constant ARRAY_COMPRESS_NORMAL], [constant ARRAY_COMPRESS_TANGENT], [constant ARRAY_COMPRESS_COLOR], [constant ARRAY_COMPRESS_TEX_UV] and [constant ARRAY_COMPRESS_TEX_UV2] quickly. - Primitive to draw consists of points. @@ -3353,6 +3405,16 @@ Reflection probe will update each frame. This mode is necessary to capture moving objects. + + + + + + + + + + Draw particles in the order that they appear in the particles array. @@ -3400,6 +3462,14 @@ Multisample antialiasing uses 16 samples per pixel. + + + + + + + + Number of objects drawn in a single frame. @@ -3465,6 +3535,8 @@ 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]. @@ -3541,6 +3613,14 @@ Use the ACES tonemapper. + + + + + + + + Disables the blur set for SSAO. Will make SSAO look noisier. @@ -3565,6 +3645,14 @@ Highest quality screen space ambient occlusion. + + + + + + + + Lowest quality DOF blur. This is the fastest setting, but you may be able to see filtering artifacts. @@ -3586,6 +3674,18 @@ Calculates DOF blur using a circle shaped filter. Best quality and most realistic, but slowest. Use only for areas where a lot of performance can be dedicated to post-processing (e.g. cutscenes). + + + + + + + + + + + + Do not use a debug mode. @@ -3619,6 +3719,9 @@ The instance is a reflection probe. + + The instance is a decal. + The instance is a GI probe. @@ -3635,7 +3738,7 @@ Allows the instance to be used in baked lighting. - Allows the instance to be used with dynamic global illumination. + Allows the instance to be used with dynamic global illumination. When set, manually requests to draw geometry on next frame. @@ -3736,6 +3839,64 @@ Culling of the canvas occluder is counterclockwise. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + The amount of objects in the frame. diff --git a/doc/classes/ShaderGlobalsOverride.xml b/doc/classes/ShaderGlobalsOverride.xml new file mode 100644 index 00000000000..2aa00aa5a98 --- /dev/null +++ b/doc/classes/ShaderGlobalsOverride.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/doc/classes/SubViewport.xml b/doc/classes/SubViewport.xml index e877050bf8e..6014762e3d4 100644 --- a/doc/classes/SubViewport.xml +++ b/doc/classes/SubViewport.xml @@ -9,9 +9,6 @@ - - If [code]true[/code], the sub-viewport will be used in AR/VR process. - The clear mode when the sub-viewport is used as a render target. @@ -27,8 +24,20 @@ If [code]true[/code], the 2D size override affects stretch as well. + + If [code]true[/code], the sub-viewport will be used in AR/VR process. + + + Always clear the render target before drawing. + + + Never clear the render target. + + + Clear the render target next frame, then switch to [constant CLEAR_MODE_NEVER]. + Do not update the render target. @@ -44,14 +53,5 @@ Always update the render target. - - Always clear the render target before drawing. - - - Never clear the render target. - - - Clear the render target next frame, then switch to [constant CLEAR_MODE_NEVER]. - diff --git a/doc/classes/VSlider.xml b/doc/classes/VSlider.xml index 3faafdfe80a..9394d6b4303 100644 --- a/doc/classes/VSlider.xml +++ b/doc/classes/VSlider.xml @@ -23,6 +23,8 @@ The background of the area below the grabber. + + The texture for the grabber when it's disabled. diff --git a/doc/classes/Viewport.xml b/doc/classes/Viewport.xml index 88839ce9af9..a2d53f8e0cd 100644 --- a/doc/classes/Viewport.xml +++ b/doc/classes/Viewport.xml @@ -293,6 +293,33 @@ Represents the size of the [enum ShadowAtlasQuadrantSubdiv] enum. + + Multisample antialiasing mode disabled. This is the default value, and also the fastest setting. + + + Use 2x Multisample Antialiasing. + + + Use 4x Multisample Antialiasing. + + + Use 8x Multisample Antialiasing. Likely unsupported on low-end and older hardware. + + + Use 16x Multisample Antialiasing. Likely unsupported on medium and low-end hardware. + + + Represents the size of the [enum MSAA] enum. + + + Do not perform any antialiasing in the full screen post-process. + + + Use fast approximate antialiasing. FXAA is a popular screen-space antialising method, which is fast but will make the image look blurry, especially at lower resolutions. It can still work relatively well at large resolutions such as 1440p and 4K. + + + Represents the size of the [enum ScreenSpaceAA] enum. + Amount of objects in frame. @@ -320,12 +347,16 @@ Objects are displayed without light information. + + Objects are displayed semi-transparent with additive blending so you can see where they are drawing over top of one another. A higher overdraw means you are wasting performance on drawing pixels that are being hidden behind others. Objects are displayed in wireframe style. + + Objects are displayed with only the albedo value from [GIProbe]s. @@ -355,30 +386,6 @@ Draws the decal atlas used by [Decal]s and light projector textures in the upper left quadrant of the [Viewport]. - - Multisample antialiasing mode disabled. This is the default value, and also the fastest setting. - - - Use 2x Multisample Antialiasing. - - - Use 4x Multisample Antialiasing. - - - Use 8x Multisample Antialiasing. Likely unsupported on low-end and older hardware. - - - Use 16x Multisample Antialiasing. Likely unsupported on medium and low-end hardware. - - - Do not perform any antialiasing in the full screen post-process. - - - Use fast approximate antialiasing. FXAA is a popular screen-space antialising method, which is fast but will make the image look blurry, especially at lower resolutions. It can still work relatively well at large resolutions such as 1440p and 4K. - - - Max enum for screen-space antialiasing effects. - The texture filter reads from the nearest pixel only. The simplest and fastest method of filtering, but the texture will look pixelized. diff --git a/scene/3d/light_3d.cpp b/scene/3d/light_3d.cpp index 9928246d2ba..c048f60ebd9 100644 --- a/scene/3d/light_3d.cpp +++ b/scene/3d/light_3d.cpp @@ -301,6 +301,7 @@ void Light3D::_bind_methods() { BIND_ENUM_CONSTANT(PARAM_INDIRECT_ENERGY); BIND_ENUM_CONSTANT(PARAM_SPECULAR); BIND_ENUM_CONSTANT(PARAM_RANGE); + BIND_ENUM_CONSTANT(PARAM_SIZE); BIND_ENUM_CONSTANT(PARAM_ATTENUATION); BIND_ENUM_CONSTANT(PARAM_SPOT_ANGLE); BIND_ENUM_CONSTANT(PARAM_SPOT_ATTENUATION); diff --git a/scene/main/viewport.cpp b/scene/main/viewport.cpp index 3d2dcaffc30..51dd22db81c 100644 --- a/scene/main/viewport.cpp +++ b/scene/main/viewport.cpp @@ -3495,6 +3495,17 @@ void Viewport::_bind_methods() { BIND_ENUM_CONSTANT(SHADOW_ATLAS_QUADRANT_SUBDIV_1024); BIND_ENUM_CONSTANT(SHADOW_ATLAS_QUADRANT_SUBDIV_MAX); + BIND_ENUM_CONSTANT(MSAA_DISABLED); + BIND_ENUM_CONSTANT(MSAA_2X); + BIND_ENUM_CONSTANT(MSAA_4X); + BIND_ENUM_CONSTANT(MSAA_8X); + BIND_ENUM_CONSTANT(MSAA_16X); + BIND_ENUM_CONSTANT(MSAA_MAX); + + BIND_ENUM_CONSTANT(SCREEN_SPACE_AA_DISABLED); + BIND_ENUM_CONSTANT(SCREEN_SPACE_AA_FXAA); + BIND_ENUM_CONSTANT(SCREEN_SPACE_AA_MAX); + BIND_ENUM_CONSTANT(RENDER_INFO_OBJECTS_IN_FRAME); BIND_ENUM_CONSTANT(RENDER_INFO_VERTICES_IN_FRAME); BIND_ENUM_CONSTANT(RENDER_INFO_MATERIAL_CHANGES_IN_FRAME); @@ -3505,9 +3516,10 @@ void Viewport::_bind_methods() { BIND_ENUM_CONSTANT(DEBUG_DRAW_DISABLED); BIND_ENUM_CONSTANT(DEBUG_DRAW_UNSHADED); + BIND_ENUM_CONSTANT(DEBUG_DRAW_LIGHTING); BIND_ENUM_CONSTANT(DEBUG_DRAW_OVERDRAW); BIND_ENUM_CONSTANT(DEBUG_DRAW_WIREFRAME); - + BIND_ENUM_CONSTANT(DEBUG_DRAW_NORMAL_BUFFER); BIND_ENUM_CONSTANT(DEBUG_DRAW_GI_PROBE_ALBEDO); BIND_ENUM_CONSTANT(DEBUG_DRAW_GI_PROBE_LIGHTING); BIND_ENUM_CONSTANT(DEBUG_DRAW_GI_PROBE_EMISSION); @@ -3519,22 +3531,12 @@ void Viewport::_bind_methods() { BIND_ENUM_CONSTANT(DEBUG_DRAW_PSSM_SPLITS); BIND_ENUM_CONSTANT(DEBUG_DRAW_DECAL_ATLAS); - BIND_ENUM_CONSTANT(MSAA_DISABLED); - BIND_ENUM_CONSTANT(MSAA_2X); - BIND_ENUM_CONSTANT(MSAA_4X); - BIND_ENUM_CONSTANT(MSAA_8X); - BIND_ENUM_CONSTANT(MSAA_16X); - - BIND_ENUM_CONSTANT(SCREEN_SPACE_AA_DISABLED); - BIND_ENUM_CONSTANT(SCREEN_SPACE_AA_FXAA); - BIND_ENUM_CONSTANT(SCREEN_SPACE_AA_MAX); - BIND_ENUM_CONSTANT(DEFAULT_CANVAS_ITEM_TEXTURE_FILTER_NEAREST); BIND_ENUM_CONSTANT(DEFAULT_CANVAS_ITEM_TEXTURE_FILTER_LINEAR); BIND_ENUM_CONSTANT(DEFAULT_CANVAS_ITEM_TEXTURE_FILTER_LINEAR_WITH_MIPMAPS); BIND_ENUM_CONSTANT(DEFAULT_CANVAS_ITEM_TEXTURE_FILTER_NEAREST_WITH_MIPMAPS); - BIND_ENUM_CONSTANT(DEFAULT_CANVAS_ITEM_TEXTURE_FILTER_MAX); + BIND_ENUM_CONSTANT(DEFAULT_CANVAS_ITEM_TEXTURE_REPEAT_DISABLED); BIND_ENUM_CONSTANT(DEFAULT_CANVAS_ITEM_TEXTURE_REPEAT_ENABLED); BIND_ENUM_CONSTANT(DEFAULT_CANVAS_ITEM_TEXTURE_REPEAT_MIRROR); @@ -3750,15 +3752,15 @@ void SubViewport::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::INT, "render_target_clear_mode", PROPERTY_HINT_ENUM, "Always,Never,Next Frame"), "set_clear_mode", "get_clear_mode"); ADD_PROPERTY(PropertyInfo(Variant::INT, "render_target_update_mode", PROPERTY_HINT_ENUM, "Disabled,Once,When Visible,Always"), "set_update_mode", "get_update_mode"); + BIND_ENUM_CONSTANT(CLEAR_MODE_ALWAYS); + BIND_ENUM_CONSTANT(CLEAR_MODE_NEVER); + BIND_ENUM_CONSTANT(CLEAR_MODE_ONLY_NEXT_FRAME); + BIND_ENUM_CONSTANT(UPDATE_DISABLED); BIND_ENUM_CONSTANT(UPDATE_ONCE); BIND_ENUM_CONSTANT(UPDATE_WHEN_VISIBLE); BIND_ENUM_CONSTANT(UPDATE_WHEN_PARENT_VISIBLE); BIND_ENUM_CONSTANT(UPDATE_ALWAYS); - - BIND_ENUM_CONSTANT(CLEAR_MODE_ALWAYS); - BIND_ENUM_CONSTANT(CLEAR_MODE_NEVER); - BIND_ENUM_CONSTANT(CLEAR_MODE_ONLY_NEXT_FRAME); } SubViewport::SubViewport() { diff --git a/scene/main/viewport.h b/scene/main/viewport.h index 0cbc957307a..7e2df9fe429 100644 --- a/scene/main/viewport.h +++ b/scene/main/viewport.h @@ -116,7 +116,6 @@ public: }; enum RenderInfo { - RENDER_INFO_OBJECTS_IN_FRAME, RENDER_INFO_VERTICES_IN_FRAME, RENDER_INFO_MATERIAL_CHANGES_IN_FRAME, diff --git a/servers/rendering_server.cpp b/servers/rendering_server.cpp index 96d073af12f..57a34f24cfa 100644 --- a/servers/rendering_server.cpp +++ b/servers/rendering_server.cpp @@ -1998,9 +1998,6 @@ void RenderingServer::_bind_methods() { BIND_CONSTANT(MAX_GLOW_LEVELS); BIND_CONSTANT(MAX_CURSORS); - BIND_CONSTANT(MATERIAL_RENDER_PRIORITY_MIN); - BIND_CONSTANT(MATERIAL_RENDER_PRIORITY_MAX); - BIND_ENUM_CONSTANT(TEXTURE_LAYERED_2D_ARRAY); BIND_ENUM_CONSTANT(TEXTURE_LAYERED_CUBEMAP); BIND_ENUM_CONSTANT(TEXTURE_LAYERED_CUBEMAP_ARRAY); @@ -2018,6 +2015,9 @@ void RenderingServer::_bind_methods() { BIND_ENUM_CONSTANT(SHADER_SKY); BIND_ENUM_CONSTANT(SHADER_MAX); + BIND_CONSTANT(MATERIAL_RENDER_PRIORITY_MIN); + BIND_CONSTANT(MATERIAL_RENDER_PRIORITY_MAX); + BIND_ENUM_CONSTANT(ARRAY_VERTEX); BIND_ENUM_CONSTANT(ARRAY_NORMAL); BIND_ENUM_CONSTANT(ARRAY_TANGENT); @@ -2045,9 +2045,10 @@ void RenderingServer::_bind_methods() { BIND_ENUM_CONSTANT(ARRAY_COMPRESS_TEX_UV); BIND_ENUM_CONSTANT(ARRAY_COMPRESS_TEX_UV2); BIND_ENUM_CONSTANT(ARRAY_COMPRESS_INDEX); + BIND_ENUM_CONSTANT(ARRAY_COMPRESS_DEFAULT); + BIND_ENUM_CONSTANT(ARRAY_FLAG_USE_2D_VERTICES); BIND_ENUM_CONSTANT(ARRAY_FLAG_USE_DYNAMIC_UPDATE); - BIND_ENUM_CONSTANT(ARRAY_COMPRESS_DEFAULT); BIND_ENUM_CONSTANT(PRIMITIVE_POINTS); BIND_ENUM_CONSTANT(PRIMITIVE_LINES); @@ -2099,6 +2100,12 @@ void RenderingServer::_bind_methods() { BIND_ENUM_CONSTANT(REFLECTION_PROBE_UPDATE_ONCE); BIND_ENUM_CONSTANT(REFLECTION_PROBE_UPDATE_ALWAYS); + BIND_ENUM_CONSTANT(DECAL_TEXTURE_ALBEDO); + BIND_ENUM_CONSTANT(DECAL_TEXTURE_NORMAL); + BIND_ENUM_CONSTANT(DECAL_TEXTURE_ORM); + BIND_ENUM_CONSTANT(DECAL_TEXTURE_EMISSION); + BIND_ENUM_CONSTANT(DECAL_TEXTURE_MAX); + BIND_ENUM_CONSTANT(PARTICLES_DRAW_ORDER_INDEX); BIND_ENUM_CONSTANT(PARTICLES_DRAW_ORDER_LIFETIME); BIND_ENUM_CONSTANT(PARTICLES_DRAW_ORDER_VIEW_DEPTH); @@ -2118,6 +2125,11 @@ void RenderingServer::_bind_methods() { BIND_ENUM_CONSTANT(VIEWPORT_MSAA_4X); BIND_ENUM_CONSTANT(VIEWPORT_MSAA_8X); BIND_ENUM_CONSTANT(VIEWPORT_MSAA_16X); + BIND_ENUM_CONSTANT(VIEWPORT_MSAA_MAX); + + BIND_ENUM_CONSTANT(VIEWPORT_SCREEN_SPACE_AA_DISABLED); + BIND_ENUM_CONSTANT(VIEWPORT_SCREEN_SPACE_AA_FXAA); + BIND_ENUM_CONSTANT(VIEWPORT_SCREEN_SPACE_AA_MAX); BIND_ENUM_CONSTANT(VIEWPORT_RENDER_INFO_OBJECTS_IN_FRAME); BIND_ENUM_CONSTANT(VIEWPORT_RENDER_INFO_VERTICES_IN_FRAME); @@ -2142,6 +2154,7 @@ void RenderingServer::_bind_methods() { BIND_ENUM_CONSTANT(VIEWPORT_DEBUG_DRAW_SSAO); BIND_ENUM_CONSTANT(VIEWPORT_DEBUG_DRAW_ROUGHNESS_LIMITER); BIND_ENUM_CONSTANT(VIEWPORT_DEBUG_DRAW_PSSM_SPLITS); + BIND_ENUM_CONSTANT(VIEWPORT_DEBUG_DRAW_DECAL_ATLAS); BIND_ENUM_CONSTANT(SKY_MODE_QUALITY); BIND_ENUM_CONSTANT(SKY_MODE_REALTIME); @@ -2174,6 +2187,11 @@ void RenderingServer::_bind_methods() { BIND_ENUM_CONSTANT(ENV_TONE_MAPPER_FILMIC); BIND_ENUM_CONSTANT(ENV_TONE_MAPPER_ACES); + BIND_ENUM_CONSTANT(ENV_SSR_ROUGNESS_QUALITY_DISABLED); + BIND_ENUM_CONSTANT(ENV_SSR_ROUGNESS_QUALITY_LOW); + BIND_ENUM_CONSTANT(ENV_SSR_ROUGNESS_QUALITY_MEDIUM); + BIND_ENUM_CONSTANT(ENV_SSR_ROUGNESS_QUALITY_HIGH); + BIND_ENUM_CONSTANT(ENV_SSAO_BLUR_DISABLED); BIND_ENUM_CONSTANT(ENV_SSAO_BLUR_1x1); BIND_ENUM_CONSTANT(ENV_SSAO_BLUR_2x2); @@ -2184,6 +2202,11 @@ void RenderingServer::_bind_methods() { BIND_ENUM_CONSTANT(ENV_SSAO_QUALITY_HIGH); BIND_ENUM_CONSTANT(ENV_SSAO_QUALITY_ULTRA); + BIND_ENUM_CONSTANT(SUB_SURFACE_SCATTERING_QUALITY_DISABLED); + BIND_ENUM_CONSTANT(SUB_SURFACE_SCATTERING_QUALITY_LOW); + BIND_ENUM_CONSTANT(SUB_SURFACE_SCATTERING_QUALITY_MEDIUM); + BIND_ENUM_CONSTANT(SUB_SURFACE_SCATTERING_QUALITY_HIGH); + BIND_ENUM_CONSTANT(DOF_BLUR_QUALITY_VERY_LOW); BIND_ENUM_CONSTANT(DOF_BLUR_QUALITY_LOW); BIND_ENUM_CONSTANT(DOF_BLUR_QUALITY_MEDIUM); @@ -2193,6 +2216,13 @@ void RenderingServer::_bind_methods() { BIND_ENUM_CONSTANT(DOF_BOKEH_HEXAGON); BIND_ENUM_CONSTANT(DOF_BOKEH_CIRCLE); + BIND_ENUM_CONSTANT(SHADOW_QUALITY_HARD); + BIND_ENUM_CONSTANT(SHADOW_QUALITY_SOFT_LOW); + BIND_ENUM_CONSTANT(SHADOW_QUALITY_SOFT_MEDIUM); + BIND_ENUM_CONSTANT(SHADOW_QUALITY_SOFT_HIGH); + BIND_ENUM_CONSTANT(SHADOW_QUALITY_SOFT_ULTRA); + BIND_ENUM_CONSTANT(SHADOW_QUALITY_MAX); + BIND_ENUM_CONSTANT(SCENARIO_DEBUG_DISABLED); BIND_ENUM_CONSTANT(SCENARIO_DEBUG_WIREFRAME); BIND_ENUM_CONSTANT(SCENARIO_DEBUG_OVERDRAW); @@ -2205,6 +2235,7 @@ void RenderingServer::_bind_methods() { BIND_ENUM_CONSTANT(INSTANCE_PARTICLES); BIND_ENUM_CONSTANT(INSTANCE_LIGHT); BIND_ENUM_CONSTANT(INSTANCE_REFLECTION_PROBE); + BIND_ENUM_CONSTANT(INSTANCE_DECAL); BIND_ENUM_CONSTANT(INSTANCE_GI_PROBE); BIND_ENUM_CONSTANT(INSTANCE_LIGHTMAP_CAPTURE); BIND_ENUM_CONSTANT(INSTANCE_MAX); diff --git a/servers/rendering_server.h b/servers/rendering_server.h index 3bc182a16b7..8ca070b4a9b 100644 --- a/servers/rendering_server.h +++ b/servers/rendering_server.h @@ -86,7 +86,6 @@ public: }; enum CubeMapLayer { - CUBEMAP_LAYER_LEFT, CUBEMAP_LAYER_RIGHT, CUBEMAP_LAYER_BOTTOM, @@ -158,7 +157,6 @@ public: /* SHADER API */ enum ShaderMode { - SHADER_SPATIAL, SHADER_CANVAS_ITEM, SHADER_PARTICLES, @@ -182,8 +180,8 @@ public: enum { MATERIAL_RENDER_PRIORITY_MIN = -128, MATERIAL_RENDER_PRIORITY_MAX = 127, - }; + virtual RID material_create() = 0; virtual void material_set_shader(RID p_shader_material, RID p_shader) = 0; @@ -198,7 +196,6 @@ public: /* MESH API */ enum ArrayType { - ARRAY_VERTEX = 0, ARRAY_NORMAL = 1, ARRAY_TANGENT = 2, @@ -230,12 +227,10 @@ public: ARRAY_COMPRESS_TEX_UV = 1 << (ARRAY_TEX_UV + ARRAY_COMPRESS_BASE), ARRAY_COMPRESS_TEX_UV2 = 1 << (ARRAY_TEX_UV2 + ARRAY_COMPRESS_BASE), ARRAY_COMPRESS_INDEX = 1 << (ARRAY_INDEX + ARRAY_COMPRESS_BASE), + ARRAY_COMPRESS_DEFAULT = ARRAY_COMPRESS_NORMAL | ARRAY_COMPRESS_TANGENT | ARRAY_COMPRESS_COLOR | ARRAY_COMPRESS_TEX_UV | ARRAY_COMPRESS_TEX_UV2, ARRAY_FLAG_USE_2D_VERTICES = ARRAY_COMPRESS_INDEX << 1, ARRAY_FLAG_USE_DYNAMIC_UPDATE = ARRAY_COMPRESS_INDEX << 3, - - ARRAY_COMPRESS_DEFAULT = ARRAY_COMPRESS_NORMAL | ARRAY_COMPRESS_TANGENT | ARRAY_COMPRESS_COLOR | ARRAY_COMPRESS_TEX_UV | ARRAY_COMPRESS_TEX_UV2 - }; enum PrimitiveType { @@ -378,7 +373,6 @@ public: }; enum LightParam { - LIGHT_PARAM_ENERGY, LIGHT_PARAM_INDIRECT_ENERGY, LIGHT_PARAM_SPECULAR, @@ -599,7 +593,8 @@ public: }; virtual void particles_set_collision(RID p_particles,ParticlesCollisionMode p_mode,const Transform&, p_xform,const RID p_depth_tex,const RID p_normal_tex)=0; -*/ + */ + /* VIEWPORT TARGET API */ virtual RID viewport_create() = 0; @@ -623,7 +618,6 @@ public: virtual void viewport_set_update_mode(RID p_viewport, ViewportUpdateMode p_mode) = 0; enum ViewportClearMode { - VIEWPORT_CLEAR_ALWAYS, VIEWPORT_CLEAR_NEVER, VIEWPORT_CLEAR_ONLY_NEXT_FRAME @@ -664,18 +658,19 @@ public: enum ViewportScreenSpaceAA { VIEWPORT_SCREEN_SPACE_AA_DISABLED, VIEWPORT_SCREEN_SPACE_AA_FXAA, + VIEWPORT_SCREEN_SPACE_AA_MAX, }; + virtual void viewport_set_screen_space_aa(RID p_viewport, ViewportScreenSpaceAA p_mode) = 0; enum ViewportRenderInfo { - VIEWPORT_RENDER_INFO_OBJECTS_IN_FRAME, VIEWPORT_RENDER_INFO_VERTICES_IN_FRAME, VIEWPORT_RENDER_INFO_MATERIAL_CHANGES_IN_FRAME, VIEWPORT_RENDER_INFO_SHADER_CHANGES_IN_FRAME, VIEWPORT_RENDER_INFO_SURFACE_CHANGES_IN_FRAME, VIEWPORT_RENDER_INFO_DRAW_CALLS_IN_FRAME, - VIEWPORT_RENDER_INFO_MAX + VIEWPORT_RENDER_INFO_MAX, }; virtual int viewport_get_render_info(RID p_viewport, ViewportRenderInfo p_info) = 0; @@ -697,7 +692,6 @@ public: VIEWPORT_DEBUG_DRAW_ROUGHNESS_LIMITER, VIEWPORT_DEBUG_DRAW_PSSM_SPLITS, VIEWPORT_DEBUG_DRAW_DECAL_ATLAS, - }; virtual void viewport_set_debug_draw(RID p_viewport, ViewportDebugDraw p_draw) = 0; @@ -725,7 +719,6 @@ public: virtual RID environment_create() = 0; enum EnvironmentBG { - ENV_BG_CLEAR_COLOR, ENV_BG_COLOR, ENV_BG_SKY, @@ -768,6 +761,7 @@ public: ENV_GLOW_BLEND_MODE_REPLACE, ENV_GLOW_BLEND_MODE_MIX, }; + virtual void environment_set_glow(RID p_env, bool p_enable, int p_level_flags, float p_intensity, float p_strength, float p_mix, float p_bloom_threshold, EnvironmentGlowBlendMode p_blend_mode, float p_hdr_bleed_threshold, float p_hdr_bleed_scale, float p_hdr_luminance_cap) = 0; virtual void environment_glow_set_use_bicubic_upscale(bool p_enable) = 0; @@ -872,7 +866,6 @@ public: SCENARIO_DEBUG_WIREFRAME, SCENARIO_DEBUG_OVERDRAW, SCENARIO_DEBUG_SHADELESS, - }; virtual void scenario_set_debug(RID p_scenario, ScenarioDebugMode p_debug_mode) = 0; @@ -883,7 +876,6 @@ public: /* INSTANCING API */ enum InstanceType { - INSTANCE_NONE, INSTANCE_MESH, INSTANCE_MULTIMESH, @@ -1094,6 +1086,7 @@ public: CANVAS_OCCLUDER_POLYGON_CULL_CLOCKWISE, CANVAS_OCCLUDER_POLYGON_CULL_COUNTER_CLOCKWISE, }; + virtual void canvas_occluder_polygon_set_cull_mode(RID p_occluder_polygon, CanvasOccluderPolygonCullMode p_mode) = 0; /* GLOBAL VARIABLES */ @@ -1167,7 +1160,6 @@ public: /* STATUS INFORMATION */ enum RenderInfo { - INFO_OBJECTS_IN_FRAME, INFO_VERTICES_IN_FRAME, INFO_MATERIAL_CHANGES_IN_FRAME, @@ -1250,6 +1242,7 @@ VARIANT_ENUM_CAST(RenderingServer::ParticlesDrawOrder); VARIANT_ENUM_CAST(RenderingServer::ViewportUpdateMode); VARIANT_ENUM_CAST(RenderingServer::ViewportClearMode); VARIANT_ENUM_CAST(RenderingServer::ViewportMSAA); +VARIANT_ENUM_CAST(RenderingServer::ViewportScreenSpaceAA); VARIANT_ENUM_CAST(RenderingServer::ViewportRenderInfo); VARIANT_ENUM_CAST(RenderingServer::ViewportDebugDraw); VARIANT_ENUM_CAST(RenderingServer::SkyMode); @@ -1258,10 +1251,13 @@ VARIANT_ENUM_CAST(RenderingServer::EnvironmentAmbientSource); VARIANT_ENUM_CAST(RenderingServer::EnvironmentReflectionSource); VARIANT_ENUM_CAST(RenderingServer::EnvironmentGlowBlendMode); VARIANT_ENUM_CAST(RenderingServer::EnvironmentToneMapper); -VARIANT_ENUM_CAST(RenderingServer::EnvironmentSSAOQuality); +VARIANT_ENUM_CAST(RenderingServer::EnvironmentSSRRoughnessQuality); VARIANT_ENUM_CAST(RenderingServer::EnvironmentSSAOBlur); +VARIANT_ENUM_CAST(RenderingServer::EnvironmentSSAOQuality); +VARIANT_ENUM_CAST(RenderingServer::SubSurfaceScatteringQuality); VARIANT_ENUM_CAST(RenderingServer::DOFBlurQuality); VARIANT_ENUM_CAST(RenderingServer::DOFBokehShape); +VARIANT_ENUM_CAST(RenderingServer::ShadowQuality); VARIANT_ENUM_CAST(RenderingServer::ScenarioDebugMode); VARIANT_ENUM_CAST(RenderingServer::InstanceType); VARIANT_ENUM_CAST(RenderingServer::InstanceFlags); @@ -1276,7 +1272,7 @@ VARIANT_ENUM_CAST(RenderingServer::GlobalVariableType); VARIANT_ENUM_CAST(RenderingServer::RenderInfo); VARIANT_ENUM_CAST(RenderingServer::Features); -//typedef RenderingServer VS; // makes it easier to use +// Alias to make it easier to use. #define RS RenderingServer -#endif +#endif // RENDERING_SERVER_H