From f12abece27d84af721940fb4fa6512c38b9cb51e Mon Sep 17 00:00:00 2001 From: kobewi Date: Wed, 7 Dec 2022 15:59:34 +0100 Subject: Document all VisualShader nodes --- doc/classes/VisualShader.xml | 24 ++++++++++++++++++++++ doc/classes/VisualShaderNodeConstant.xml | 1 + doc/classes/VisualShaderNodeDistanceFade.xml | 2 ++ doc/classes/VisualShaderNodeIntParameter.xml | 12 +++++++++++ doc/classes/VisualShaderNodeLinearSceneDepth.xml | 2 ++ doc/classes/VisualShaderNodeParameter.xml | 4 ++++ .../VisualShaderNodeParticleAccelerator.xml | 6 ++++++ doc/classes/VisualShaderNodeParticleBoxEmitter.xml | 2 ++ .../VisualShaderNodeParticleConeVelocity.xml | 2 ++ doc/classes/VisualShaderNodeParticleEmit.xml | 8 ++++++++ doc/classes/VisualShaderNodeParticleEmitter.xml | 1 + .../VisualShaderNodeParticleMeshEmitter.xml | 5 +++++ ...VisualShaderNodeParticleMultiplyByAxisAngle.xml | 3 +++ doc/classes/VisualShaderNodeParticleOutput.xml | 2 ++ doc/classes/VisualShaderNodeParticleRandomness.xml | 2 ++ .../VisualShaderNodeParticleRingEmitter.xml | 2 ++ .../VisualShaderNodeParticleSphereEmitter.xml | 2 ++ doc/classes/VisualShaderNodeProximityFade.xml | 2 ++ doc/classes/VisualShaderNodeRandomRange.xml | 2 ++ doc/classes/VisualShaderNodeRemap.xml | 2 ++ .../VisualShaderNodeTexture2DArrayParameter.xml | 2 ++ doc/classes/VisualShaderNodeTextureParameter.xml | 12 +++++++++++ doc/classes/VisualShaderNodeUIntParameter.xml | 4 ++++ doc/classes/VisualShaderNodeUVFunc.xml | 1 + doc/classes/VisualShaderNodeUVPolarCoord.xml | 2 ++ doc/classes/VisualShaderNodeVarying.xml | 4 ++++ doc/classes/VisualShaderNodeVaryingGetter.xml | 2 ++ doc/classes/VisualShaderNodeVaryingSetter.xml | 2 ++ doc/classes/VisualShaderNodeVectorBase.xml | 5 +++-- 29 files changed, 118 insertions(+), 2 deletions(-) (limited to 'doc/classes') diff --git a/doc/classes/VisualShader.xml b/doc/classes/VisualShader.xml index 2d59810a5f..6bffcdef36 100644 --- a/doc/classes/VisualShader.xml +++ b/doc/classes/VisualShader.xml @@ -26,6 +26,7 @@ + Adds a new varying value node to the shader. @@ -106,12 +107,14 @@ + Returns next valid node ID that can be added to the shader graph. + Returns [code]true[/code] if the shader has a varying with the given [param name]. @@ -137,6 +140,7 @@ + Removes a varying value node with the given [param name]. Prints an error if a node with this name is not found. @@ -181,16 +185,22 @@ A shader for light calculations. + A function for the "start" stage of particle shader. + A function for the "process" stage of particle shader. + A function for the "collide" stage (particle collision handler) of particle shader. + A function for the "start" stage of particle shader, with customized output. + A function for the "process" stage of particle shader, with customized output. + A shader for 3D environment's sky. A compute shader that runs for each froxel of the volumetric fog map. @@ -199,32 +209,46 @@ Represents the size of the [enum Type] enum. + Varying is passed from [code]Vertex[/code] function to [code]Fragment[/code] and [code]Light[/code] functions. + Varying is passed from [code]Fragment[/code] function to [code]Light[/code] function. + Represents the size of the [enum VaryingMode] enum. + Varying is of type [float]. + Varying is of type [int]. + Varying is of type unsigned [int]. + Varying is of type [Vector2]. + Varying is of type [Vector3]. + Varying is of type [Vector4]. + Varying is of type [bool]. + Varying is of type [Transform3D]. + Represents the size of the [enum VaryingType] enum. + Denotes invalid [VisualShader] node. + Denotes output node of [VisualShader]. diff --git a/doc/classes/VisualShaderNodeConstant.xml b/doc/classes/VisualShaderNodeConstant.xml index 213ab664ad..23b97a78c7 100644 --- a/doc/classes/VisualShaderNodeConstant.xml +++ b/doc/classes/VisualShaderNodeConstant.xml @@ -4,6 +4,7 @@ A base type for the constants within the visual shader graph. + This is an abstract class. See the derived types for descriptions of the possible values. diff --git a/doc/classes/VisualShaderNodeDistanceFade.xml b/doc/classes/VisualShaderNodeDistanceFade.xml index 8ea0857776..c707035253 100644 --- a/doc/classes/VisualShaderNodeDistanceFade.xml +++ b/doc/classes/VisualShaderNodeDistanceFade.xml @@ -1,8 +1,10 @@ + A visual shader node representing distance fade effect. + The distance fade effect fades out each pixel based on its distance to another object. diff --git a/doc/classes/VisualShaderNodeIntParameter.xml b/doc/classes/VisualShaderNodeIntParameter.xml index 70335b0c77..1ee7e3f217 100644 --- a/doc/classes/VisualShaderNodeIntParameter.xml +++ b/doc/classes/VisualShaderNodeIntParameter.xml @@ -1,33 +1,45 @@ + A visual shader node for shader parameter (uniform) of type [int]. + A [VisualShaderNodeParameter] of type [int]. Offers additional customization for range of accepted values. + Default value of this parameter, which will be used if not set externally. [member default_value_enabled] must be enabled; defaults to [code]0[/code] otherwise. + If [code]true[/code], the node will have a custom default value. + Range hint of this node. Use it to customize valid parameter range. + The maximum value this parameter can take. [member hint] must be either [constant HINT_RANGE] or [constant HINT_RANGE_STEP] for this to take effect. + The minimum value this parameter can take. [member hint] must be either [constant HINT_RANGE] or [constant HINT_RANGE_STEP] for this to take effect. + The step between parameter's values. Forces the parameter to be a multiple of the given value. [member hint] must be [constant HINT_RANGE_STEP] for this to take effect. + The parameter will not constrain its value. + The parameter's value must be within the specified [member min]/[member max] range. + The parameter's value must be within the specified range, with the given [member step] between values. + Represents the size of the [enum Hint] enum. diff --git a/doc/classes/VisualShaderNodeLinearSceneDepth.xml b/doc/classes/VisualShaderNodeLinearSceneDepth.xml index fa8c01ac0a..0dff2d780d 100644 --- a/doc/classes/VisualShaderNodeLinearSceneDepth.xml +++ b/doc/classes/VisualShaderNodeLinearSceneDepth.xml @@ -1,8 +1,10 @@ + A visual shader node that returns the depth value of the DEPTH_TEXTURE node in a linear space. + This node can be used in fragment shaders. diff --git a/doc/classes/VisualShaderNodeParameter.xml b/doc/classes/VisualShaderNodeParameter.xml index 55b10ac810..acc180a7ca 100644 --- a/doc/classes/VisualShaderNodeParameter.xml +++ b/doc/classes/VisualShaderNodeParameter.xml @@ -13,14 +13,18 @@ Name of the parameter, by which it can be accessed through the [ShaderMaterial] properties. + Defines the scope of the parameter. + The parameter will be tied to the [ShaderMaterial] using this shader. + The parameter will use a global value, defined in Project Settings. + The parameter will be tied to the node with attached [ShaderMaterial] using this shader. Represents the size of the [enum Qualifier] enum. diff --git a/doc/classes/VisualShaderNodeParticleAccelerator.xml b/doc/classes/VisualShaderNodeParticleAccelerator.xml index f26362b336..7a197dd8cb 100644 --- a/doc/classes/VisualShaderNodeParticleAccelerator.xml +++ b/doc/classes/VisualShaderNodeParticleAccelerator.xml @@ -1,21 +1,27 @@ + A visual shader node that accelerates particles. + Particle accelerator can be used in "process" step of particle shader. It will accelerate the particles. Connect it to the Velocity output port. + Defines in what manner the particles will be accelerated. + The particles will be accelerated based on their velocity. + The particles will be accelerated towards or away from the center. + The particles will be accelerated tangentially to the radius vector from center to their position. Represents the size of the [enum Mode] enum. diff --git a/doc/classes/VisualShaderNodeParticleBoxEmitter.xml b/doc/classes/VisualShaderNodeParticleBoxEmitter.xml index dbef4b806d..1bdb9d15bc 100644 --- a/doc/classes/VisualShaderNodeParticleBoxEmitter.xml +++ b/doc/classes/VisualShaderNodeParticleBoxEmitter.xml @@ -1,8 +1,10 @@ + A visual shader node that makes particles emitted in a box shape. + [VisualShaderNodeParticleEmitter] that makes the particles emitted in box shape with the specified extents. diff --git a/doc/classes/VisualShaderNodeParticleConeVelocity.xml b/doc/classes/VisualShaderNodeParticleConeVelocity.xml index c3b3621fbc..48da5b874b 100644 --- a/doc/classes/VisualShaderNodeParticleConeVelocity.xml +++ b/doc/classes/VisualShaderNodeParticleConeVelocity.xml @@ -1,8 +1,10 @@ + A visual shader node that makes particles move in a cone shape. + This node can be used in "start" step of particle shader. It defines the initial velocity of the particles, making them move in cone shape starting from the center, with a given spread. diff --git a/doc/classes/VisualShaderNodeParticleEmit.xml b/doc/classes/VisualShaderNodeParticleEmit.xml index c5e9d25ca1..3e52a74aed 100644 --- a/doc/classes/VisualShaderNodeParticleEmit.xml +++ b/doc/classes/VisualShaderNodeParticleEmit.xml @@ -1,25 +1,33 @@ + A visual shader node that forces to emit a particle from a sub-emitter. + This node internally calls [code]emit_subparticle[/code] shader method. It will emit a particle from the configured sub-emitter and also allows to customize how its emitted. Requires a sub-emitter assigned to the particles node with this shader. + Flags used to override the properties defined in the sub-emitter's process material. + If enabled, the particle starts with the position defined by this node. + If enabled, the particle starts with the rotation and scale defined by this node. + If enabled,the particle starts with the velocity defined by this node. + If enabled, the particle starts with the color defined by this node. + If enabled, the particle starts with the [code]CUSTOM[/code] data defined by this node. diff --git a/doc/classes/VisualShaderNodeParticleEmitter.xml b/doc/classes/VisualShaderNodeParticleEmitter.xml index ddfd410708..abb5528d5f 100644 --- a/doc/classes/VisualShaderNodeParticleEmitter.xml +++ b/doc/classes/VisualShaderNodeParticleEmitter.xml @@ -4,6 +4,7 @@ A base class for particle emitters. + Particle emitter nodes can be used in "start" step of particle shaders and they define the starting position of the particles. Connect them to the Position output port. diff --git a/doc/classes/VisualShaderNodeParticleMeshEmitter.xml b/doc/classes/VisualShaderNodeParticleMeshEmitter.xml index 25dd925112..59dc74690e 100644 --- a/doc/classes/VisualShaderNodeParticleMeshEmitter.xml +++ b/doc/classes/VisualShaderNodeParticleMeshEmitter.xml @@ -1,17 +1,22 @@ + A visual shader node that makes particles emitted in a shape defined by a [Mesh]. + [VisualShaderNodeParticleEmitter] that makes the particles emitted in a shape of the assigned [member mesh]. It will emit from the mesh's surfaces, either all or only the specified one. + The [Mesh] that defines emission shape. + Index of the surface that emits particles. [member use_all_surfaces] must be [code]false[/code] for this to take effect. + If [code]true[/code], the particles will emit from all surfaces of the mesh. diff --git a/doc/classes/VisualShaderNodeParticleMultiplyByAxisAngle.xml b/doc/classes/VisualShaderNodeParticleMultiplyByAxisAngle.xml index a911dbf3b4..95d031807b 100644 --- a/doc/classes/VisualShaderNodeParticleMultiplyByAxisAngle.xml +++ b/doc/classes/VisualShaderNodeParticleMultiplyByAxisAngle.xml @@ -1,13 +1,16 @@ + A visual shader helper node for multiplying position and rotation of particles. + This node helps to multiply a position input vector by rotation using specific axis. Intended to work with emitters. + If [code]true[/code], the angle will be interpreted in degrees instead of radians. diff --git a/doc/classes/VisualShaderNodeParticleOutput.xml b/doc/classes/VisualShaderNodeParticleOutput.xml index 7542272e61..4a1e61b879 100644 --- a/doc/classes/VisualShaderNodeParticleOutput.xml +++ b/doc/classes/VisualShaderNodeParticleOutput.xml @@ -1,8 +1,10 @@ + Visual shader node that defines output values for particle emitting. + This node defines how particles are emitted. It allows to customize e.g. position and velocity. Available ports are different depending on which function this node is inside (start, process, collision) and whether custom data is enabled. diff --git a/doc/classes/VisualShaderNodeParticleRandomness.xml b/doc/classes/VisualShaderNodeParticleRandomness.xml index a1f9ce040a..574ba63ba9 100644 --- a/doc/classes/VisualShaderNodeParticleRandomness.xml +++ b/doc/classes/VisualShaderNodeParticleRandomness.xml @@ -1,8 +1,10 @@ + Visual shader node for randomizing particle values. + Randomness node will output pseudo-random values of the given type based on the specified minimum and maximum values. diff --git a/doc/classes/VisualShaderNodeParticleRingEmitter.xml b/doc/classes/VisualShaderNodeParticleRingEmitter.xml index bebce51d6b..e2ff44ed55 100644 --- a/doc/classes/VisualShaderNodeParticleRingEmitter.xml +++ b/doc/classes/VisualShaderNodeParticleRingEmitter.xml @@ -1,8 +1,10 @@ + A visual shader node that makes particles emitted in a ring shape. + [VisualShaderNodeParticleEmitter] that makes the particles emitted in ring shape with the specified inner and outer radii and height. diff --git a/doc/classes/VisualShaderNodeParticleSphereEmitter.xml b/doc/classes/VisualShaderNodeParticleSphereEmitter.xml index ffbd384f1e..3d1e332c97 100644 --- a/doc/classes/VisualShaderNodeParticleSphereEmitter.xml +++ b/doc/classes/VisualShaderNodeParticleSphereEmitter.xml @@ -1,8 +1,10 @@ + A visual shader node that makes particles emitted in a sphere shape. + [VisualShaderNodeParticleEmitter] that makes the particles emitted in sphere shape with the specified inner and outer radii. diff --git a/doc/classes/VisualShaderNodeProximityFade.xml b/doc/classes/VisualShaderNodeProximityFade.xml index 25051eed71..8405fcef36 100644 --- a/doc/classes/VisualShaderNodeProximityFade.xml +++ b/doc/classes/VisualShaderNodeProximityFade.xml @@ -1,8 +1,10 @@ + A visual shader node representing proximity fade effect. + The proximity fade effect fades out each pixel based on its distance to another object. diff --git a/doc/classes/VisualShaderNodeRandomRange.xml b/doc/classes/VisualShaderNodeRandomRange.xml index adc83d808c..e1a5e0b266 100644 --- a/doc/classes/VisualShaderNodeRandomRange.xml +++ b/doc/classes/VisualShaderNodeRandomRange.xml @@ -1,8 +1,10 @@ + A visual shader node that generates a pseudo-random scalar. + Random range node will output a pseudo-random scalar value in the specified range, based on the seed. The value is always the same for the given seed and range, so you should provide a changing input, e.g. by using time. diff --git a/doc/classes/VisualShaderNodeRemap.xml b/doc/classes/VisualShaderNodeRemap.xml index 5a73a76e7f..73512bcb99 100644 --- a/doc/classes/VisualShaderNodeRemap.xml +++ b/doc/classes/VisualShaderNodeRemap.xml @@ -1,8 +1,10 @@ + A visual shader node for remap function. + Remap will transform the input range into output range, e.g. you can change a [code]0..1[/code] value to [code]-2..2[/code] etc. See [method @GlobalScope.remap] for more details. diff --git a/doc/classes/VisualShaderNodeTexture2DArrayParameter.xml b/doc/classes/VisualShaderNodeTexture2DArrayParameter.xml index 2afaa8e219..885325bc6c 100644 --- a/doc/classes/VisualShaderNodeTexture2DArrayParameter.xml +++ b/doc/classes/VisualShaderNodeTexture2DArrayParameter.xml @@ -1,8 +1,10 @@ + A visual shader node for shader parameter (uniform) of type [Texture2DArray]. + This parameter allows to provide a collection of textures for the shader. You can use [VisualShaderNodeTexture2DArray] to extract the textures from array. diff --git a/doc/classes/VisualShaderNodeTextureParameter.xml b/doc/classes/VisualShaderNodeTextureParameter.xml index ad21c4e990..333226dc58 100644 --- a/doc/classes/VisualShaderNodeTextureParameter.xml +++ b/doc/classes/VisualShaderNodeTextureParameter.xml @@ -51,27 +51,39 @@ Represents the size of the [enum ColorDefault] enum. + Sample the texture using the filter determined by the node this shader is attached to. + The texture filter reads from the nearest pixel only. The simplest and fastest method of filtering, but the texture will look pixelized. + The texture filter blends between the nearest four pixels. Use this for most cases where you want to avoid a pixelated style. + The texture filter reads from the nearest pixel in the nearest mipmap. This is the fastest way to read from textures with mipmaps. + The texture filter blends between the nearest 4 pixels and between the nearest 2 mipmaps. Use this for non-pixel art textures that may be viewed at a low scale (e.g. due to [Camera2D] zoom), as mipmaps are important to smooth out pixels that are smaller than on-screen pixels. + The texture filter reads from the nearest pixel, but selects a mipmap based on the angle between the surface and the camera view. This reduces artifacts on surfaces that are almost in line with the camera. The anisotropic filtering level can be changed by adjusting [member ProjectSettings.rendering/textures/default_filters/anisotropic_filtering_level]. + [b]Note:[/b] This texture filter is rarely useful in 2D projects. [constant FILTER_LINEAR_MIPMAP] is usually more appropriate. + The texture filter blends between the nearest 4 pixels and selects a mipmap based on the angle between the surface and the camera view. This reduces artifacts on surfaces that are almost in line with the camera. This is the slowest of the filtering options, but results in the highest quality texturing. The anisotropic filtering level can be changed by adjusting [member ProjectSettings.rendering/textures/default_filters/anisotropic_filtering_level]. + [b]Note:[/b] This texture filter is rarely useful in 2D projects. [constant FILTER_LINEAR_MIPMAP] is usually more appropriate. Represents the size of the [enum TextureFilter] enum. + Sample the texture using the repeat mode determined by the node this shader is attached to. + Texture will repeat normally. + Texture will not repeat. Represents the size of the [enum TextureRepeat] enum. diff --git a/doc/classes/VisualShaderNodeUIntParameter.xml b/doc/classes/VisualShaderNodeUIntParameter.xml index 3b549c84f7..4c95e58962 100644 --- a/doc/classes/VisualShaderNodeUIntParameter.xml +++ b/doc/classes/VisualShaderNodeUIntParameter.xml @@ -1,15 +1,19 @@ + A visual shader node for shader parameter (uniform) of type unsigned [int]. + A [VisualShaderNodeParameter] of type unsigned [int]. Offers additional customization for range of accepted values. + Default value of this parameter, which will be used if not set externally. [member default_value_enabled] must be enabled; defaults to [code]0[/code] otherwise. + If [code]true[/code], the node will have a custom default value. diff --git a/doc/classes/VisualShaderNodeUVFunc.xml b/doc/classes/VisualShaderNodeUVFunc.xml index 541991b790..b5143b647c 100644 --- a/doc/classes/VisualShaderNodeUVFunc.xml +++ b/doc/classes/VisualShaderNodeUVFunc.xml @@ -4,6 +4,7 @@ Contains functions to modify texture coordinates ([code]uv[/code]) to be used within the visual shader graph. + UV functions are similar to [Vector2] functions, but the input port of this node uses the shader's UV value by default. diff --git a/doc/classes/VisualShaderNodeUVPolarCoord.xml b/doc/classes/VisualShaderNodeUVPolarCoord.xml index 8582939db3..49f7f52bc1 100644 --- a/doc/classes/VisualShaderNodeUVPolarCoord.xml +++ b/doc/classes/VisualShaderNodeUVPolarCoord.xml @@ -1,8 +1,10 @@ + A visual shader node that modifies the texture UV using polar coordinates. + UV polar coord node will transform UV values into polar coordinates, with specified scale, zoom strength and repeat parameters. It can be used to create various swirl distortions. diff --git a/doc/classes/VisualShaderNodeVarying.xml b/doc/classes/VisualShaderNodeVarying.xml index 0dbbd61f3a..0a5c5a70af 100644 --- a/doc/classes/VisualShaderNodeVarying.xml +++ b/doc/classes/VisualShaderNodeVarying.xml @@ -1,15 +1,19 @@ + A visual shader node that represents a "varying" shader value. + Varying values are shader variables that can be passed between shader functions, e.g. from Vertex shader to Fragment shader. + Name of the variable. Must be unique. + Type of the variable. Determines where the variable can be accessed. diff --git a/doc/classes/VisualShaderNodeVaryingGetter.xml b/doc/classes/VisualShaderNodeVaryingGetter.xml index de30b18d67..dea47ed3c1 100644 --- a/doc/classes/VisualShaderNodeVaryingGetter.xml +++ b/doc/classes/VisualShaderNodeVaryingGetter.xml @@ -1,8 +1,10 @@ + A visual shader node that gets a value of a varying. + Outputs a value of a varying defined in the shader. You need to first create a varying that can be used in the given function, e.g. varying getter in Fragment shader requires a varying with mode set to [constant VisualShader.VARYING_MODE_VERTEX_TO_FRAG_LIGHT]. diff --git a/doc/classes/VisualShaderNodeVaryingSetter.xml b/doc/classes/VisualShaderNodeVaryingSetter.xml index 57ead3d82b..b305fdd3ef 100644 --- a/doc/classes/VisualShaderNodeVaryingSetter.xml +++ b/doc/classes/VisualShaderNodeVaryingSetter.xml @@ -1,8 +1,10 @@ + A visual shader node that sets a value of a varying. + Inputs a value to a varying defined in the shader. You need to first create a varying that can be used in the given function, e.g. varying setter in Fragment shader requires a varying with mode set to [constant VisualShader.VARYING_MODE_FRAG_TO_LIGHT]. diff --git a/doc/classes/VisualShaderNodeVectorBase.xml b/doc/classes/VisualShaderNodeVectorBase.xml index d9c9f2d79c..68cf00e819 100644 --- a/doc/classes/VisualShaderNodeVectorBase.xml +++ b/doc/classes/VisualShaderNodeVectorBase.xml @@ -1,15 +1,16 @@ - A base type for the nodes using different vector types within the visual shader graph. + A base type for the nodes that perform vector operations within the visual shader graph. + This is an abstract class. See the derived types for descriptions of the possible operations. - A base type. + A vector type that this operation is performed on. -- cgit v1.2.3