summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/classes/ProjectSettings.xml15
-rw-r--r--doc/classes/Viewport.xml13
-rw-r--r--scene/main/scene_tree.cpp2
3 files changed, 28 insertions, 2 deletions
diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml
index 3478215f4f..09c024d275 100644
--- a/doc/classes/ProjectSettings.xml
+++ b/doc/classes/ProjectSettings.xml
@@ -2265,7 +2265,20 @@
Set the default Variable Rate Shading (VRS) mode for the main viewport. See [member Viewport.vrs_mode] to change this at runtime, and [enum Viewport.VRSMode] for possible values.
</member>
<member name="rendering/vrs/texture" type="String" setter="" getter="" default="&quot;&quot;">
- If [member rendering/vrs/mode] is set to texture, this is the path to default texture loaded as the VRS image.
+ If [member rendering/vrs/mode] is set to [b]Texture[/b], this is the path to default texture loaded as the VRS image.
+ The texture [i]must[/i] use a lossless compression format so that colors can be matched precisely. The following VRS densities are mapped to various colors, with brighter colors representing a lower level of shading precision:
+ [codeblock]
+ - 1x1 = rgb(0, 0, 0) - #000000
+ - 1x2 = rgb(0, 85, 0) - #005500
+ - 2x1 = rgb(85, 0, 0) - #550000
+ - 2x2 = rgb(85, 85, 0) - #555500
+ - 2x4 = rgb(85, 170, 0) - #55aa00
+ - 4x2 = rgb(170, 85, 0) - #aa5500
+ - 4x4 = rgb(170, 170, 0) - #aaaa00
+ - 4x8 = rgb(170, 255, 0) - #aaff00 - Not supported on most hardware
+ - 8x4 = rgb(255, 170, 0) - #ffaa00 - Not supported on most hardware
+ - 8x8 = rgb(255, 255, 0) - #ffff00 - Not supported on most hardware
+ [/codeblock]
</member>
<member name="threading/worker_pool/low_priority_thread_ratio" type="float" setter="" getter="" default="0.3">
</member>
diff --git a/doc/classes/Viewport.xml b/doc/classes/Viewport.xml
index 78013a8f4b..236d34383f 100644
--- a/doc/classes/Viewport.xml
+++ b/doc/classes/Viewport.xml
@@ -343,6 +343,19 @@
</member>
<member name="vrs_texture" type="Texture2D" setter="set_vrs_texture" getter="get_vrs_texture">
Texture to use when [member vrs_mode] is set to [constant Viewport.VRS_TEXTURE].
+ The texture [i]must[/i] use a lossless compression format so that colors can be matched precisely. The following VRS densities are mapped to various colors, with brighter colors representing a lower level of shading precision:
+ [codeblock]
+ - 1x1 = rgb(0, 0, 0) - #000000
+ - 1x2 = rgb(0, 85, 0) - #005500
+ - 2x1 = rgb(85, 0, 0) - #550000
+ - 2x2 = rgb(85, 85, 0) - #555500
+ - 2x4 = rgb(85, 170, 0) - #55aa00
+ - 4x2 = rgb(170, 85, 0) - #aa5500
+ - 4x4 = rgb(170, 170, 0) - #aaaa00
+ - 4x8 = rgb(170, 255, 0) - #aaff00 - Not supported on most hardware
+ - 8x4 = rgb(255, 170, 0) - #ffaa00 - Not supported on most hardware
+ - 8x8 = rgb(255, 255, 0) - #ffff00 - Not supported on most hardware
+ [/codeblock]
</member>
<member name="world_2d" type="World2D" setter="set_world_2d" getter="get_world_2d">
The custom [World2D] which can be used as 2D environment source.
diff --git a/scene/main/scene_tree.cpp b/scene/main/scene_tree.cpp
index 81a4e3073b..7232d05feb 100644
--- a/scene/main/scene_tree.cpp
+++ b/scene/main/scene_tree.cpp
@@ -1450,7 +1450,7 @@ SceneTree::SceneTree() {
ProjectSettings::get_singleton()->set_custom_property_info("rendering/vrs/texture",
PropertyInfo(Variant::STRING,
"rendering/vrs/texture",
- PROPERTY_HINT_FILE, "*.png"));
+ PROPERTY_HINT_FILE, "*.bmp,*.png,*.tga,*.webp"));
if (vrs_mode == 1 && !vrs_texture_path.is_empty()) {
Ref<Image> vrs_image;
vrs_image.instantiate();