A shader implemented in the Godot shading language.
A custom shader program implemented in the Godot shading language, saved with the [code].gdshader[/code] extension. This class is used by a [ShaderMaterial] and allows you to write your own custom behavior for rendering visual items or updating particle information. For a detailed explanation and usage, please see the tutorials linked below.
$DOCS_URL/tutorials/shaders/index.html
Returns the texture that is set as default for the specified parameter. [b]Note:[/b] [param name] must match the name of the uniform in the code exactly. [b]Note:[/b] If the sampler array is used use [param index] to access the specified texture.
Returns the shader mode for the shader.
Returns the list of shader uniforms that can be assigned to a [ShaderMaterial], for use with [method ShaderMaterial.set_shader_parameter] and [method ShaderMaterial.get_shader_parameter]. The parameters returned are contained in dictionaries in a similar format to the ones returned by [method Object.get_property_list]. If argument [param get_groups] is [code]true[/code], parameter grouping hints are also included in the list.
Only available when running in the editor. Opens a popup that visualizes the generated shader code, including all variants and internal shader code. See also [method Material.inspect_native_shader_code].
Sets the default texture to be used with a texture uniform. The default is used if a texture is not set in the [ShaderMaterial]. [b]Note:[/b] [param name] must match the name of the uniform in the code exactly. [b]Note:[/b] If the sampler array is used use [param index] to access the specified texture.
- Returns the shader's code as the user has written it, not the full generated code used internally.
Mode used to draw all 3D objects.
Mode used to draw all 2D objects.
Mode used to calculate particle information on a per-particle basis. Not used for drawing.
Mode used for drawing skies. Only works with shaders attached to [Sky] objects.
Mode used for setting the color and density of volumetric fog effect.
Mode used for drawing to DrawableTexture resources via blit calls.