Skip to content

Commit faea9f5

Browse files
committed
Remove SCREEN_TEXTURE, DEPTH_TEXTURE, and NORMAL_ROUGHNESS_TEXTURE
in favour of texture hints
1 parent d93b66a commit faea9f5

24 files changed

+260
-112
lines changed

CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
227227
- More information in the [progress report](https://godotengine.org/article/improvements-shaders-visual-shaders-godot-4).
228228
- [Add Billboard mode to visual shaders.](https://github.com/godotengine/godot/pull/49157)
229229
- [The constants `PI`, `TAU` and `E` are now available in the shader language.](https://github.com/godotengine/godot/pull/48837)
230+
- Uniform hints to control textures (`repeat_enabled`, `repeat_disabled`, `filter_linear`, `filter_nearest`, `hint_screen_texture`, etc.).
230231

231232
#### Miscellaneous
232233

@@ -401,6 +402,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
401402
- [Removed support for 16× MSAA due to driver bugs and low performance.](https://github.com/godotengine/godot/pull/49063)
402403
- For high-quality offline rendering, using supersampling together with 8× MSAA is a better option anyway.
403404

405+
#### Shaders
406+
407+
- Removed `SCREEN_TEXTURE` and `DEPTH_TEXTURE` in favour of uniform hints `hint_screen_texture` and `hint_depth_texture`.
408+
404409
### Fixed
405410

406411
#### Core

doc/classes/BackBufferCopy.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<?xml version="1.0" encoding="UTF-8" ?>
22
<class name="BackBufferCopy" inherits="Node2D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
33
<brief_description>
4-
Copies a region of the screen (or the whole screen) to a buffer so it can be accessed in your shader scripts through the [code]texture(SCREEN_TEXTURE, ...)[/code] function.
4+
Copies a region of the screen (or the whole screen) to a buffer so it can be accessed in your shader scripts using the screen texture (i.e. a uniform sampler with ``hint_screen_texture``).
55
</brief_description>
66
<description>
7-
Node for back-buffering the currently-displayed screen. The region defined in the [BackBufferCopy] node is buffered with the content of the screen it covers, or the entire screen according to the copy mode set. Use the [code]texture(SCREEN_TEXTURE, ...)[/code] function in your shader scripts to access the buffer.
7+
Node for back-buffering the currently-displayed screen. The region defined in the [BackBufferCopy] node is buffered with the content of the screen it covers, or the entire screen according to the copy mode set. Use the screen texture in your shader scripts to access the buffer.
88
[b]Note:[/b] Since this node inherits from [Node2D] (and not [Control]), anchors and margins won't apply to child [Control]-derived nodes. This can be problematic when resizing the window. To avoid this, add [Control]-derived nodes as [i]siblings[/i] to the [BackBufferCopy] node instead of adding them as children.
99
</description>
1010
<tutorials>

doc/classes/CanvasGroup.xml

+3-1
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,10 @@
99
[codeblock]
1010
shader_type canvas_item;
1111

12+
uniform sampler2D screen_texture : hint_screen_texture, repeat_disable, filter_nearest;
13+
1214
void fragment() {
13-
vec4 c = textureLod(SCREEN_TEXTURE, SCREEN_UV, 0.0);
15+
vec4 c = textureLod(screen_texture, SCREEN_UV, 0.0);
1416

1517
if (c.a &gt; 0.0001) {
1618
c.rgb /= c.a;

doc/classes/RenderingServer.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3336,7 +3336,7 @@
33363336
<param index="0" name="viewport" type="RID" />
33373337
<param index="1" name="enabled" type="bool" />
33383338
<description>
3339-
If [code]true[/code], render the contents of the viewport directly to screen. This allows a low-level optimization where you can skip drawing a viewport to the root viewport. While this optimization can result in a significant increase in speed (especially on older devices), it comes at a cost of usability. When this is enabled, you cannot read from the viewport or from the [code]SCREEN_TEXTURE[/code]. You also lose the benefit of certain window settings, such as the various stretch modes. Another consequence to be aware of is that in 2D the rendering happens in window coordinates, so if you have a viewport that is double the size of the window, and you set this, then only the portion that fits within the window will be drawn, no automatic scaling is possible, even if your game scene is significantly larger than the window size.
3339+
If [code]true[/code], render the contents of the viewport directly to screen. This allows a low-level optimization where you can skip drawing a viewport to the root viewport. While this optimization can result in a significant increase in speed (especially on older devices), it comes at a cost of usability. When this is enabled, you cannot read from the viewport or from the screen_texture. You also lose the benefit of certain window settings, such as the various stretch modes. Another consequence to be aware of is that in 2D the rendering happens in window coordinates, so if you have a viewport that is double the size of the window, and you set this, then only the portion that fits within the window will be drawn, no automatic scaling is possible, even if your game scene is significantly larger than the window size.
33403340
</description>
33413341
</method>
33423342
<method name="viewport_set_scaling_3d_mode">

doc/classes/VisualShaderNodeTexture.xml

+8-2
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,18 @@
3333
Use the texture from this shader's normal map built-in.
3434
</constant>
3535
<constant name="SOURCE_DEPTH" value="4" enum="Source">
36-
Use the depth texture available for this shader.
36+
Use the depth texture captured during the depth prepass. Only available when the depth prepass is used (i.e. in spatial shaders and in the forward_plus or gl_compatibility renderers).
3737
</constant>
3838
<constant name="SOURCE_PORT" value="5" enum="Source">
3939
Use the texture provided in the input port for this function.
4040
</constant>
41-
<constant name="SOURCE_MAX" value="6" enum="Source">
41+
<constant name="SOURCE_3D_NORMAL" value="6" enum="Source">
42+
Use the normal buffer captured during the depth prepass. Only available when the normal-roughness buffer is available (i.e. in spatial shaders and in the forward_plus renderer).
43+
</constant>
44+
<constant name="SOURCE_ROUGHNESS" value="7" enum="Source">
45+
Use the roughness buffer captured during the depth prepass. Only available when the normal-roughness buffer is available (i.e. in spatial shaders and in the forward_plus renderer).
46+
</constant>
47+
<constant name="SOURCE_MAX" value="8" enum="Source">
4248
Represents the size of the [enum Source] enum.
4349
</constant>
4450
<constant name="TYPE_DATA" value="0" enum="TextureType">

doc/classes/VisualShaderNodeTextureParameter.xml

+18
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@
1818
<member name="texture_repeat" type="int" setter="set_texture_repeat" getter="get_texture_repeat" enum="VisualShaderNodeTextureParameter.TextureRepeat" default="0">
1919
Sets the texture repeating mode. See [enum TextureRepeat] for options.
2020
</member>
21+
<member name="texture_source" type="int" setter="set_texture_source" getter="get_texture_source" enum="VisualShaderNodeTextureParameter.TextureSource" default="0">
22+
Sets the texture source mode. Used for reading from the screen, depth, or normal_roughness texture. see [enum TextureSource] for options.
23+
</member>
2124
<member name="texture_type" type="int" setter="set_texture_type" getter="get_texture_type" enum="VisualShaderNodeTextureParameter.TextureType" default="0">
2225
Defines the type of data provided by the source texture. See [enum TextureType] for options.
2326
</member>
@@ -88,5 +91,20 @@
8891
<constant name="REPEAT_MAX" value="3" enum="TextureRepeat">
8992
Represents the size of the [enum TextureRepeat] enum.
9093
</constant>
94+
<constant name="SOURCE_NONE" value="0" enum="TextureSource">
95+
The texture source is not specified in the shader.
96+
</constant>
97+
<constant name="SOURCE_SCREEN" value="1" enum="TextureSource">
98+
The texture source is the screen texture which captures all opaque objects drawn this frame.
99+
</constant>
100+
<constant name="SOURCE_DEPTH" value="2" enum="TextureSource">
101+
The texture source is the depth texture from the depth prepass.
102+
</constant>
103+
<constant name="SOURCE_NORMAL_ROUGHNESS" value="3" enum="TextureSource">
104+
The texture source is the normal-roughness buffer from the depth prepass.
105+
</constant>
106+
<constant name="SOURCE_MAX" value="4" enum="TextureSource">
107+
Represents the size of the [enum TextureSource] enum.
108+
</constant>
91109
</constants>
92110
</class>

drivers/gles3/rasterizer_canvas_gles3.cpp

+6-2
Original file line numberDiff line numberDiff line change
@@ -2654,8 +2654,10 @@ RasterizerCanvasGLES3::RasterizerCanvasGLES3() {
26542654
26552655
shader_type canvas_item;
26562656
2657+
uniform sampler2D screen_texture : hint_screen_texture, repeat_disable, filter_nearest;
2658+
26572659
void fragment() {
2658-
vec4 c = textureLod(SCREEN_TEXTURE, SCREEN_UV, 0.0);
2660+
vec4 c = textureLod(screen_texture, SCREEN_UV, 0.0);
26592661
26602662
if (c.a > 0.0001) {
26612663
c.rgb /= c.a;
@@ -2679,8 +2681,10 @@ void fragment() {
26792681
26802682
shader_type canvas_item;
26812683
2684+
uniform sampler2D screen_texture : hint_screen_texture, repeat_disable, filter_nearest;
2685+
26822686
void fragment() {
2683-
vec4 c = textureLod(SCREEN_TEXTURE, SCREEN_UV, 0.0);
2687+
vec4 c = textureLod(screen_texture, SCREEN_UV, 0.0);
26842688
COLOR.rgb = c.rgb;
26852689
}
26862690
)");

drivers/gles3/shaders/canvas.glsl

+1-1
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ flat in uvec4 varying_G;
277277
uniform sampler2D atlas_texture; //texunit:-2
278278
uniform sampler2D shadow_atlas_texture; //texunit:-3
279279
#endif // DISABLE_LIGHTING
280-
uniform sampler2D screen_texture; //texunit:-4
280+
uniform sampler2D color_buffer; //texunit:-4
281281
uniform sampler2D sdf_texture; //texunit:-5
282282
uniform sampler2D normal_texture; //texunit:-6
283283
uniform sampler2D specular_texture; //texunit:-7

drivers/gles3/shaders/scene.glsl

+2-2
Original file line numberDiff line numberDiff line change
@@ -564,10 +564,10 @@ uniform highp samplerCubeShadow positional_shadow; // texunit:-4
564564

565565
#ifdef USE_MULTIVIEW
566566
uniform highp sampler2DArray depth_buffer; // texunit:-6
567-
uniform highp sampler2DArray screen_texture; // texunit:-5
567+
uniform highp sampler2DArray color_buffer; // texunit:-5
568568
#else
569569
uniform highp sampler2D depth_buffer; // texunit:-6
570-
uniform highp sampler2D screen_texture; // texunit:-5
570+
uniform highp sampler2D color_buffer; // texunit:-5
571571
#endif
572572

573573
uniform highp mat4 world_transform;

drivers/gles3/storage/material_storage.cpp

+4-10
Original file line numberDiff line numberDiff line change
@@ -1515,7 +1515,6 @@ MaterialStorage::MaterialStorage() {
15151515
actions.renames["SPECULAR_SHININESS_TEXTURE"] = "specular_texture";
15161516
actions.renames["SPECULAR_SHININESS"] = "specular_shininess";
15171517
actions.renames["SCREEN_UV"] = "screen_uv";
1518-
actions.renames["SCREEN_TEXTURE"] = "screen_texture";
15191518
actions.renames["SCREEN_PIXEL_SIZE"] = "screen_pixel_size";
15201519
actions.renames["FRAGCOORD"] = "gl_FragCoord";
15211520
actions.renames["POINT_COORD"] = "gl_PointCoord";
@@ -1536,7 +1535,6 @@ MaterialStorage::MaterialStorage() {
15361535
actions.renames["screen_uv_to_sdf"] = "screen_uv_to_sdf";
15371536

15381537
actions.usage_defines["COLOR"] = "#define COLOR_USED\n";
1539-
actions.usage_defines["SCREEN_TEXTURE"] = "#define SCREEN_TEXTURE_USED\n";
15401538
actions.usage_defines["SCREEN_UV"] = "#define SCREEN_UV_USED\n";
15411539
actions.usage_defines["SCREEN_PIXEL_SIZE"] = "@SCREEN_UV";
15421540
actions.usage_defines["NORMAL"] = "#define NORMAL_USED\n";
@@ -1617,9 +1615,6 @@ MaterialStorage::MaterialStorage() {
16171615
actions.renames["POINT_COORD"] = "gl_PointCoord";
16181616
actions.renames["INSTANCE_CUSTOM"] = "instance_custom";
16191617
actions.renames["SCREEN_UV"] = "screen_uv";
1620-
//actions.renames["SCREEN_TEXTURE"] = "color_buffer"; //Not implemented in 3D yet.
1621-
//actions.renames["DEPTH_TEXTURE"] = "depth_buffer"; // Not implemented in 3D yet.
1622-
//actions.renames["NORMAL_ROUGHNESS_TEXTURE"] = "normal_roughness_buffer"; // Not implemented in 3D yet
16231618
actions.renames["DEPTH"] = "gl_FragDepth";
16241619
actions.renames["OUTPUT_IS_SRGB"] = "true";
16251620
actions.renames["FOG"] = "fog";
@@ -1684,7 +1679,6 @@ MaterialStorage::MaterialStorage() {
16841679
actions.usage_defines["SSS_STRENGTH"] = "#define ENABLE_SSS\n";
16851680
actions.usage_defines["SSS_TRANSMITTANCE_DEPTH"] = "#define ENABLE_TRANSMITTANCE\n";
16861681
actions.usage_defines["BACKLIGHT"] = "#define LIGHT_BACKLIGHT_USED\n";
1687-
actions.usage_defines["SCREEN_TEXTURE"] = "#define SCREEN_TEXTURE_USED\n";
16881682
actions.usage_defines["SCREEN_UV"] = "#define SCREEN_UV_USED\n";
16891683

16901684
actions.usage_defines["DIFFUSE_LIGHT"] = "#define USE_LIGHT_SHADER_CODE\n";
@@ -2960,7 +2954,6 @@ void CanvasShaderData::set_code(const String &p_code) {
29602954
actions.render_mode_values["blend_premul_alpha"] = Pair<int *, int>(&blend_modei, BLEND_MODE_PMALPHA);
29612955
actions.render_mode_values["blend_disabled"] = Pair<int *, int>(&blend_modei, BLEND_MODE_DISABLED);
29622956

2963-
actions.usage_flag_pointers["SCREEN_TEXTURE"] = &uses_screen_texture;
29642957
actions.usage_flag_pointers["texture_sdf"] = &uses_sdf;
29652958
actions.usage_flag_pointers["TIME"] = &uses_time;
29662959

@@ -2974,6 +2967,7 @@ void CanvasShaderData::set_code(const String &p_code) {
29742967

29752968
blend_mode = BlendMode(blend_modei);
29762969
uses_screen_texture_mipmaps = gen_code.uses_screen_texture_mipmaps;
2970+
uses_screen_texture = gen_code.uses_screen_texture;
29772971

29782972
#if 0
29792973
print_line("**compiling shader:");
@@ -3309,9 +3303,6 @@ void SceneShaderData::set_code(const String &p_code) {
33093303
actions.usage_flag_pointers["SSS_STRENGTH"] = &uses_sss;
33103304
actions.usage_flag_pointers["SSS_TRANSMITTANCE_DEPTH"] = &uses_transmittance;
33113305

3312-
actions.usage_flag_pointers["SCREEN_TEXTURE"] = &uses_screen_texture;
3313-
actions.usage_flag_pointers["DEPTH_TEXTURE"] = &uses_depth_texture;
3314-
actions.usage_flag_pointers["NORMAL_TEXTURE"] = &uses_normal_texture;
33153306
actions.usage_flag_pointers["DISCARD"] = &uses_discard;
33163307
actions.usage_flag_pointers["TIME"] = &uses_time;
33173308
actions.usage_flag_pointers["ROUGHNESS"] = &uses_roughness;
@@ -3364,6 +3355,9 @@ void SceneShaderData::set_code(const String &p_code) {
33643355
vertex_input_mask |= uses_bones << 9;
33653356
vertex_input_mask |= uses_weights << 10;
33663357
uses_screen_texture_mipmaps = gen_code.uses_screen_texture_mipmaps;
3358+
uses_screen_texture = gen_code.uses_screen_texture;
3359+
uses_depth_texture = gen_code.uses_depth_texture;
3360+
uses_normal_texture = gen_code.uses_normal_roughness_texture;
33673361
uses_vertex_time = gen_code.uses_vertex_time;
33683362
uses_fragment_time = gen_code.uses_fragment_time;
33693363

editor/plugins/visual_shader_editor_plugin.cpp

+1-4
Original file line numberDiff line numberDiff line change
@@ -5441,11 +5441,9 @@ VisualShaderEditor::VisualShaderEditor() {
54415441

54425442
add_options.push_back(AddOption("Binormal", "Input/Fragment", "VisualShaderNodeInput", vformat(input_param_for_vertex_and_fragment_shader_modes, "binormal", "BINORMAL"), { "binormal" }, VisualShaderNode::PORT_TYPE_VECTOR_3D, TYPE_FLAGS_FRAGMENT, Shader::MODE_SPATIAL));
54435443
add_options.push_back(AddOption("Color", "Input/Fragment", "VisualShaderNodeInput", vformat(input_param_for_vertex_and_fragment_shader_modes, "color", "COLOR"), { "color" }, VisualShaderNode::PORT_TYPE_VECTOR_4D, TYPE_FLAGS_FRAGMENT, Shader::MODE_SPATIAL));
5444-
add_options.push_back(AddOption("DepthTexture", "Input/Fragment", "VisualShaderNodeInput", vformat(input_param_for_fragment_shader_mode, "depth_texture", "DEPTH_TEXTURE"), { "depth_texture" }, VisualShaderNode::PORT_TYPE_SAMPLER, TYPE_FLAGS_FRAGMENT, Shader::MODE_SPATIAL));
54455444
add_options.push_back(AddOption("FragCoord", "Input/Fragment", "VisualShaderNodeInput", vformat(input_param_for_fragment_and_light_shader_modes, "fragcoord", "FRAGCOORD"), { "fragcoord" }, VisualShaderNode::PORT_TYPE_VECTOR_4D, TYPE_FLAGS_FRAGMENT, Shader::MODE_SPATIAL));
54465445
add_options.push_back(AddOption("FrontFacing", "Input/Fragment", "VisualShaderNodeInput", vformat(input_param_for_fragment_shader_mode, "front_facing", "FRONT_FACING"), { "front_facing" }, VisualShaderNode::PORT_TYPE_BOOLEAN, TYPE_FLAGS_FRAGMENT, Shader::MODE_SPATIAL));
54475446
add_options.push_back(AddOption("PointCoord", "Input/Fragment", "VisualShaderNodeInput", vformat(input_param_for_fragment_shader_mode, "point_coord", "POINT_COORD"), { "point_coord" }, VisualShaderNode::PORT_TYPE_VECTOR_2D, TYPE_FLAGS_FRAGMENT, Shader::MODE_SPATIAL));
5448-
add_options.push_back(AddOption("ScreenTexture", "Input/Fragment", "VisualShaderNodeInput", vformat(input_param_for_fragment_shader_mode, "screen_texture", "SCREEN_TEXTURE"), { "screen_texture" }, VisualShaderNode::PORT_TYPE_SAMPLER, TYPE_FLAGS_FRAGMENT, Shader::MODE_SPATIAL));
54495447
add_options.push_back(AddOption("ScreenUV", "Input/Fragment", "VisualShaderNodeInput", vformat(input_param_for_fragment_shader_mode, "screen_uv", "SCREEN_UV"), { "screen_uv" }, VisualShaderNode::PORT_TYPE_VECTOR_2D, TYPE_FLAGS_FRAGMENT, Shader::MODE_SPATIAL));
54505448
add_options.push_back(AddOption("Tangent", "Input/Fragment", "VisualShaderNodeInput", vformat(input_param_for_vertex_and_fragment_shader_modes, "tangent", "TANGENT"), { "tangent" }, VisualShaderNode::PORT_TYPE_VECTOR_3D, TYPE_FLAGS_FRAGMENT, Shader::MODE_SPATIAL));
54515449
add_options.push_back(AddOption("Vertex", "Input/Fragment", "VisualShaderNodeInput", vformat(input_param_for_vertex_and_fragment_shader_modes, "vertex", "VERTEX"), { "vertex" }, VisualShaderNode::PORT_TYPE_VECTOR_3D, TYPE_FLAGS_FRAGMENT, Shader::MODE_SPATIAL));
@@ -5488,7 +5486,6 @@ VisualShaderEditor::VisualShaderEditor() {
54885486
add_options.push_back(AddOption("NormalTexture", "Input/Fragment", "VisualShaderNodeInput", vformat(input_param_for_fragment_shader_mode, "normal_texture", "NORMAL_TEXTURE"), { "normal_texture" }, VisualShaderNode::PORT_TYPE_SAMPLER, TYPE_FLAGS_FRAGMENT, Shader::MODE_CANVAS_ITEM));
54895487
add_options.push_back(AddOption("PointCoord", "Input/Fragment", "VisualShaderNodeInput", vformat(input_param_for_fragment_and_light_shader_modes, "point_coord", "POINT_COORD"), { "point_coord" }, VisualShaderNode::PORT_TYPE_VECTOR_2D, TYPE_FLAGS_FRAGMENT, Shader::MODE_CANVAS_ITEM));
54905488
add_options.push_back(AddOption("ScreenPixelSize", "Input/Fragment", "VisualShaderNodeInput", vformat(input_param_for_fragment_shader_mode, "screen_pixel_size", "SCREEN_PIXEL_SIZE"), { "screen_pixel_size" }, VisualShaderNode::PORT_TYPE_VECTOR_2D, TYPE_FLAGS_FRAGMENT, Shader::MODE_CANVAS_ITEM));
5491-
add_options.push_back(AddOption("ScreenTexture", "Input/Fragment", "VisualShaderNodeInput", vformat(input_param_for_fragment_shader_mode, "screen_texture", "SCREEN_TEXTURE"), { "screen_texture" }, VisualShaderNode::PORT_TYPE_SAMPLER, TYPE_FLAGS_FRAGMENT, Shader::MODE_CANVAS_ITEM));
54925489
add_options.push_back(AddOption("ScreenUV", "Input/Fragment", "VisualShaderNodeInput", vformat(input_param_for_fragment_and_light_shader_modes, "screen_uv", "SCREEN_UV"), { "screen_uv" }, VisualShaderNode::PORT_TYPE_VECTOR_2D, TYPE_FLAGS_FRAGMENT, Shader::MODE_CANVAS_ITEM));
54935490
add_options.push_back(AddOption("SpecularShininess", "Input/Fragment", "VisualShaderNodeInput", vformat(input_param_for_fragment_and_light_shader_modes, "specular_shininess", "SPECULAR_SHININESS"), { "specular_shininess" }, VisualShaderNode::PORT_TYPE_VECTOR_4D, TYPE_FLAGS_FRAGMENT, Shader::MODE_CANVAS_ITEM));
54945491
add_options.push_back(AddOption("SpecularShininessTexture", "Input/Fragment", "VisualShaderNodeInput", vformat(input_param_for_fragment_shader_mode, "specular_shininess_texture", "SPECULAR_SHININESS_TEXTURE"), { "specular_shininess_texture" }, VisualShaderNode::PORT_TYPE_SAMPLER, TYPE_FLAGS_FRAGMENT, Shader::MODE_CANVAS_ITEM));
@@ -5692,7 +5689,7 @@ VisualShaderEditor::VisualShaderEditor() {
56925689
add_options.push_back(AddOption("CurveTexture", "Textures/Functions", "VisualShaderNodeCurveTexture", TTR("Perform the curve texture lookup."), {}, VisualShaderNode::PORT_TYPE_SCALAR));
56935690
curve_xyz_node_option_idx = add_options.size();
56945691
add_options.push_back(AddOption("CurveXYZTexture", "Textures/Functions", "VisualShaderNodeCurveXYZTexture", TTR("Perform the three components curve texture lookup."), {}, VisualShaderNode::PORT_TYPE_VECTOR_3D));
5695-
add_options.push_back(AddOption("LinearSceneDepth", "Textures/Functions", "VisualShaderNodeLinearSceneDepth", TTR("Returns the depth value of the DEPTH_TEXTURE node in a linear space."), {}, VisualShaderNode::PORT_TYPE_SCALAR, TYPE_FLAGS_FRAGMENT, Shader::MODE_SPATIAL));
5692+
add_options.push_back(AddOption("LinearSceneDepth", "Textures/Functions", "VisualShaderNodeLinearSceneDepth", TTR("Returns the depth value obtained from the depth prepass in a linear space."), {}, VisualShaderNode::PORT_TYPE_SCALAR, TYPE_FLAGS_FRAGMENT, Shader::MODE_SPATIAL));
56965693
texture2d_node_option_idx = add_options.size();
56975694
add_options.push_back(AddOption("Texture2D", "Textures/Functions", "VisualShaderNodeTexture", TTR("Perform the 2D texture lookup."), {}, VisualShaderNode::PORT_TYPE_VECTOR_4D));
56985695
texture2d_array_node_option_idx = add_options.size();

0 commit comments

Comments
 (0)