Rename soft shadow quality project settings for easier searching
`rendering/quality/shadows` is now `rendering/quality/positional_shadow` to explicitly denote that the settings only affect positional light shadows, not directional light shadows. Shadow atlas settings now contain the word "atlas" for easier searching. Soft shadow quality settings were renamed to contain the word "filter". This makes the settings appear when searching for "filter" in the project settings dialog, like in Godot 3.x.
This commit is contained in:
parent
98d5b37a4c
commit
21ea1c3835
|
@ -1898,41 +1898,41 @@
|
||||||
<member name="rendering/shadows/directional_shadow/size.mobile" type="int" setter="" getter="" default="2048">
|
<member name="rendering/shadows/directional_shadow/size.mobile" type="int" setter="" getter="" default="2048">
|
||||||
Lower-end override for [member rendering/shadows/directional_shadow/size] on mobile devices, due to performance concerns or driver support.
|
Lower-end override for [member rendering/shadows/directional_shadow/size] on mobile devices, due to performance concerns or driver support.
|
||||||
</member>
|
</member>
|
||||||
<member name="rendering/shadows/directional_shadow/soft_shadow_quality" type="int" setter="" getter="" default="2">
|
<member name="rendering/shadows/directional_shadow/soft_shadow_filter_quality" type="int" setter="" getter="" default="2">
|
||||||
Quality setting for shadows cast by [DirectionalLight3D]s. Higher quality settings use more samples when reading from shadow maps and are thus slower. Low quality settings may result in shadows looking grainy.
|
Quality setting for shadows cast by [DirectionalLight3D]s. Higher quality settings use more samples when reading from shadow maps and are thus slower. Low quality settings may result in shadows looking grainy.
|
||||||
[b]Note:[/b] The Soft Very Low setting will automatically multiply [i]constant[/i] shadow blur by 0.75x to reduce the amount of noise visible. This automatic blur change only affects the constant blur factor defined in [member Light3D.shadow_blur], not the variable blur performed by [DirectionalLight3D]s' [member Light3D.light_angular_distance].
|
[b]Note:[/b] The Soft Very Low setting will automatically multiply [i]constant[/i] shadow blur by 0.75x to reduce the amount of noise visible. This automatic blur change only affects the constant blur factor defined in [member Light3D.shadow_blur], not the variable blur performed by [DirectionalLight3D]s' [member Light3D.light_angular_distance].
|
||||||
[b]Note:[/b] The Soft High and Soft Ultra settings will automatically multiply [i]constant[/i] shadow blur by 1.5× and 2× respectively to make better use of the increased sample count. This increased blur also improves stability of dynamic object shadows.
|
[b]Note:[/b] The Soft High and Soft Ultra settings will automatically multiply [i]constant[/i] shadow blur by 1.5× and 2× respectively to make better use of the increased sample count. This increased blur also improves stability of dynamic object shadows.
|
||||||
</member>
|
</member>
|
||||||
<member name="rendering/shadows/directional_shadow/soft_shadow_quality.mobile" type="int" setter="" getter="" default="0">
|
<member name="rendering/shadows/directional_shadow/soft_shadow_filter_quality.mobile" type="int" setter="" getter="" default="0">
|
||||||
Lower-end override for [member rendering/shadows/directional_shadow/soft_shadow_quality] on mobile devices, due to performance concerns or driver support.
|
Lower-end override for [member rendering/shadows/directional_shadow/soft_shadow_filter_quality] on mobile devices, due to performance concerns or driver support.
|
||||||
</member>
|
</member>
|
||||||
<member name="rendering/shadows/shadow_atlas/16_bits" type="bool" setter="" getter="" default="true">
|
<member name="rendering/shadows/positional_shadow/atlas_16_bits" type="bool" setter="" getter="" default="true">
|
||||||
</member>
|
</member>
|
||||||
<member name="rendering/shadows/shadow_atlas/quadrant_0_subdiv" type="int" setter="" getter="" default="2">
|
<member name="rendering/shadows/positional_shadow/atlas_quadrant_0_subdiv" type="int" setter="" getter="" default="2">
|
||||||
Subdivision quadrant size for shadow mapping. See shadow mapping documentation.
|
Subdivision quadrant size for shadow mapping. See shadow mapping documentation.
|
||||||
</member>
|
</member>
|
||||||
<member name="rendering/shadows/shadow_atlas/quadrant_1_subdiv" type="int" setter="" getter="" default="2">
|
<member name="rendering/shadows/positional_shadow/atlas_quadrant_1_subdiv" type="int" setter="" getter="" default="2">
|
||||||
Subdivision quadrant size for shadow mapping. See shadow mapping documentation.
|
Subdivision quadrant size for shadow mapping. See shadow mapping documentation.
|
||||||
</member>
|
</member>
|
||||||
<member name="rendering/shadows/shadow_atlas/quadrant_2_subdiv" type="int" setter="" getter="" default="3">
|
<member name="rendering/shadows/positional_shadow/atlas_quadrant_2_subdiv" type="int" setter="" getter="" default="3">
|
||||||
Subdivision quadrant size for shadow mapping. See shadow mapping documentation.
|
Subdivision quadrant size for shadow mapping. See shadow mapping documentation.
|
||||||
</member>
|
</member>
|
||||||
<member name="rendering/shadows/shadow_atlas/quadrant_3_subdiv" type="int" setter="" getter="" default="4">
|
<member name="rendering/shadows/positional_shadow/atlas_quadrant_3_subdiv" type="int" setter="" getter="" default="4">
|
||||||
Subdivision quadrant size for shadow mapping. See shadow mapping documentation.
|
Subdivision quadrant size for shadow mapping. See shadow mapping documentation.
|
||||||
</member>
|
</member>
|
||||||
<member name="rendering/shadows/shadow_atlas/size" type="int" setter="" getter="" default="4096">
|
<member name="rendering/shadows/positional_shadow/atlas_size" type="int" setter="" getter="" default="4096">
|
||||||
Size for shadow atlas (used for OmniLights and SpotLights). See documentation.
|
Size for shadow atlas (used for OmniLights and SpotLights). See documentation.
|
||||||
</member>
|
</member>
|
||||||
<member name="rendering/shadows/shadow_atlas/size.mobile" type="int" setter="" getter="" default="2048">
|
<member name="rendering/shadows/positional_shadow/atlas_size.mobile" type="int" setter="" getter="" default="2048">
|
||||||
Lower-end override for [member rendering/shadows/shadow_atlas/size] on mobile devices, due to performance concerns or driver support.
|
Lower-end override for [member rendering/shadows/positional_shadow/atlas_size] on mobile devices, due to performance concerns or driver support.
|
||||||
</member>
|
</member>
|
||||||
<member name="rendering/shadows/shadows/soft_shadow_quality" type="int" setter="" getter="" default="2">
|
<member name="rendering/shadows/positional_shadow/soft_shadow_filter_quality" type="int" setter="" getter="" default="2">
|
||||||
Quality setting for shadows cast by [OmniLight3D]s and [SpotLight3D]s. Higher quality settings use more samples when reading from shadow maps and are thus slower. Low quality settings may result in shadows looking grainy.
|
Quality setting for shadows cast by [OmniLight3D]s and [SpotLight3D]s. Higher quality settings use more samples when reading from shadow maps and are thus slower. Low quality settings may result in shadows looking grainy.
|
||||||
[b]Note:[/b] The Soft Very Low setting will automatically multiply [i]constant[/i] shadow blur by 0.75x to reduce the amount of noise visible. This automatic blur change only affects the constant blur factor defined in [member Light3D.shadow_blur], not the variable blur performed by [DirectionalLight3D]s' [member Light3D.light_angular_distance].
|
[b]Note:[/b] The Soft Very Low setting will automatically multiply [i]constant[/i] shadow blur by 0.75x to reduce the amount of noise visible. This automatic blur change only affects the constant blur factor defined in [member Light3D.shadow_blur], not the variable blur performed by [DirectionalLight3D]s' [member Light3D.light_angular_distance].
|
||||||
[b]Note:[/b] The Soft High and Soft Ultra settings will automatically multiply shadow blur by 1.5× and 2× respectively to make better use of the increased sample count. This increased blur also improves stability of dynamic object shadows.
|
[b]Note:[/b] The Soft High and Soft Ultra settings will automatically multiply shadow blur by 1.5× and 2× respectively to make better use of the increased sample count. This increased blur also improves stability of dynamic object shadows.
|
||||||
</member>
|
</member>
|
||||||
<member name="rendering/shadows/shadows/soft_shadow_quality.mobile" type="int" setter="" getter="" default="0">
|
<member name="rendering/shadows/positional_shadow/soft_shadow_filter_quality.mobile" type="int" setter="" getter="" default="0">
|
||||||
Lower-end override for [member rendering/shadows/shadows/soft_shadow_quality] on mobile devices, due to performance concerns or driver support.
|
Lower-end override for [member rendering/shadows/positional_shadow/soft_shadow_filter_quality] on mobile devices, due to performance concerns or driver support.
|
||||||
</member>
|
</member>
|
||||||
<member name="rendering/textures/decals/filter" type="int" setter="" getter="" default="3">
|
<member name="rendering/textures/decals/filter" type="int" setter="" getter="" default="3">
|
||||||
</member>
|
</member>
|
||||||
|
|
|
@ -890,7 +890,7 @@
|
||||||
<description>
|
<description>
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="directional_shadow_quality_set">
|
<method name="directional_soft_shadow_filter_set_quality">
|
||||||
<return type="void" />
|
<return type="void" />
|
||||||
<argument index="0" name="quality" type="int" enum="RenderingServer.ShadowQuality" />
|
<argument index="0" name="quality" type="int" enum="RenderingServer.ShadowQuality" />
|
||||||
<description>
|
<description>
|
||||||
|
@ -2519,6 +2519,12 @@
|
||||||
If [code]true[/code], particles use local coordinates. If [code]false[/code] they use global coordinates. Equivalent to [member GPUParticles3D.local_coords].
|
If [code]true[/code], particles use local coordinates. If [code]false[/code] they use global coordinates. Equivalent to [member GPUParticles3D.local_coords].
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
|
<method name="positional_soft_shadow_filter_set_quality">
|
||||||
|
<return type="void" />
|
||||||
|
<argument index="0" name="quality" type="int" enum="RenderingServer.ShadowQuality" />
|
||||||
|
<description>
|
||||||
|
</description>
|
||||||
|
</method>
|
||||||
<method name="reflection_probe_create">
|
<method name="reflection_probe_create">
|
||||||
<return type="RID" />
|
<return type="RID" />
|
||||||
<description>
|
<description>
|
||||||
|
@ -2753,12 +2759,6 @@
|
||||||
[b]Note:[/b] If the sampler array is used use [code]index[/code] to access the specified texture.
|
[b]Note:[/b] If the sampler array is used use [code]index[/code] to access the specified texture.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="shadows_quality_set">
|
|
||||||
<return type="void" />
|
|
||||||
<argument index="0" name="quality" type="int" enum="RenderingServer.ShadowQuality" />
|
|
||||||
<description>
|
|
||||||
</description>
|
|
||||||
</method>
|
|
||||||
<method name="skeleton_allocate_data">
|
<method name="skeleton_allocate_data">
|
||||||
<return type="void" />
|
<return type="void" />
|
||||||
<argument index="0" name="skeleton" type="RID" />
|
<argument index="0" name="skeleton" type="RID" />
|
||||||
|
@ -3220,6 +3220,25 @@
|
||||||
Sets the viewport's parent to another viewport.
|
Sets the viewport's parent to another viewport.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
|
<method name="viewport_set_positional_shadow_atlas_quadrant_subdivision">
|
||||||
|
<return type="void" />
|
||||||
|
<argument index="0" name="viewport" type="RID" />
|
||||||
|
<argument index="1" name="quadrant" type="int" />
|
||||||
|
<argument index="2" name="subdivision" type="int" />
|
||||||
|
<description>
|
||||||
|
Sets the shadow atlas quadrant's subdivision.
|
||||||
|
</description>
|
||||||
|
</method>
|
||||||
|
<method name="viewport_set_positional_shadow_atlas_size">
|
||||||
|
<return type="void" />
|
||||||
|
<argument index="0" name="viewport" type="RID" />
|
||||||
|
<argument index="1" name="size" type="int" />
|
||||||
|
<argument index="2" name="use_16_bits" type="bool" default="false" />
|
||||||
|
<description>
|
||||||
|
Sets the size of the shadow atlas's images (used for omni and spot lights). The value will be rounded up to the nearest power of 2.
|
||||||
|
[b]Note:[/b] If this is set to [code]0[/code], no shadows will be visible at all (including directional shadows).
|
||||||
|
</description>
|
||||||
|
</method>
|
||||||
<method name="viewport_set_render_direct_to_screen">
|
<method name="viewport_set_render_direct_to_screen">
|
||||||
<return type="void" />
|
<return type="void" />
|
||||||
<argument index="0" name="viewport" type="RID" />
|
<argument index="0" name="viewport" type="RID" />
|
||||||
|
@ -3269,24 +3288,6 @@
|
||||||
<description>
|
<description>
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="viewport_set_shadow_atlas_quadrant_subdivision">
|
|
||||||
<return type="void" />
|
|
||||||
<argument index="0" name="viewport" type="RID" />
|
|
||||||
<argument index="1" name="quadrant" type="int" />
|
|
||||||
<argument index="2" name="subdivision" type="int" />
|
|
||||||
<description>
|
|
||||||
Sets the shadow atlas quadrant's subdivision.
|
|
||||||
</description>
|
|
||||||
</method>
|
|
||||||
<method name="viewport_set_shadow_atlas_size">
|
|
||||||
<return type="void" />
|
|
||||||
<argument index="0" name="viewport" type="RID" />
|
|
||||||
<argument index="1" name="size" type="int" />
|
|
||||||
<argument index="2" name="use_16_bits" type="bool" default="false" />
|
|
||||||
<description>
|
|
||||||
Sets the size of the shadow atlas's images (used for omni and spot lights). The value will be rounded up to the nearest power of 2.
|
|
||||||
</description>
|
|
||||||
</method>
|
|
||||||
<method name="viewport_set_size">
|
<method name="viewport_set_size">
|
||||||
<return type="void" />
|
<return type="void" />
|
||||||
<argument index="0" name="viewport" type="RID" />
|
<argument index="0" name="viewport" type="RID" />
|
||||||
|
|
|
@ -57,6 +57,13 @@
|
||||||
Returns the mouse's position in this [Viewport] using the coordinate system of this [Viewport].
|
Returns the mouse's position in this [Viewport] using the coordinate system of this [Viewport].
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
|
<method name="get_positional_shadow_atlas_quadrant_subdiv" qualifiers="const">
|
||||||
|
<return type="int" enum="Viewport.PositionalShadowAtlasQuadrantSubdiv" />
|
||||||
|
<argument index="0" name="quadrant" type="int" />
|
||||||
|
<description>
|
||||||
|
Returns the [enum PositionalShadowAtlasQuadrantSubdiv] of the specified quadrant.
|
||||||
|
</description>
|
||||||
|
</method>
|
||||||
<method name="get_render_info">
|
<method name="get_render_info">
|
||||||
<return type="int" />
|
<return type="int" />
|
||||||
<argument index="0" name="type" type="int" enum="Viewport.RenderInfoType" />
|
<argument index="0" name="type" type="int" enum="Viewport.RenderInfoType" />
|
||||||
|
@ -64,13 +71,6 @@
|
||||||
<description>
|
<description>
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="get_shadow_atlas_quadrant_subdiv" qualifiers="const">
|
|
||||||
<return type="int" enum="Viewport.ShadowAtlasQuadrantSubdiv" />
|
|
||||||
<argument index="0" name="quadrant" type="int" />
|
|
||||||
<description>
|
|
||||||
Returns the [enum ShadowAtlasQuadrantSubdiv] of the specified quadrant.
|
|
||||||
</description>
|
|
||||||
</method>
|
|
||||||
<method name="get_texture" qualifiers="const">
|
<method name="get_texture" qualifiers="const">
|
||||||
<return type="ViewportTexture" />
|
<return type="ViewportTexture" />
|
||||||
<description>
|
<description>
|
||||||
|
@ -158,10 +158,10 @@
|
||||||
Stops the input from propagating further down the [SceneTree].
|
Stops the input from propagating further down the [SceneTree].
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="set_shadow_atlas_quadrant_subdiv">
|
<method name="set_positional_shadow_atlas_quadrant_subdiv">
|
||||||
<return type="void" />
|
<return type="void" />
|
||||||
<argument index="0" name="quadrant" type="int" />
|
<argument index="0" name="quadrant" type="int" />
|
||||||
<argument index="1" name="subdiv" type="int" enum="Viewport.ShadowAtlasQuadrantSubdiv" />
|
<argument index="1" name="subdiv" type="int" enum="Viewport.PositionalShadowAtlasQuadrantSubdiv" />
|
||||||
<description>
|
<description>
|
||||||
Sets the number of subdivisions to use in the specified quadrant. A higher number of subdivisions allows you to have more shadows in the scene at once, but reduces the quality of the shadows. A good practice is to have quadrants with a varying number of subdivisions and to have as few subdivisions as possible.
|
Sets the number of subdivisions to use in the specified quadrant. A higher number of subdivisions allows you to have more shadows in the scene at once, but reduces the quality of the shadows. A good practice is to have quadrants with a varying number of subdivisions and to have as few subdivisions as possible.
|
||||||
</description>
|
</description>
|
||||||
|
@ -232,6 +232,24 @@
|
||||||
<member name="physics_object_picking" type="bool" setter="set_physics_object_picking" getter="get_physics_object_picking" default="false">
|
<member name="physics_object_picking" type="bool" setter="set_physics_object_picking" getter="get_physics_object_picking" default="false">
|
||||||
If [code]true[/code], the objects rendered by viewport become subjects of mouse picking process.
|
If [code]true[/code], the objects rendered by viewport become subjects of mouse picking process.
|
||||||
</member>
|
</member>
|
||||||
|
<member name="positional_shadow_atlas_16_bits" type="bool" setter="set_positional_shadow_atlas_16_bits" getter="get_positional_shadow_atlas_16_bits" default="true">
|
||||||
|
</member>
|
||||||
|
<member name="positional_shadow_atlas_quad_0" type="int" setter="set_positional_shadow_atlas_quadrant_subdiv" getter="get_positional_shadow_atlas_quadrant_subdiv" enum="Viewport.PositionalShadowAtlasQuadrantSubdiv" default="2">
|
||||||
|
The subdivision amount of the first quadrant on the shadow atlas.
|
||||||
|
</member>
|
||||||
|
<member name="positional_shadow_atlas_quad_1" type="int" setter="set_positional_shadow_atlas_quadrant_subdiv" getter="get_positional_shadow_atlas_quadrant_subdiv" enum="Viewport.PositionalShadowAtlasQuadrantSubdiv" default="2">
|
||||||
|
The subdivision amount of the second quadrant on the shadow atlas.
|
||||||
|
</member>
|
||||||
|
<member name="positional_shadow_atlas_quad_2" type="int" setter="set_positional_shadow_atlas_quadrant_subdiv" getter="get_positional_shadow_atlas_quadrant_subdiv" enum="Viewport.PositionalShadowAtlasQuadrantSubdiv" default="3">
|
||||||
|
The subdivision amount of the third quadrant on the shadow atlas.
|
||||||
|
</member>
|
||||||
|
<member name="positional_shadow_atlas_quad_3" type="int" setter="set_positional_shadow_atlas_quadrant_subdiv" getter="get_positional_shadow_atlas_quadrant_subdiv" enum="Viewport.PositionalShadowAtlasQuadrantSubdiv" default="4">
|
||||||
|
The subdivision amount of the fourth quadrant on the shadow atlas.
|
||||||
|
</member>
|
||||||
|
<member name="positional_shadow_atlas_size" type="int" setter="set_positional_shadow_atlas_size" getter="get_positional_shadow_atlas_size" default="2048">
|
||||||
|
The shadow atlas' resolution (used for omni and spot lights). The value will be rounded up to the nearest power of 2.
|
||||||
|
[b]Note:[/b] If this is set to [code]0[/code], no shadows will be visible at all (including directional shadows).
|
||||||
|
</member>
|
||||||
<member name="scaling_3d_mode" type="int" setter="set_scaling_3d_mode" getter="get_scaling_3d_mode" enum="Viewport.Scaling3DMode" default="0">
|
<member name="scaling_3d_mode" type="int" setter="set_scaling_3d_mode" getter="get_scaling_3d_mode" enum="Viewport.Scaling3DMode" default="0">
|
||||||
Sets scaling 3d mode. Bilinear scaling renders at different resolution to either undersample or supersample the viewport. FidelityFX Super Resolution 1.0, abbreviated to FSR, is an upscaling technology that produces high quality images at fast framerates by using a spatially aware upscaling algorithm. FSR is slightly more expensive than bilinear, but it produces significantly higher image quality. FSR should be used where possible.
|
Sets scaling 3d mode. Bilinear scaling renders at different resolution to either undersample or supersample the viewport. FidelityFX Super Resolution 1.0, abbreviated to FSR, is an upscaling technology that produces high quality images at fast framerates by using a spatially aware upscaling algorithm. FSR is slightly more expensive than bilinear, but it produces significantly higher image quality. FSR should be used where possible.
|
||||||
To control this property on the root viewport, set the [member ProjectSettings.rendering/scaling_3d/mode] project setting.
|
To control this property on the root viewport, set the [member ProjectSettings.rendering/scaling_3d/mode] project setting.
|
||||||
|
@ -248,24 +266,6 @@
|
||||||
</member>
|
</member>
|
||||||
<member name="sdf_scale" type="int" setter="set_sdf_scale" getter="get_sdf_scale" enum="Viewport.SDFScale" default="1">
|
<member name="sdf_scale" type="int" setter="set_sdf_scale" getter="get_sdf_scale" enum="Viewport.SDFScale" default="1">
|
||||||
</member>
|
</member>
|
||||||
<member name="shadow_atlas_16_bits" type="bool" setter="set_shadow_atlas_16_bits" getter="get_shadow_atlas_16_bits" default="true">
|
|
||||||
</member>
|
|
||||||
<member name="shadow_atlas_quad_0" type="int" setter="set_shadow_atlas_quadrant_subdiv" getter="get_shadow_atlas_quadrant_subdiv" enum="Viewport.ShadowAtlasQuadrantSubdiv" default="2">
|
|
||||||
The subdivision amount of the first quadrant on the shadow atlas.
|
|
||||||
</member>
|
|
||||||
<member name="shadow_atlas_quad_1" type="int" setter="set_shadow_atlas_quadrant_subdiv" getter="get_shadow_atlas_quadrant_subdiv" enum="Viewport.ShadowAtlasQuadrantSubdiv" default="2">
|
|
||||||
The subdivision amount of the second quadrant on the shadow atlas.
|
|
||||||
</member>
|
|
||||||
<member name="shadow_atlas_quad_2" type="int" setter="set_shadow_atlas_quadrant_subdiv" getter="get_shadow_atlas_quadrant_subdiv" enum="Viewport.ShadowAtlasQuadrantSubdiv" default="3">
|
|
||||||
The subdivision amount of the third quadrant on the shadow atlas.
|
|
||||||
</member>
|
|
||||||
<member name="shadow_atlas_quad_3" type="int" setter="set_shadow_atlas_quadrant_subdiv" getter="get_shadow_atlas_quadrant_subdiv" enum="Viewport.ShadowAtlasQuadrantSubdiv" default="4">
|
|
||||||
The subdivision amount of the fourth quadrant on the shadow atlas.
|
|
||||||
</member>
|
|
||||||
<member name="shadow_atlas_size" type="int" setter="set_shadow_atlas_size" getter="get_shadow_atlas_size" default="2048">
|
|
||||||
The shadow atlas' resolution (used for omni and spot lights). The value will be rounded up to the nearest power of 2.
|
|
||||||
[b]Note:[/b] If this is set to 0, shadows won't be visible.
|
|
||||||
</member>
|
|
||||||
<member name="snap_2d_transforms_to_pixel" type="bool" setter="set_snap_2d_transforms_to_pixel" getter="is_snap_2d_transforms_to_pixel_enabled" default="false">
|
<member name="snap_2d_transforms_to_pixel" type="bool" setter="set_snap_2d_transforms_to_pixel" getter="is_snap_2d_transforms_to_pixel_enabled" default="false">
|
||||||
</member>
|
</member>
|
||||||
<member name="snap_2d_vertices_to_pixel" type="bool" setter="set_snap_2d_vertices_to_pixel" getter="is_snap_2d_vertices_to_pixel_enabled" default="false">
|
<member name="snap_2d_vertices_to_pixel" type="bool" setter="set_snap_2d_vertices_to_pixel" getter="is_snap_2d_vertices_to_pixel_enabled" default="false">
|
||||||
|
@ -307,29 +307,29 @@
|
||||||
</signal>
|
</signal>
|
||||||
</signals>
|
</signals>
|
||||||
<constants>
|
<constants>
|
||||||
<constant name="SHADOW_ATLAS_QUADRANT_SUBDIV_DISABLED" value="0" enum="ShadowAtlasQuadrantSubdiv">
|
<constant name="SHADOW_ATLAS_QUADRANT_SUBDIV_DISABLED" value="0" enum="PositionalShadowAtlasQuadrantSubdiv">
|
||||||
This quadrant will not be used.
|
This quadrant will not be used.
|
||||||
</constant>
|
</constant>
|
||||||
<constant name="SHADOW_ATLAS_QUADRANT_SUBDIV_1" value="1" enum="ShadowAtlasQuadrantSubdiv">
|
<constant name="SHADOW_ATLAS_QUADRANT_SUBDIV_1" value="1" enum="PositionalShadowAtlasQuadrantSubdiv">
|
||||||
This quadrant will only be used by one shadow map.
|
This quadrant will only be used by one shadow map.
|
||||||
</constant>
|
</constant>
|
||||||
<constant name="SHADOW_ATLAS_QUADRANT_SUBDIV_4" value="2" enum="ShadowAtlasQuadrantSubdiv">
|
<constant name="SHADOW_ATLAS_QUADRANT_SUBDIV_4" value="2" enum="PositionalShadowAtlasQuadrantSubdiv">
|
||||||
This quadrant will be split in 4 and used by up to 4 shadow maps.
|
This quadrant will be split in 4 and used by up to 4 shadow maps.
|
||||||
</constant>
|
</constant>
|
||||||
<constant name="SHADOW_ATLAS_QUADRANT_SUBDIV_16" value="3" enum="ShadowAtlasQuadrantSubdiv">
|
<constant name="SHADOW_ATLAS_QUADRANT_SUBDIV_16" value="3" enum="PositionalShadowAtlasQuadrantSubdiv">
|
||||||
This quadrant will be split 16 ways and used by up to 16 shadow maps.
|
This quadrant will be split 16 ways and used by up to 16 shadow maps.
|
||||||
</constant>
|
</constant>
|
||||||
<constant name="SHADOW_ATLAS_QUADRANT_SUBDIV_64" value="4" enum="ShadowAtlasQuadrantSubdiv">
|
<constant name="SHADOW_ATLAS_QUADRANT_SUBDIV_64" value="4" enum="PositionalShadowAtlasQuadrantSubdiv">
|
||||||
This quadrant will be split 64 ways and used by up to 64 shadow maps.
|
This quadrant will be split 64 ways and used by up to 64 shadow maps.
|
||||||
</constant>
|
</constant>
|
||||||
<constant name="SHADOW_ATLAS_QUADRANT_SUBDIV_256" value="5" enum="ShadowAtlasQuadrantSubdiv">
|
<constant name="SHADOW_ATLAS_QUADRANT_SUBDIV_256" value="5" enum="PositionalShadowAtlasQuadrantSubdiv">
|
||||||
This quadrant will be split 256 ways and used by up to 256 shadow maps. Unless the [member shadow_atlas_size] is very high, the shadows in this quadrant will be very low resolution.
|
This quadrant will be split 256 ways and used by up to 256 shadow maps. Unless the [member positional_shadow_atlas_size] is very high, the shadows in this quadrant will be very low resolution.
|
||||||
</constant>
|
</constant>
|
||||||
<constant name="SHADOW_ATLAS_QUADRANT_SUBDIV_1024" value="6" enum="ShadowAtlasQuadrantSubdiv">
|
<constant name="SHADOW_ATLAS_QUADRANT_SUBDIV_1024" value="6" enum="PositionalShadowAtlasQuadrantSubdiv">
|
||||||
This quadrant will be split 1024 ways and used by up to 1024 shadow maps. Unless the [member shadow_atlas_size] is very high, the shadows in this quadrant will be very low resolution.
|
This quadrant will be split 1024 ways and used by up to 1024 shadow maps. Unless the [member positional_shadow_atlas_size] is very high, the shadows in this quadrant will be very low resolution.
|
||||||
</constant>
|
</constant>
|
||||||
<constant name="SHADOW_ATLAS_QUADRANT_SUBDIV_MAX" value="7" enum="ShadowAtlasQuadrantSubdiv">
|
<constant name="SHADOW_ATLAS_QUADRANT_SUBDIV_MAX" value="7" enum="PositionalShadowAtlasQuadrantSubdiv">
|
||||||
Represents the size of the [enum ShadowAtlasQuadrantSubdiv] enum.
|
Represents the size of the [enum PositionalShadowAtlasQuadrantSubdiv] enum.
|
||||||
</constant>
|
</constant>
|
||||||
<constant name="SCALING_3D_MODE_BILINEAR" value="0" enum="Scaling3DMode">
|
<constant name="SCALING_3D_MODE_BILINEAR" value="0" enum="Scaling3DMode">
|
||||||
Use bilinear scaling for the viewport's 3D buffer. The amount of scaling can be set using [member scaling_3d_scale]. Values less then [code]1.0[/code] will result in undersampling while values greater than [code]1.0[/code] will result in supersampling. A value of [code]1.0[/code] disables scaling.
|
Use bilinear scaling for the viewport's 3D buffer. The amount of scaling can be set using [member scaling_3d_scale]. Values less then [code]1.0[/code] will result in undersampling while values greater than [code]1.0[/code] will result in supersampling. A value of [code]1.0[/code] disables scaling.
|
||||||
|
|
|
@ -1313,10 +1313,10 @@ void RasterizerSceneGLES3::camera_effects_set_dof_blur(RID p_camera_effects, boo
|
||||||
void RasterizerSceneGLES3::camera_effects_set_custom_exposure(RID p_camera_effects, bool p_enable, float p_exposure) {
|
void RasterizerSceneGLES3::camera_effects_set_custom_exposure(RID p_camera_effects, bool p_enable, float p_exposure) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void RasterizerSceneGLES3::shadows_quality_set(RS::ShadowQuality p_quality) {
|
void RasterizerSceneGLES3::positional_soft_shadow_filter_set_quality(RS::ShadowQuality p_quality) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void RasterizerSceneGLES3::directional_shadow_quality_set(RS::ShadowQuality p_quality) {
|
void RasterizerSceneGLES3::directional_soft_shadow_filter_set_quality(RS::ShadowQuality p_quality) {
|
||||||
}
|
}
|
||||||
|
|
||||||
RID RasterizerSceneGLES3::light_instance_create(RID p_light) {
|
RID RasterizerSceneGLES3::light_instance_create(RID p_light) {
|
||||||
|
|
|
@ -855,8 +855,8 @@ public:
|
||||||
void camera_effects_set_dof_blur(RID p_camera_effects, bool p_far_enable, float p_far_distance, float p_far_transition, bool p_near_enable, float p_near_distance, float p_near_transition, float p_amount) override;
|
void camera_effects_set_dof_blur(RID p_camera_effects, bool p_far_enable, float p_far_distance, float p_far_transition, bool p_near_enable, float p_near_distance, float p_near_transition, float p_amount) override;
|
||||||
void camera_effects_set_custom_exposure(RID p_camera_effects, bool p_enable, float p_exposure) override;
|
void camera_effects_set_custom_exposure(RID p_camera_effects, bool p_enable, float p_exposure) override;
|
||||||
|
|
||||||
void shadows_quality_set(RS::ShadowQuality p_quality) override;
|
void positional_soft_shadow_filter_set_quality(RS::ShadowQuality p_quality) override;
|
||||||
void directional_shadow_quality_set(RS::ShadowQuality p_quality) override;
|
void directional_soft_shadow_filter_set_quality(RS::ShadowQuality p_quality) override;
|
||||||
|
|
||||||
RID light_instance_create(RID p_light) override;
|
RID light_instance_create(RID p_light) override;
|
||||||
void light_instance_set_transform(RID p_light_instance, const Transform3D &p_transform) override;
|
void light_instance_set_transform(RID p_light_instance, const Transform3D &p_transform) override;
|
||||||
|
|
|
@ -512,10 +512,10 @@ void EditorNode::_update_from_settings() {
|
||||||
uint32_t directional_shadow_16_bits = GLOBAL_GET("rendering/shadows/directional_shadow/16_bits");
|
uint32_t directional_shadow_16_bits = GLOBAL_GET("rendering/shadows/directional_shadow/16_bits");
|
||||||
RS::get_singleton()->directional_shadow_atlas_set_size(directional_shadow_size, directional_shadow_16_bits);
|
RS::get_singleton()->directional_shadow_atlas_set_size(directional_shadow_size, directional_shadow_16_bits);
|
||||||
|
|
||||||
RS::ShadowQuality shadows_quality = RS::ShadowQuality(int(GLOBAL_GET("rendering/shadows/shadows/soft_shadow_quality")));
|
RS::ShadowQuality shadows_quality = RS::ShadowQuality(int(GLOBAL_GET("rendering/shadows/positional_shadow/soft_shadow_filter_quality")));
|
||||||
RS::get_singleton()->shadows_quality_set(shadows_quality);
|
RS::get_singleton()->positional_soft_shadow_filter_set_quality(shadows_quality);
|
||||||
RS::ShadowQuality directional_shadow_quality = RS::ShadowQuality(int(GLOBAL_GET("rendering/shadows/directional_shadow/soft_shadow_quality")));
|
RS::ShadowQuality directional_shadow_quality = RS::ShadowQuality(int(GLOBAL_GET("rendering/shadows/directional_shadow/soft_shadow_filter_quality")));
|
||||||
RS::get_singleton()->directional_shadow_quality_set(directional_shadow_quality);
|
RS::get_singleton()->directional_soft_shadow_filter_set_quality(directional_shadow_quality);
|
||||||
float probe_update_speed = GLOBAL_GET("rendering/lightmapping/probe_capture/update_speed");
|
float probe_update_speed = GLOBAL_GET("rendering/lightmapping/probe_capture/update_speed");
|
||||||
RS::get_singleton()->lightmap_set_probe_capture_update_speed(probe_update_speed);
|
RS::get_singleton()->lightmap_set_probe_capture_update_speed(probe_update_speed);
|
||||||
RS::EnvironmentSDFGIFramesToConverge frames_to_converge = RS::EnvironmentSDFGIFramesToConverge(int(GLOBAL_GET("rendering/global_illumination/sdfgi/frames_to_converge")));
|
RS::EnvironmentSDFGIFramesToConverge frames_to_converge = RS::EnvironmentSDFGIFramesToConverge(int(GLOBAL_GET("rendering/global_illumination/sdfgi/frames_to_converge")));
|
||||||
|
|
|
@ -2379,19 +2379,19 @@ void Node3DEditorPlugin::edited_scene_changed() {
|
||||||
|
|
||||||
void Node3DEditorViewport::_project_settings_changed() {
|
void Node3DEditorViewport::_project_settings_changed() {
|
||||||
//update shadow atlas if changed
|
//update shadow atlas if changed
|
||||||
int shadowmap_size = ProjectSettings::get_singleton()->get("rendering/shadows/shadow_atlas/size");
|
int shadowmap_size = ProjectSettings::get_singleton()->get("rendering/shadows/positional_shadow/atlas_size");
|
||||||
bool shadowmap_16_bits = ProjectSettings::get_singleton()->get("rendering/shadows/shadow_atlas/16_bits");
|
bool shadowmap_16_bits = ProjectSettings::get_singleton()->get("rendering/shadows/positional_shadow/atlas_16_bits");
|
||||||
int atlas_q0 = ProjectSettings::get_singleton()->get("rendering/shadows/shadow_atlas/quadrant_0_subdiv");
|
int atlas_q0 = ProjectSettings::get_singleton()->get("rendering/shadows/positional_shadow/atlas_quadrant_0_subdiv");
|
||||||
int atlas_q1 = ProjectSettings::get_singleton()->get("rendering/shadows/shadow_atlas/quadrant_1_subdiv");
|
int atlas_q1 = ProjectSettings::get_singleton()->get("rendering/shadows/positional_shadow/atlas_quadrant_1_subdiv");
|
||||||
int atlas_q2 = ProjectSettings::get_singleton()->get("rendering/shadows/shadow_atlas/quadrant_2_subdiv");
|
int atlas_q2 = ProjectSettings::get_singleton()->get("rendering/shadows/positional_shadow/atlas_quadrant_2_subdiv");
|
||||||
int atlas_q3 = ProjectSettings::get_singleton()->get("rendering/shadows/shadow_atlas/quadrant_3_subdiv");
|
int atlas_q3 = ProjectSettings::get_singleton()->get("rendering/shadows/positional_shadow/atlas_quadrant_3_subdiv");
|
||||||
|
|
||||||
viewport->set_shadow_atlas_size(shadowmap_size);
|
viewport->set_positional_shadow_atlas_size(shadowmap_size);
|
||||||
viewport->set_shadow_atlas_16_bits(shadowmap_16_bits);
|
viewport->set_positional_shadow_atlas_16_bits(shadowmap_16_bits);
|
||||||
viewport->set_shadow_atlas_quadrant_subdiv(0, Viewport::ShadowAtlasQuadrantSubdiv(atlas_q0));
|
viewport->set_positional_shadow_atlas_quadrant_subdiv(0, Viewport::PositionalShadowAtlasQuadrantSubdiv(atlas_q0));
|
||||||
viewport->set_shadow_atlas_quadrant_subdiv(1, Viewport::ShadowAtlasQuadrantSubdiv(atlas_q1));
|
viewport->set_positional_shadow_atlas_quadrant_subdiv(1, Viewport::PositionalShadowAtlasQuadrantSubdiv(atlas_q1));
|
||||||
viewport->set_shadow_atlas_quadrant_subdiv(2, Viewport::ShadowAtlasQuadrantSubdiv(atlas_q2));
|
viewport->set_positional_shadow_atlas_quadrant_subdiv(2, Viewport::PositionalShadowAtlasQuadrantSubdiv(atlas_q2));
|
||||||
viewport->set_shadow_atlas_quadrant_subdiv(3, Viewport::ShadowAtlasQuadrantSubdiv(atlas_q3));
|
viewport->set_positional_shadow_atlas_quadrant_subdiv(3, Viewport::PositionalShadowAtlasQuadrantSubdiv(atlas_q3));
|
||||||
|
|
||||||
_update_shrink();
|
_update_shrink();
|
||||||
|
|
||||||
|
|
|
@ -1446,25 +1446,25 @@ SceneTree::SceneTree() {
|
||||||
bool snap_2d_vertices = GLOBAL_DEF("rendering/2d/snap/snap_2d_vertices_to_pixel", false);
|
bool snap_2d_vertices = GLOBAL_DEF("rendering/2d/snap/snap_2d_vertices_to_pixel", false);
|
||||||
root->set_snap_2d_vertices_to_pixel(snap_2d_vertices);
|
root->set_snap_2d_vertices_to_pixel(snap_2d_vertices);
|
||||||
|
|
||||||
int shadowmap_size = GLOBAL_DEF("rendering/shadows/shadow_atlas/size", 4096);
|
int shadowmap_size = GLOBAL_DEF("rendering/shadows/positional_shadow/atlas_size", 4096);
|
||||||
ProjectSettings::get_singleton()->set_custom_property_info("rendering/shadows/shadow_atlas/size", PropertyInfo(Variant::INT, "rendering/shadows/shadow_atlas/size", PROPERTY_HINT_RANGE, "256,16384"));
|
ProjectSettings::get_singleton()->set_custom_property_info("rendering/shadows/positional_shadow/atlas_size", PropertyInfo(Variant::INT, "rendering/shadows/positional_shadow/atlas_size", PROPERTY_HINT_RANGE, "256,16384"));
|
||||||
GLOBAL_DEF("rendering/shadows/shadow_atlas/size.mobile", 2048);
|
GLOBAL_DEF("rendering/shadows/positional_shadow/atlas_size.mobile", 2048);
|
||||||
bool shadowmap_16_bits = GLOBAL_DEF("rendering/shadows/shadow_atlas/16_bits", true);
|
bool shadowmap_16_bits = GLOBAL_DEF("rendering/shadows/positional_shadow/atlas_16_bits", true);
|
||||||
int atlas_q0 = GLOBAL_DEF("rendering/shadows/shadow_atlas/quadrant_0_subdiv", 2);
|
int atlas_q0 = GLOBAL_DEF("rendering/shadows/positional_shadow/atlas_quadrant_0_subdiv", 2);
|
||||||
int atlas_q1 = GLOBAL_DEF("rendering/shadows/shadow_atlas/quadrant_1_subdiv", 2);
|
int atlas_q1 = GLOBAL_DEF("rendering/shadows/positional_shadow/atlas_quadrant_1_subdiv", 2);
|
||||||
int atlas_q2 = GLOBAL_DEF("rendering/shadows/shadow_atlas/quadrant_2_subdiv", 3);
|
int atlas_q2 = GLOBAL_DEF("rendering/shadows/positional_shadow/atlas_quadrant_2_subdiv", 3);
|
||||||
int atlas_q3 = GLOBAL_DEF("rendering/shadows/shadow_atlas/quadrant_3_subdiv", 4);
|
int atlas_q3 = GLOBAL_DEF("rendering/shadows/positional_shadow/atlas_quadrant_3_subdiv", 4);
|
||||||
ProjectSettings::get_singleton()->set_custom_property_info("rendering/shadows/shadow_atlas/quadrant_0_subdiv", PropertyInfo(Variant::INT, "rendering/shadows/shadow_atlas/quadrant_0_subdiv", PROPERTY_HINT_ENUM, "Disabled,1 Shadow,4 Shadows,16 Shadows,64 Shadows,256 Shadows,1024 Shadows"));
|
ProjectSettings::get_singleton()->set_custom_property_info("rendering/shadows/positional_shadow/atlas_quadrant_0_subdiv", PropertyInfo(Variant::INT, "rendering/shadows/positional_shadow/atlas_quadrant_0_subdiv", PROPERTY_HINT_ENUM, "Disabled,1 Shadow,4 Shadows,16 Shadows,64 Shadows,256 Shadows,1024 Shadows"));
|
||||||
ProjectSettings::get_singleton()->set_custom_property_info("rendering/shadows/shadow_atlas/quadrant_1_subdiv", PropertyInfo(Variant::INT, "rendering/shadows/shadow_atlas/quadrant_1_subdiv", PROPERTY_HINT_ENUM, "Disabled,1 Shadow,4 Shadows,16 Shadows,64 Shadows,256 Shadows,1024 Shadows"));
|
ProjectSettings::get_singleton()->set_custom_property_info("rendering/shadows/positional_shadow/atlas_quadrant_1_subdiv", PropertyInfo(Variant::INT, "rendering/shadows/positional_shadow/atlas_quadrant_1_subdiv", PROPERTY_HINT_ENUM, "Disabled,1 Shadow,4 Shadows,16 Shadows,64 Shadows,256 Shadows,1024 Shadows"));
|
||||||
ProjectSettings::get_singleton()->set_custom_property_info("rendering/shadows/shadow_atlas/quadrant_2_subdiv", PropertyInfo(Variant::INT, "rendering/shadows/shadow_atlas/quadrant_2_subdiv", PROPERTY_HINT_ENUM, "Disabled,1 Shadow,4 Shadows,16 Shadows,64 Shadows,256 Shadows,1024 Shadows"));
|
ProjectSettings::get_singleton()->set_custom_property_info("rendering/shadows/positional_shadow/atlas_quadrant_2_subdiv", PropertyInfo(Variant::INT, "rendering/shadows/positional_shadow/atlas_quadrant_2_subdiv", PROPERTY_HINT_ENUM, "Disabled,1 Shadow,4 Shadows,16 Shadows,64 Shadows,256 Shadows,1024 Shadows"));
|
||||||
ProjectSettings::get_singleton()->set_custom_property_info("rendering/shadows/shadow_atlas/quadrant_3_subdiv", PropertyInfo(Variant::INT, "rendering/shadows/shadow_atlas/quadrant_3_subdiv", PROPERTY_HINT_ENUM, "Disabled,1 Shadow,4 Shadows,16 Shadows,64 Shadows,256 Shadows,1024 Shadows"));
|
ProjectSettings::get_singleton()->set_custom_property_info("rendering/shadows/positional_shadow/atlas_quadrant_3_subdiv", PropertyInfo(Variant::INT, "rendering/shadows/positional_shadow/atlas_quadrant_3_subdiv", PROPERTY_HINT_ENUM, "Disabled,1 Shadow,4 Shadows,16 Shadows,64 Shadows,256 Shadows,1024 Shadows"));
|
||||||
|
|
||||||
root->set_shadow_atlas_size(shadowmap_size);
|
root->set_positional_shadow_atlas_size(shadowmap_size);
|
||||||
root->set_shadow_atlas_16_bits(shadowmap_16_bits);
|
root->set_positional_shadow_atlas_16_bits(shadowmap_16_bits);
|
||||||
root->set_shadow_atlas_quadrant_subdiv(0, Viewport::ShadowAtlasQuadrantSubdiv(atlas_q0));
|
root->set_positional_shadow_atlas_quadrant_subdiv(0, Viewport::PositionalShadowAtlasQuadrantSubdiv(atlas_q0));
|
||||||
root->set_shadow_atlas_quadrant_subdiv(1, Viewport::ShadowAtlasQuadrantSubdiv(atlas_q1));
|
root->set_positional_shadow_atlas_quadrant_subdiv(1, Viewport::PositionalShadowAtlasQuadrantSubdiv(atlas_q1));
|
||||||
root->set_shadow_atlas_quadrant_subdiv(2, Viewport::ShadowAtlasQuadrantSubdiv(atlas_q2));
|
root->set_positional_shadow_atlas_quadrant_subdiv(2, Viewport::PositionalShadowAtlasQuadrantSubdiv(atlas_q2));
|
||||||
root->set_shadow_atlas_quadrant_subdiv(3, Viewport::ShadowAtlasQuadrantSubdiv(atlas_q3));
|
root->set_positional_shadow_atlas_quadrant_subdiv(3, Viewport::PositionalShadowAtlasQuadrantSubdiv(atlas_q3));
|
||||||
|
|
||||||
Viewport::SDFOversize sdf_oversize = Viewport::SDFOversize(int(GLOBAL_DEF("rendering/2d/sdf/oversize", 1)));
|
Viewport::SDFOversize sdf_oversize = Viewport::SDFOversize(int(GLOBAL_DEF("rendering/2d/sdf/oversize", 1)));
|
||||||
root->set_sdf_oversize(sdf_oversize);
|
root->set_sdf_oversize(sdf_oversize);
|
||||||
|
|
|
@ -1037,44 +1037,44 @@ Ref<ViewportTexture> Viewport::get_texture() const {
|
||||||
return default_texture;
|
return default_texture;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Viewport::set_shadow_atlas_size(int p_size) {
|
void Viewport::set_positional_shadow_atlas_size(int p_size) {
|
||||||
shadow_atlas_size = p_size;
|
positional_shadow_atlas_size = p_size;
|
||||||
RS::get_singleton()->viewport_set_shadow_atlas_size(viewport, p_size, shadow_atlas_16_bits);
|
RS::get_singleton()->viewport_set_positional_shadow_atlas_size(viewport, p_size, positional_shadow_atlas_16_bits);
|
||||||
}
|
}
|
||||||
|
|
||||||
int Viewport::get_shadow_atlas_size() const {
|
int Viewport::get_positional_shadow_atlas_size() const {
|
||||||
return shadow_atlas_size;
|
return positional_shadow_atlas_size;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Viewport::set_shadow_atlas_16_bits(bool p_16_bits) {
|
void Viewport::set_positional_shadow_atlas_16_bits(bool p_16_bits) {
|
||||||
if (shadow_atlas_16_bits == p_16_bits) {
|
if (positional_shadow_atlas_16_bits == p_16_bits) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
shadow_atlas_16_bits = p_16_bits;
|
positional_shadow_atlas_16_bits = p_16_bits;
|
||||||
RS::get_singleton()->viewport_set_shadow_atlas_size(viewport, shadow_atlas_size, shadow_atlas_16_bits);
|
RS::get_singleton()->viewport_set_positional_shadow_atlas_size(viewport, positional_shadow_atlas_size, positional_shadow_atlas_16_bits);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Viewport::get_shadow_atlas_16_bits() const {
|
bool Viewport::get_positional_shadow_atlas_16_bits() const {
|
||||||
return shadow_atlas_16_bits;
|
return positional_shadow_atlas_16_bits;
|
||||||
}
|
}
|
||||||
void Viewport::set_shadow_atlas_quadrant_subdiv(int p_quadrant, ShadowAtlasQuadrantSubdiv p_subdiv) {
|
void Viewport::set_positional_shadow_atlas_quadrant_subdiv(int p_quadrant, PositionalShadowAtlasQuadrantSubdiv p_subdiv) {
|
||||||
ERR_FAIL_INDEX(p_quadrant, 4);
|
ERR_FAIL_INDEX(p_quadrant, 4);
|
||||||
ERR_FAIL_INDEX(p_subdiv, SHADOW_ATLAS_QUADRANT_SUBDIV_MAX);
|
ERR_FAIL_INDEX(p_subdiv, SHADOW_ATLAS_QUADRANT_SUBDIV_MAX);
|
||||||
|
|
||||||
if (shadow_atlas_quadrant_subdiv[p_quadrant] == p_subdiv) {
|
if (positional_shadow_atlas_quadrant_subdiv[p_quadrant] == p_subdiv) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
shadow_atlas_quadrant_subdiv[p_quadrant] = p_subdiv;
|
positional_shadow_atlas_quadrant_subdiv[p_quadrant] = p_subdiv;
|
||||||
static const int subdiv[SHADOW_ATLAS_QUADRANT_SUBDIV_MAX] = { 0, 1, 4, 16, 64, 256, 1024 };
|
static const int subdiv[SHADOW_ATLAS_QUADRANT_SUBDIV_MAX] = { 0, 1, 4, 16, 64, 256, 1024 };
|
||||||
|
|
||||||
RS::get_singleton()->viewport_set_shadow_atlas_quadrant_subdivision(viewport, p_quadrant, subdiv[p_subdiv]);
|
RS::get_singleton()->viewport_set_positional_shadow_atlas_quadrant_subdivision(viewport, p_quadrant, subdiv[p_subdiv]);
|
||||||
}
|
}
|
||||||
|
|
||||||
Viewport::ShadowAtlasQuadrantSubdiv Viewport::get_shadow_atlas_quadrant_subdiv(int p_quadrant) const {
|
Viewport::PositionalShadowAtlasQuadrantSubdiv Viewport::get_positional_shadow_atlas_quadrant_subdiv(int p_quadrant) const {
|
||||||
ERR_FAIL_INDEX_V(p_quadrant, 4, SHADOW_ATLAS_QUADRANT_SUBDIV_DISABLED);
|
ERR_FAIL_INDEX_V(p_quadrant, 4, SHADOW_ATLAS_QUADRANT_SUBDIV_DISABLED);
|
||||||
return shadow_atlas_quadrant_subdiv[p_quadrant];
|
return positional_shadow_atlas_quadrant_subdiv[p_quadrant];
|
||||||
}
|
}
|
||||||
|
|
||||||
Transform2D Viewport::_get_input_pre_xform() const {
|
Transform2D Viewport::_get_input_pre_xform() const {
|
||||||
|
@ -3667,11 +3667,11 @@ void Viewport::_bind_methods() {
|
||||||
ClassDB::bind_method(D_METHOD("_gui_remove_focus_for_window"), &Viewport::_gui_remove_focus_for_window);
|
ClassDB::bind_method(D_METHOD("_gui_remove_focus_for_window"), &Viewport::_gui_remove_focus_for_window);
|
||||||
ClassDB::bind_method(D_METHOD("_post_gui_grab_click_focus"), &Viewport::_post_gui_grab_click_focus);
|
ClassDB::bind_method(D_METHOD("_post_gui_grab_click_focus"), &Viewport::_post_gui_grab_click_focus);
|
||||||
|
|
||||||
ClassDB::bind_method(D_METHOD("set_shadow_atlas_size", "size"), &Viewport::set_shadow_atlas_size);
|
ClassDB::bind_method(D_METHOD("set_positional_shadow_atlas_size", "size"), &Viewport::set_positional_shadow_atlas_size);
|
||||||
ClassDB::bind_method(D_METHOD("get_shadow_atlas_size"), &Viewport::get_shadow_atlas_size);
|
ClassDB::bind_method(D_METHOD("get_positional_shadow_atlas_size"), &Viewport::get_positional_shadow_atlas_size);
|
||||||
|
|
||||||
ClassDB::bind_method(D_METHOD("set_shadow_atlas_16_bits", "enable"), &Viewport::set_shadow_atlas_16_bits);
|
ClassDB::bind_method(D_METHOD("set_positional_shadow_atlas_16_bits", "enable"), &Viewport::set_positional_shadow_atlas_16_bits);
|
||||||
ClassDB::bind_method(D_METHOD("get_shadow_atlas_16_bits"), &Viewport::get_shadow_atlas_16_bits);
|
ClassDB::bind_method(D_METHOD("get_positional_shadow_atlas_16_bits"), &Viewport::get_positional_shadow_atlas_16_bits);
|
||||||
|
|
||||||
ClassDB::bind_method(D_METHOD("set_snap_controls_to_pixels", "enabled"), &Viewport::set_snap_controls_to_pixels);
|
ClassDB::bind_method(D_METHOD("set_snap_controls_to_pixels", "enabled"), &Viewport::set_snap_controls_to_pixels);
|
||||||
ClassDB::bind_method(D_METHOD("is_snap_controls_to_pixels_enabled"), &Viewport::is_snap_controls_to_pixels_enabled);
|
ClassDB::bind_method(D_METHOD("is_snap_controls_to_pixels_enabled"), &Viewport::is_snap_controls_to_pixels_enabled);
|
||||||
|
@ -3682,8 +3682,8 @@ void Viewport::_bind_methods() {
|
||||||
ClassDB::bind_method(D_METHOD("set_snap_2d_vertices_to_pixel", "enabled"), &Viewport::set_snap_2d_vertices_to_pixel);
|
ClassDB::bind_method(D_METHOD("set_snap_2d_vertices_to_pixel", "enabled"), &Viewport::set_snap_2d_vertices_to_pixel);
|
||||||
ClassDB::bind_method(D_METHOD("is_snap_2d_vertices_to_pixel_enabled"), &Viewport::is_snap_2d_vertices_to_pixel_enabled);
|
ClassDB::bind_method(D_METHOD("is_snap_2d_vertices_to_pixel_enabled"), &Viewport::is_snap_2d_vertices_to_pixel_enabled);
|
||||||
|
|
||||||
ClassDB::bind_method(D_METHOD("set_shadow_atlas_quadrant_subdiv", "quadrant", "subdiv"), &Viewport::set_shadow_atlas_quadrant_subdiv);
|
ClassDB::bind_method(D_METHOD("set_positional_shadow_atlas_quadrant_subdiv", "quadrant", "subdiv"), &Viewport::set_positional_shadow_atlas_quadrant_subdiv);
|
||||||
ClassDB::bind_method(D_METHOD("get_shadow_atlas_quadrant_subdiv", "quadrant"), &Viewport::get_shadow_atlas_quadrant_subdiv);
|
ClassDB::bind_method(D_METHOD("get_positional_shadow_atlas_quadrant_subdiv", "quadrant"), &Viewport::get_positional_shadow_atlas_quadrant_subdiv);
|
||||||
|
|
||||||
ClassDB::bind_method(D_METHOD("set_input_as_handled"), &Viewport::set_input_as_handled);
|
ClassDB::bind_method(D_METHOD("set_input_as_handled"), &Viewport::set_input_as_handled);
|
||||||
ClassDB::bind_method(D_METHOD("is_input_handled"), &Viewport::is_input_handled);
|
ClassDB::bind_method(D_METHOD("is_input_handled"), &Viewport::is_input_handled);
|
||||||
|
@ -3783,13 +3783,13 @@ void Viewport::_bind_methods() {
|
||||||
ADD_GROUP("SDF", "sdf_");
|
ADD_GROUP("SDF", "sdf_");
|
||||||
ADD_PROPERTY(PropertyInfo(Variant::INT, "sdf_oversize", PROPERTY_HINT_ENUM, "100%,120%,150%,200%"), "set_sdf_oversize", "get_sdf_oversize");
|
ADD_PROPERTY(PropertyInfo(Variant::INT, "sdf_oversize", PROPERTY_HINT_ENUM, "100%,120%,150%,200%"), "set_sdf_oversize", "get_sdf_oversize");
|
||||||
ADD_PROPERTY(PropertyInfo(Variant::INT, "sdf_scale", PROPERTY_HINT_ENUM, "100%,50%,25%"), "set_sdf_scale", "get_sdf_scale");
|
ADD_PROPERTY(PropertyInfo(Variant::INT, "sdf_scale", PROPERTY_HINT_ENUM, "100%,50%,25%"), "set_sdf_scale", "get_sdf_scale");
|
||||||
ADD_GROUP("Shadow Atlas", "shadow_atlas_");
|
ADD_GROUP("Positional Shadow Atlas", "positional_shadow_atlas_");
|
||||||
ADD_PROPERTY(PropertyInfo(Variant::INT, "shadow_atlas_size"), "set_shadow_atlas_size", "get_shadow_atlas_size");
|
ADD_PROPERTY(PropertyInfo(Variant::INT, "positional_shadow_atlas_size"), "set_positional_shadow_atlas_size", "get_positional_shadow_atlas_size");
|
||||||
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "shadow_atlas_16_bits"), "set_shadow_atlas_16_bits", "get_shadow_atlas_16_bits");
|
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "positional_shadow_atlas_16_bits"), "set_positional_shadow_atlas_16_bits", "get_positional_shadow_atlas_16_bits");
|
||||||
ADD_PROPERTYI(PropertyInfo(Variant::INT, "shadow_atlas_quad_0", PROPERTY_HINT_ENUM, "Disabled,1 Shadow,4 Shadows,16 Shadows,64 Shadows,256 Shadows,1024 Shadows"), "set_shadow_atlas_quadrant_subdiv", "get_shadow_atlas_quadrant_subdiv", 0);
|
ADD_PROPERTYI(PropertyInfo(Variant::INT, "positional_shadow_atlas_quad_0", PROPERTY_HINT_ENUM, "Disabled,1 Shadow,4 Shadows,16 Shadows,64 Shadows,256 Shadows,1024 Shadows"), "set_positional_shadow_atlas_quadrant_subdiv", "get_positional_shadow_atlas_quadrant_subdiv", 0);
|
||||||
ADD_PROPERTYI(PropertyInfo(Variant::INT, "shadow_atlas_quad_1", PROPERTY_HINT_ENUM, "Disabled,1 Shadow,4 Shadows,16 Shadows,64 Shadows,256 Shadows,1024 Shadows"), "set_shadow_atlas_quadrant_subdiv", "get_shadow_atlas_quadrant_subdiv", 1);
|
ADD_PROPERTYI(PropertyInfo(Variant::INT, "positional_shadow_atlas_quad_1", PROPERTY_HINT_ENUM, "Disabled,1 Shadow,4 Shadows,16 Shadows,64 Shadows,256 Shadows,1024 Shadows"), "set_positional_shadow_atlas_quadrant_subdiv", "get_positional_shadow_atlas_quadrant_subdiv", 1);
|
||||||
ADD_PROPERTYI(PropertyInfo(Variant::INT, "shadow_atlas_quad_2", PROPERTY_HINT_ENUM, "Disabled,1 Shadow,4 Shadows,16 Shadows,64 Shadows,256 Shadows,1024 Shadows"), "set_shadow_atlas_quadrant_subdiv", "get_shadow_atlas_quadrant_subdiv", 2);
|
ADD_PROPERTYI(PropertyInfo(Variant::INT, "positional_shadow_atlas_quad_2", PROPERTY_HINT_ENUM, "Disabled,1 Shadow,4 Shadows,16 Shadows,64 Shadows,256 Shadows,1024 Shadows"), "set_positional_shadow_atlas_quadrant_subdiv", "get_positional_shadow_atlas_quadrant_subdiv", 2);
|
||||||
ADD_PROPERTYI(PropertyInfo(Variant::INT, "shadow_atlas_quad_3", PROPERTY_HINT_ENUM, "Disabled,1 Shadow,4 Shadows,16 Shadows,64 Shadows,256 Shadows,1024 Shadows"), "set_shadow_atlas_quadrant_subdiv", "get_shadow_atlas_quadrant_subdiv", 3);
|
ADD_PROPERTYI(PropertyInfo(Variant::INT, "positional_shadow_atlas_quad_3", PROPERTY_HINT_ENUM, "Disabled,1 Shadow,4 Shadows,16 Shadows,64 Shadows,256 Shadows,1024 Shadows"), "set_positional_shadow_atlas_quadrant_subdiv", "get_positional_shadow_atlas_quadrant_subdiv", 3);
|
||||||
ADD_PROPERTY(PropertyInfo(Variant::TRANSFORM2D, "canvas_transform", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NONE), "set_canvas_transform", "get_canvas_transform");
|
ADD_PROPERTY(PropertyInfo(Variant::TRANSFORM2D, "canvas_transform", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NONE), "set_canvas_transform", "get_canvas_transform");
|
||||||
ADD_PROPERTY(PropertyInfo(Variant::TRANSFORM2D, "global_canvas_transform", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NONE), "set_global_canvas_transform", "get_global_canvas_transform");
|
ADD_PROPERTY(PropertyInfo(Variant::TRANSFORM2D, "global_canvas_transform", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NONE), "set_global_canvas_transform", "get_global_canvas_transform");
|
||||||
|
|
||||||
|
@ -3891,15 +3891,15 @@ Viewport::Viewport() {
|
||||||
|
|
||||||
canvas_layers.insert(nullptr); // This eases picking code (interpreted as the canvas of the Viewport).
|
canvas_layers.insert(nullptr); // This eases picking code (interpreted as the canvas of the Viewport).
|
||||||
|
|
||||||
set_shadow_atlas_size(shadow_atlas_size);
|
set_positional_shadow_atlas_size(positional_shadow_atlas_size);
|
||||||
|
|
||||||
for (int i = 0; i < 4; i++) {
|
for (int i = 0; i < 4; i++) {
|
||||||
shadow_atlas_quadrant_subdiv[i] = SHADOW_ATLAS_QUADRANT_SUBDIV_MAX;
|
positional_shadow_atlas_quadrant_subdiv[i] = SHADOW_ATLAS_QUADRANT_SUBDIV_MAX;
|
||||||
}
|
}
|
||||||
set_shadow_atlas_quadrant_subdiv(0, SHADOW_ATLAS_QUADRANT_SUBDIV_4);
|
set_positional_shadow_atlas_quadrant_subdiv(0, SHADOW_ATLAS_QUADRANT_SUBDIV_4);
|
||||||
set_shadow_atlas_quadrant_subdiv(1, SHADOW_ATLAS_QUADRANT_SUBDIV_4);
|
set_positional_shadow_atlas_quadrant_subdiv(1, SHADOW_ATLAS_QUADRANT_SUBDIV_4);
|
||||||
set_shadow_atlas_quadrant_subdiv(2, SHADOW_ATLAS_QUADRANT_SUBDIV_16);
|
set_positional_shadow_atlas_quadrant_subdiv(2, SHADOW_ATLAS_QUADRANT_SUBDIV_16);
|
||||||
set_shadow_atlas_quadrant_subdiv(3, SHADOW_ATLAS_QUADRANT_SUBDIV_64);
|
set_positional_shadow_atlas_quadrant_subdiv(3, SHADOW_ATLAS_QUADRANT_SUBDIV_64);
|
||||||
|
|
||||||
set_mesh_lod_threshold(mesh_lod_threshold);
|
set_mesh_lod_threshold(mesh_lod_threshold);
|
||||||
|
|
||||||
|
|
|
@ -95,7 +95,7 @@ public:
|
||||||
SCALING_3D_MODE_MAX
|
SCALING_3D_MODE_MAX
|
||||||
};
|
};
|
||||||
|
|
||||||
enum ShadowAtlasQuadrantSubdiv {
|
enum PositionalShadowAtlasQuadrantSubdiv {
|
||||||
SHADOW_ATLAS_QUADRANT_SUBDIV_DISABLED,
|
SHADOW_ATLAS_QUADRANT_SUBDIV_DISABLED,
|
||||||
SHADOW_ATLAS_QUADRANT_SUBDIV_1,
|
SHADOW_ATLAS_QUADRANT_SUBDIV_1,
|
||||||
SHADOW_ATLAS_QUADRANT_SUBDIV_4,
|
SHADOW_ATLAS_QUADRANT_SUBDIV_4,
|
||||||
|
@ -286,9 +286,9 @@ private:
|
||||||
|
|
||||||
DebugDraw debug_draw = DEBUG_DRAW_DISABLED;
|
DebugDraw debug_draw = DEBUG_DRAW_DISABLED;
|
||||||
|
|
||||||
int shadow_atlas_size = 2048;
|
int positional_shadow_atlas_size = 2048;
|
||||||
bool shadow_atlas_16_bits = true;
|
bool positional_shadow_atlas_16_bits = true;
|
||||||
ShadowAtlasQuadrantSubdiv shadow_atlas_quadrant_subdiv[4];
|
PositionalShadowAtlasQuadrantSubdiv positional_shadow_atlas_quadrant_subdiv[4];
|
||||||
|
|
||||||
MSAA msaa = MSAA_DISABLED;
|
MSAA msaa = MSAA_DISABLED;
|
||||||
ScreenSpaceAA screen_space_aa = SCREEN_SPACE_AA_DISABLED;
|
ScreenSpaceAA screen_space_aa = SCREEN_SPACE_AA_DISABLED;
|
||||||
|
@ -502,14 +502,14 @@ public:
|
||||||
|
|
||||||
Ref<ViewportTexture> get_texture() const;
|
Ref<ViewportTexture> get_texture() const;
|
||||||
|
|
||||||
void set_shadow_atlas_size(int p_size);
|
void set_positional_shadow_atlas_size(int p_size);
|
||||||
int get_shadow_atlas_size() const;
|
int get_positional_shadow_atlas_size() const;
|
||||||
|
|
||||||
void set_shadow_atlas_16_bits(bool p_16_bits);
|
void set_positional_shadow_atlas_16_bits(bool p_16_bits);
|
||||||
bool get_shadow_atlas_16_bits() const;
|
bool get_positional_shadow_atlas_16_bits() const;
|
||||||
|
|
||||||
void set_shadow_atlas_quadrant_subdiv(int p_quadrant, ShadowAtlasQuadrantSubdiv p_subdiv);
|
void set_positional_shadow_atlas_quadrant_subdiv(int p_quadrant, PositionalShadowAtlasQuadrantSubdiv p_subdiv);
|
||||||
ShadowAtlasQuadrantSubdiv get_shadow_atlas_quadrant_subdiv(int p_quadrant) const;
|
PositionalShadowAtlasQuadrantSubdiv get_positional_shadow_atlas_quadrant_subdiv(int p_quadrant) const;
|
||||||
|
|
||||||
void set_msaa(MSAA p_msaa);
|
void set_msaa(MSAA p_msaa);
|
||||||
MSAA get_msaa() const;
|
MSAA get_msaa() const;
|
||||||
|
@ -746,7 +746,7 @@ public:
|
||||||
};
|
};
|
||||||
VARIANT_ENUM_CAST(Viewport::Scaling3DMode);
|
VARIANT_ENUM_CAST(Viewport::Scaling3DMode);
|
||||||
VARIANT_ENUM_CAST(SubViewport::UpdateMode);
|
VARIANT_ENUM_CAST(SubViewport::UpdateMode);
|
||||||
VARIANT_ENUM_CAST(Viewport::ShadowAtlasQuadrantSubdiv);
|
VARIANT_ENUM_CAST(Viewport::PositionalShadowAtlasQuadrantSubdiv);
|
||||||
VARIANT_ENUM_CAST(Viewport::MSAA);
|
VARIANT_ENUM_CAST(Viewport::MSAA);
|
||||||
VARIANT_ENUM_CAST(Viewport::ScreenSpaceAA);
|
VARIANT_ENUM_CAST(Viewport::ScreenSpaceAA);
|
||||||
VARIANT_ENUM_CAST(Viewport::DebugDraw);
|
VARIANT_ENUM_CAST(Viewport::DebugDraw);
|
||||||
|
|
|
@ -143,8 +143,8 @@ public:
|
||||||
void camera_effects_set_dof_blur(RID p_camera_effects, bool p_far_enable, float p_far_distance, float p_far_transition, bool p_near_enable, float p_near_distance, float p_near_transition, float p_amount) override {}
|
void camera_effects_set_dof_blur(RID p_camera_effects, bool p_far_enable, float p_far_distance, float p_far_transition, bool p_near_enable, float p_near_distance, float p_near_transition, float p_amount) override {}
|
||||||
void camera_effects_set_custom_exposure(RID p_camera_effects, bool p_enable, float p_exposure) override {}
|
void camera_effects_set_custom_exposure(RID p_camera_effects, bool p_enable, float p_exposure) override {}
|
||||||
|
|
||||||
void shadows_quality_set(RS::ShadowQuality p_quality) override {}
|
void positional_soft_shadow_filter_set_quality(RS::ShadowQuality p_quality) override {}
|
||||||
void directional_shadow_quality_set(RS::ShadowQuality p_quality) override {}
|
void directional_soft_shadow_filter_set_quality(RS::ShadowQuality p_quality) override {}
|
||||||
|
|
||||||
RID light_instance_create(RID p_light) override { return RID(); }
|
RID light_instance_create(RID p_light) override { return RID(); }
|
||||||
void light_instance_set_transform(RID p_light_instance, const Transform3D &p_transform) override {}
|
void light_instance_set_transform(RID p_light_instance, const Transform3D &p_transform) override {}
|
||||||
|
|
|
@ -3176,7 +3176,7 @@ void RendererSceneRenderRD::sub_surface_scattering_set_scale(float p_scale, floa
|
||||||
sss_depth_scale = p_depth_scale;
|
sss_depth_scale = p_depth_scale;
|
||||||
}
|
}
|
||||||
|
|
||||||
void RendererSceneRenderRD::shadows_quality_set(RS::ShadowQuality p_quality) {
|
void RendererSceneRenderRD::positional_soft_shadow_filter_set_quality(RS::ShadowQuality p_quality) {
|
||||||
ERR_FAIL_INDEX_MSG(p_quality, RS::SHADOW_QUALITY_MAX, "Shadow quality too high, please see RenderingServer's ShadowQuality enum");
|
ERR_FAIL_INDEX_MSG(p_quality, RS::SHADOW_QUALITY_MAX, "Shadow quality too high, please see RenderingServer's ShadowQuality enum");
|
||||||
|
|
||||||
if (shadows_quality != p_quality) {
|
if (shadows_quality != p_quality) {
|
||||||
|
@ -3223,7 +3223,7 @@ void RendererSceneRenderRD::shadows_quality_set(RS::ShadowQuality p_quality) {
|
||||||
_update_shader_quality_settings();
|
_update_shader_quality_settings();
|
||||||
}
|
}
|
||||||
|
|
||||||
void RendererSceneRenderRD::directional_shadow_quality_set(RS::ShadowQuality p_quality) {
|
void RendererSceneRenderRD::directional_soft_shadow_filter_set_quality(RS::ShadowQuality p_quality) {
|
||||||
ERR_FAIL_INDEX_MSG(p_quality, RS::SHADOW_QUALITY_MAX, "Shadow quality too high, please see RenderingServer's ShadowQuality enum");
|
ERR_FAIL_INDEX_MSG(p_quality, RS::SHADOW_QUALITY_MAX, "Shadow quality too high, please see RenderingServer's ShadowQuality enum");
|
||||||
|
|
||||||
if (directional_shadow_quality != p_quality) {
|
if (directional_shadow_quality != p_quality) {
|
||||||
|
@ -5960,8 +5960,8 @@ void fog() {
|
||||||
directional_soft_shadow_kernel = memnew_arr(float, 128);
|
directional_soft_shadow_kernel = memnew_arr(float, 128);
|
||||||
penumbra_shadow_kernel = memnew_arr(float, 128);
|
penumbra_shadow_kernel = memnew_arr(float, 128);
|
||||||
soft_shadow_kernel = memnew_arr(float, 128);
|
soft_shadow_kernel = memnew_arr(float, 128);
|
||||||
shadows_quality_set(RS::ShadowQuality(int(GLOBAL_GET("rendering/shadows/shadows/soft_shadow_quality"))));
|
positional_soft_shadow_filter_set_quality(RS::ShadowQuality(int(GLOBAL_GET("rendering/shadows/positional_shadow/soft_shadow_filter_quality"))));
|
||||||
directional_shadow_quality_set(RS::ShadowQuality(int(GLOBAL_GET("rendering/shadows/directional_shadow/soft_shadow_quality"))));
|
directional_soft_shadow_filter_set_quality(RS::ShadowQuality(int(GLOBAL_GET("rendering/shadows/directional_shadow/soft_shadow_filter_quality"))));
|
||||||
|
|
||||||
environment_set_volumetric_fog_volume_size(GLOBAL_GET("rendering/environment/volumetric_fog/volume_size"), GLOBAL_GET("rendering/environment/volumetric_fog/volume_depth"));
|
environment_set_volumetric_fog_volume_size(GLOBAL_GET("rendering/environment/volumetric_fog/volume_size"), GLOBAL_GET("rendering/environment/volumetric_fog/volume_depth"));
|
||||||
environment_set_volumetric_fog_filter_active(GLOBAL_GET("rendering/environment/volumetric_fog/use_filter"));
|
environment_set_volumetric_fog_filter_active(GLOBAL_GET("rendering/environment/volumetric_fog/use_filter"));
|
||||||
|
|
|
@ -1454,8 +1454,8 @@ public:
|
||||||
RS::SubSurfaceScatteringQuality sub_surface_scattering_get_quality() const;
|
RS::SubSurfaceScatteringQuality sub_surface_scattering_get_quality() const;
|
||||||
virtual void sub_surface_scattering_set_scale(float p_scale, float p_depth_scale) override;
|
virtual void sub_surface_scattering_set_scale(float p_scale, float p_depth_scale) override;
|
||||||
|
|
||||||
virtual void shadows_quality_set(RS::ShadowQuality p_quality) override;
|
virtual void positional_soft_shadow_filter_set_quality(RS::ShadowQuality p_quality) override;
|
||||||
virtual void directional_shadow_quality_set(RS::ShadowQuality p_quality) override;
|
virtual void directional_soft_shadow_filter_set_quality(RS::ShadowQuality p_quality) override;
|
||||||
|
|
||||||
virtual void decals_set_filter(RS::DecalFilter p_filter) override;
|
virtual void decals_set_filter(RS::DecalFilter p_filter) override;
|
||||||
virtual void light_projectors_set_filter(RS::LightProjectorFilter p_filter) override;
|
virtual void light_projectors_set_filter(RS::LightProjectorFilter p_filter) override;
|
||||||
|
|
|
@ -183,8 +183,8 @@ public:
|
||||||
virtual void camera_effects_set_dof_blur(RID p_camera_effects, bool p_far_enable, float p_far_distance, float p_far_transition, bool p_near_enable, float p_near_distance, float p_near_transition, float p_amount) = 0;
|
virtual void camera_effects_set_dof_blur(RID p_camera_effects, bool p_far_enable, float p_far_distance, float p_far_transition, bool p_near_enable, float p_near_distance, float p_near_transition, float p_amount) = 0;
|
||||||
virtual void camera_effects_set_custom_exposure(RID p_camera_effects, bool p_enable, float p_exposure) = 0;
|
virtual void camera_effects_set_custom_exposure(RID p_camera_effects, bool p_enable, float p_exposure) = 0;
|
||||||
|
|
||||||
virtual void shadows_quality_set(RS::ShadowQuality p_quality) = 0;
|
virtual void positional_soft_shadow_filter_set_quality(RS::ShadowQuality p_quality) = 0;
|
||||||
virtual void directional_shadow_quality_set(RS::ShadowQuality p_quality) = 0;
|
virtual void directional_soft_shadow_filter_set_quality(RS::ShadowQuality p_quality) = 0;
|
||||||
|
|
||||||
virtual RID shadow_atlas_create() = 0;
|
virtual RID shadow_atlas_create() = 0;
|
||||||
virtual void shadow_atlas_set_size(RID p_atlas, int p_size, bool p_use_16_bits = true) = 0;
|
virtual void shadow_atlas_set_size(RID p_atlas, int p_size, bool p_use_16_bits = true) = 0;
|
||||||
|
|
|
@ -1150,8 +1150,8 @@ public:
|
||||||
PASS8(camera_effects_set_dof_blur, RID, bool, float, float, bool, float, float, float)
|
PASS8(camera_effects_set_dof_blur, RID, bool, float, float, bool, float, float, float)
|
||||||
PASS3(camera_effects_set_custom_exposure, RID, bool, float)
|
PASS3(camera_effects_set_custom_exposure, RID, bool, float)
|
||||||
|
|
||||||
PASS1(shadows_quality_set, RS::ShadowQuality)
|
PASS1(positional_soft_shadow_filter_set_quality, RS::ShadowQuality)
|
||||||
PASS1(directional_shadow_quality_set, RS::ShadowQuality)
|
PASS1(directional_soft_shadow_filter_set_quality, RS::ShadowQuality)
|
||||||
|
|
||||||
PASS2(sdfgi_set_debug_probe_select, const Vector3 &, const Vector3 &)
|
PASS2(sdfgi_set_debug_probe_select, const Vector3 &, const Vector3 &)
|
||||||
|
|
||||||
|
|
|
@ -166,8 +166,8 @@ public:
|
||||||
virtual void camera_effects_set_dof_blur(RID p_camera_effects, bool p_far_enable, float p_far_distance, float p_far_transition, bool p_near_enable, float p_near_distance, float p_near_transition, float p_amount) = 0;
|
virtual void camera_effects_set_dof_blur(RID p_camera_effects, bool p_far_enable, float p_far_distance, float p_far_transition, bool p_near_enable, float p_near_distance, float p_near_transition, float p_amount) = 0;
|
||||||
virtual void camera_effects_set_custom_exposure(RID p_camera_effects, bool p_enable, float p_exposure) = 0;
|
virtual void camera_effects_set_custom_exposure(RID p_camera_effects, bool p_enable, float p_exposure) = 0;
|
||||||
|
|
||||||
virtual void shadows_quality_set(RS::ShadowQuality p_quality) = 0;
|
virtual void positional_soft_shadow_filter_set_quality(RS::ShadowQuality p_quality) = 0;
|
||||||
virtual void directional_shadow_quality_set(RS::ShadowQuality p_quality) = 0;
|
virtual void directional_soft_shadow_filter_set_quality(RS::ShadowQuality p_quality) = 0;
|
||||||
|
|
||||||
virtual RID light_instance_create(RID p_light) = 0;
|
virtual RID light_instance_create(RID p_light) = 0;
|
||||||
virtual void light_instance_set_transform(RID p_light_instance, const Transform3D &p_transform) = 0;
|
virtual void light_instance_set_transform(RID p_light_instance, const Transform3D &p_transform) = 0;
|
||||||
|
|
|
@ -1016,7 +1016,7 @@ void RendererViewport::viewport_set_canvas_stacking(RID p_viewport, RID p_canvas
|
||||||
viewport->canvas_map[p_canvas].sublayer = p_sublayer;
|
viewport->canvas_map[p_canvas].sublayer = p_sublayer;
|
||||||
}
|
}
|
||||||
|
|
||||||
void RendererViewport::viewport_set_shadow_atlas_size(RID p_viewport, int p_size, bool p_16_bits) {
|
void RendererViewport::viewport_set_positional_shadow_atlas_size(RID p_viewport, int p_size, bool p_16_bits) {
|
||||||
Viewport *viewport = viewport_owner.get_or_null(p_viewport);
|
Viewport *viewport = viewport_owner.get_or_null(p_viewport);
|
||||||
ERR_FAIL_COND(!viewport);
|
ERR_FAIL_COND(!viewport);
|
||||||
|
|
||||||
|
@ -1026,7 +1026,7 @@ void RendererViewport::viewport_set_shadow_atlas_size(RID p_viewport, int p_size
|
||||||
RSG::scene->shadow_atlas_set_size(viewport->shadow_atlas, viewport->shadow_atlas_size, viewport->shadow_atlas_16_bits);
|
RSG::scene->shadow_atlas_set_size(viewport->shadow_atlas, viewport->shadow_atlas_size, viewport->shadow_atlas_16_bits);
|
||||||
}
|
}
|
||||||
|
|
||||||
void RendererViewport::viewport_set_shadow_atlas_quadrant_subdivision(RID p_viewport, int p_quadrant, int p_subdiv) {
|
void RendererViewport::viewport_set_positional_shadow_atlas_quadrant_subdivision(RID p_viewport, int p_quadrant, int p_subdiv) {
|
||||||
Viewport *viewport = viewport_owner.get_or_null(p_viewport);
|
Viewport *viewport = viewport_owner.get_or_null(p_viewport);
|
||||||
ERR_FAIL_COND(!viewport);
|
ERR_FAIL_COND(!viewport);
|
||||||
|
|
||||||
|
|
|
@ -255,8 +255,8 @@ public:
|
||||||
void viewport_set_global_canvas_transform(RID p_viewport, const Transform2D &p_transform);
|
void viewport_set_global_canvas_transform(RID p_viewport, const Transform2D &p_transform);
|
||||||
void viewport_set_canvas_stacking(RID p_viewport, RID p_canvas, int p_layer, int p_sublayer);
|
void viewport_set_canvas_stacking(RID p_viewport, RID p_canvas, int p_layer, int p_sublayer);
|
||||||
|
|
||||||
void viewport_set_shadow_atlas_size(RID p_viewport, int p_size, bool p_16_bits = true);
|
void viewport_set_positional_shadow_atlas_size(RID p_viewport, int p_size, bool p_16_bits = true);
|
||||||
void viewport_set_shadow_atlas_quadrant_subdivision(RID p_viewport, int p_quadrant, int p_subdiv);
|
void viewport_set_positional_shadow_atlas_quadrant_subdivision(RID p_viewport, int p_quadrant, int p_subdiv);
|
||||||
|
|
||||||
void viewport_set_msaa(RID p_viewport, RS::ViewportMSAA p_msaa);
|
void viewport_set_msaa(RID p_viewport, RS::ViewportMSAA p_msaa);
|
||||||
void viewport_set_screen_space_aa(RID p_viewport, RS::ViewportScreenSpaceAA p_mode);
|
void viewport_set_screen_space_aa(RID p_viewport, RS::ViewportScreenSpaceAA p_mode);
|
||||||
|
|
|
@ -615,9 +615,9 @@ public:
|
||||||
|
|
||||||
FUNC2(viewport_set_global_canvas_transform, RID, const Transform2D &)
|
FUNC2(viewport_set_global_canvas_transform, RID, const Transform2D &)
|
||||||
FUNC4(viewport_set_canvas_stacking, RID, RID, int, int)
|
FUNC4(viewport_set_canvas_stacking, RID, RID, int, int)
|
||||||
FUNC3(viewport_set_shadow_atlas_size, RID, int, bool)
|
FUNC3(viewport_set_positional_shadow_atlas_size, RID, int, bool)
|
||||||
FUNC3(viewport_set_sdf_oversize_and_scale, RID, ViewportSDFOversize, ViewportSDFScale)
|
FUNC3(viewport_set_sdf_oversize_and_scale, RID, ViewportSDFOversize, ViewportSDFScale)
|
||||||
FUNC3(viewport_set_shadow_atlas_quadrant_subdivision, RID, int, int)
|
FUNC3(viewport_set_positional_shadow_atlas_quadrant_subdivision, RID, int, int)
|
||||||
FUNC2(viewport_set_msaa, RID, ViewportMSAA)
|
FUNC2(viewport_set_msaa, RID, ViewportMSAA)
|
||||||
FUNC2(viewport_set_screen_space_aa, RID, ViewportScreenSpaceAA)
|
FUNC2(viewport_set_screen_space_aa, RID, ViewportScreenSpaceAA)
|
||||||
FUNC2(viewport_set_use_taa, RID, bool)
|
FUNC2(viewport_set_use_taa, RID, bool)
|
||||||
|
@ -715,8 +715,8 @@ public:
|
||||||
FUNC8(camera_effects_set_dof_blur, RID, bool, float, float, bool, float, float, float)
|
FUNC8(camera_effects_set_dof_blur, RID, bool, float, float, bool, float, float, float)
|
||||||
FUNC3(camera_effects_set_custom_exposure, RID, bool, float)
|
FUNC3(camera_effects_set_custom_exposure, RID, bool, float)
|
||||||
|
|
||||||
FUNC1(shadows_quality_set, ShadowQuality);
|
FUNC1(positional_soft_shadow_filter_set_quality, ShadowQuality);
|
||||||
FUNC1(directional_shadow_quality_set, ShadowQuality);
|
FUNC1(directional_soft_shadow_filter_set_quality, ShadowQuality);
|
||||||
FUNC1(decals_set_filter, RS::DecalFilter);
|
FUNC1(decals_set_filter, RS::DecalFilter);
|
||||||
FUNC1(light_projectors_set_filter, RS::LightProjectorFilter);
|
FUNC1(light_projectors_set_filter, RS::LightProjectorFilter);
|
||||||
|
|
||||||
|
|
|
@ -1939,8 +1939,8 @@ void RenderingServer::_bind_methods() {
|
||||||
BIND_ENUM_CONSTANT(LIGHT_DIRECTIONAL_SKY_MODE_LIGHT_ONLY);
|
BIND_ENUM_CONSTANT(LIGHT_DIRECTIONAL_SKY_MODE_LIGHT_ONLY);
|
||||||
BIND_ENUM_CONSTANT(LIGHT_DIRECTIONAL_SKY_MODE_SKY_ONLY);
|
BIND_ENUM_CONSTANT(LIGHT_DIRECTIONAL_SKY_MODE_SKY_ONLY);
|
||||||
|
|
||||||
ClassDB::bind_method(D_METHOD("shadows_quality_set", "quality"), &RenderingServer::shadows_quality_set);
|
ClassDB::bind_method(D_METHOD("positional_soft_shadow_filter_set_quality", "quality"), &RenderingServer::positional_soft_shadow_filter_set_quality);
|
||||||
ClassDB::bind_method(D_METHOD("directional_shadow_quality_set", "quality"), &RenderingServer::directional_shadow_quality_set);
|
ClassDB::bind_method(D_METHOD("directional_soft_shadow_filter_set_quality", "quality"), &RenderingServer::directional_soft_shadow_filter_set_quality);
|
||||||
ClassDB::bind_method(D_METHOD("directional_shadow_atlas_set_size", "size", "is_16bits"), &RenderingServer::directional_shadow_atlas_set_size);
|
ClassDB::bind_method(D_METHOD("directional_shadow_atlas_set_size", "size", "is_16bits"), &RenderingServer::directional_shadow_atlas_set_size);
|
||||||
|
|
||||||
BIND_ENUM_CONSTANT(SHADOW_QUALITY_HARD);
|
BIND_ENUM_CONSTANT(SHADOW_QUALITY_HARD);
|
||||||
|
@ -2207,8 +2207,8 @@ void RenderingServer::_bind_methods() {
|
||||||
|
|
||||||
ClassDB::bind_method(D_METHOD("viewport_set_sdf_oversize_and_scale", "viewport", "oversize", "scale"), &RenderingServer::viewport_set_sdf_oversize_and_scale);
|
ClassDB::bind_method(D_METHOD("viewport_set_sdf_oversize_and_scale", "viewport", "oversize", "scale"), &RenderingServer::viewport_set_sdf_oversize_and_scale);
|
||||||
|
|
||||||
ClassDB::bind_method(D_METHOD("viewport_set_shadow_atlas_size", "viewport", "size", "use_16_bits"), &RenderingServer::viewport_set_shadow_atlas_size, DEFVAL(false));
|
ClassDB::bind_method(D_METHOD("viewport_set_positional_shadow_atlas_size", "viewport", "size", "use_16_bits"), &RenderingServer::viewport_set_positional_shadow_atlas_size, DEFVAL(false));
|
||||||
ClassDB::bind_method(D_METHOD("viewport_set_shadow_atlas_quadrant_subdivision", "viewport", "quadrant", "subdivision"), &RenderingServer::viewport_set_shadow_atlas_quadrant_subdivision);
|
ClassDB::bind_method(D_METHOD("viewport_set_positional_shadow_atlas_quadrant_subdivision", "viewport", "quadrant", "subdivision"), &RenderingServer::viewport_set_positional_shadow_atlas_quadrant_subdivision);
|
||||||
ClassDB::bind_method(D_METHOD("viewport_set_msaa", "viewport", "msaa"), &RenderingServer::viewport_set_msaa);
|
ClassDB::bind_method(D_METHOD("viewport_set_msaa", "viewport", "msaa"), &RenderingServer::viewport_set_msaa);
|
||||||
ClassDB::bind_method(D_METHOD("viewport_set_screen_space_aa", "viewport", "mode"), &RenderingServer::viewport_set_screen_space_aa);
|
ClassDB::bind_method(D_METHOD("viewport_set_screen_space_aa", "viewport", "mode"), &RenderingServer::viewport_set_screen_space_aa);
|
||||||
ClassDB::bind_method(D_METHOD("viewport_set_use_taa", "viewport", "enable"), &RenderingServer::viewport_set_use_taa);
|
ClassDB::bind_method(D_METHOD("viewport_set_use_taa", "viewport", "enable"), &RenderingServer::viewport_set_use_taa);
|
||||||
|
@ -2841,14 +2841,14 @@ void RenderingServer::init() {
|
||||||
GLOBAL_DEF("rendering/shadows/directional_shadow/size", 4096);
|
GLOBAL_DEF("rendering/shadows/directional_shadow/size", 4096);
|
||||||
GLOBAL_DEF("rendering/shadows/directional_shadow/size.mobile", 2048);
|
GLOBAL_DEF("rendering/shadows/directional_shadow/size.mobile", 2048);
|
||||||
ProjectSettings::get_singleton()->set_custom_property_info("rendering/shadows/directional_shadow/size", PropertyInfo(Variant::INT, "rendering/shadows/directional_shadow/size", PROPERTY_HINT_RANGE, "256,16384"));
|
ProjectSettings::get_singleton()->set_custom_property_info("rendering/shadows/directional_shadow/size", PropertyInfo(Variant::INT, "rendering/shadows/directional_shadow/size", PROPERTY_HINT_RANGE, "256,16384"));
|
||||||
GLOBAL_DEF("rendering/shadows/directional_shadow/soft_shadow_quality", 2);
|
GLOBAL_DEF("rendering/shadows/directional_shadow/soft_shadow_filter_quality", 2);
|
||||||
GLOBAL_DEF("rendering/shadows/directional_shadow/soft_shadow_quality.mobile", 0);
|
GLOBAL_DEF("rendering/shadows/directional_shadow/soft_shadow_filter_quality.mobile", 0);
|
||||||
ProjectSettings::get_singleton()->set_custom_property_info("rendering/shadows/directional_shadow/soft_shadow_quality", PropertyInfo(Variant::INT, "rendering/shadows/directional_shadow/soft_shadow_quality", PROPERTY_HINT_ENUM, "Hard (Fastest),Soft Very Low (Faster),Soft Low (Fast),Soft Medium (Average),Soft High (Slow),Soft Ultra (Slowest)"));
|
ProjectSettings::get_singleton()->set_custom_property_info("rendering/shadows/directional_shadow/soft_shadow_filter_quality", PropertyInfo(Variant::INT, "rendering/shadows/directional_shadow/soft_shadow_filter_quality", PROPERTY_HINT_ENUM, "Hard (Fastest),Soft Very Low (Faster),Soft Low (Fast),Soft Medium (Average),Soft High (Slow),Soft Ultra (Slowest)"));
|
||||||
GLOBAL_DEF("rendering/shadows/directional_shadow/16_bits", true);
|
GLOBAL_DEF("rendering/shadows/directional_shadow/16_bits", true);
|
||||||
|
|
||||||
GLOBAL_DEF("rendering/shadows/shadows/soft_shadow_quality", 2);
|
GLOBAL_DEF("rendering/shadows/positional_shadow/soft_shadow_filter_quality", 2);
|
||||||
GLOBAL_DEF("rendering/shadows/shadows/soft_shadow_quality.mobile", 0);
|
GLOBAL_DEF("rendering/shadows/positional_shadow/soft_shadow_filter_quality.mobile", 0);
|
||||||
ProjectSettings::get_singleton()->set_custom_property_info("rendering/shadows/shadows/soft_shadow_quality", PropertyInfo(Variant::INT, "rendering/shadows/shadows/soft_shadow_quality", PROPERTY_HINT_ENUM, "Hard (Fastest),Soft Very Low (Faster),Soft Low (Fast),Soft Medium (Average),Soft High (Slow),Soft Ultra (Slowest)"));
|
ProjectSettings::get_singleton()->set_custom_property_info("rendering/shadows/positional_shadow/soft_shadow_filter_quality", PropertyInfo(Variant::INT, "rendering/shadows/positional_shadow/soft_shadow_filter_quality", PROPERTY_HINT_ENUM, "Hard (Fastest),Soft Very Low (Faster),Soft Low (Fast),Soft Medium (Average),Soft High (Slow),Soft Ultra (Slowest)"));
|
||||||
|
|
||||||
GLOBAL_DEF("rendering/2d/shadow_atlas/size", 2048);
|
GLOBAL_DEF("rendering/2d/shadow_atlas/size", 2048);
|
||||||
|
|
||||||
|
|
|
@ -491,8 +491,8 @@ public:
|
||||||
SHADOW_QUALITY_MAX
|
SHADOW_QUALITY_MAX
|
||||||
};
|
};
|
||||||
|
|
||||||
virtual void shadows_quality_set(ShadowQuality p_quality) = 0;
|
virtual void positional_soft_shadow_filter_set_quality(ShadowQuality p_quality) = 0;
|
||||||
virtual void directional_shadow_quality_set(ShadowQuality p_quality) = 0;
|
virtual void directional_soft_shadow_filter_set_quality(ShadowQuality p_quality) = 0;
|
||||||
|
|
||||||
enum LightProjectorFilter {
|
enum LightProjectorFilter {
|
||||||
LIGHT_PROJECTOR_FILTER_NEAREST,
|
LIGHT_PROJECTOR_FILTER_NEAREST,
|
||||||
|
@ -856,8 +856,8 @@ public:
|
||||||
|
|
||||||
virtual void viewport_set_sdf_oversize_and_scale(RID p_viewport, ViewportSDFOversize p_oversize, ViewportSDFScale p_scale) = 0;
|
virtual void viewport_set_sdf_oversize_and_scale(RID p_viewport, ViewportSDFOversize p_oversize, ViewportSDFScale p_scale) = 0;
|
||||||
|
|
||||||
virtual void viewport_set_shadow_atlas_size(RID p_viewport, int p_size, bool p_16_bits = true) = 0;
|
virtual void viewport_set_positional_shadow_atlas_size(RID p_viewport, int p_size, bool p_16_bits = true) = 0;
|
||||||
virtual void viewport_set_shadow_atlas_quadrant_subdivision(RID p_viewport, int p_quadrant, int p_subdiv) = 0;
|
virtual void viewport_set_positional_shadow_atlas_quadrant_subdivision(RID p_viewport, int p_quadrant, int p_subdiv) = 0;
|
||||||
|
|
||||||
enum ViewportMSAA {
|
enum ViewportMSAA {
|
||||||
VIEWPORT_MSAA_DISABLED,
|
VIEWPORT_MSAA_DISABLED,
|
||||||
|
|
Loading…
Reference in New Issue