Skip to main content

Shader

Inherits: Resource < RefCounted < Object

Description

A shader implemented in the Godot shading language. A custom shader program saved with the .gdshader extension.

Properties

String
default:""
Returns the shader’s code as the user has written it.

Methods

get_mode

Returns the shader mode for the shader.

get_shader_uniform_list

Returns the list of shader uniforms that can be assigned to a ShaderMaterial.

set_default_texture_parameter

Sets the default texture to be used with a texture uniform.

Constants

  • MODE_SPATIAL = 0 - Mode used to draw all 3D objects
  • MODE_CANVAS_ITEM = 1 - Mode used to draw all 2D objects
  • MODE_PARTICLES = 2 - Mode used to calculate particle information
  • MODE_SKY = 3 - Mode used for drawing skies
  • MODE_FOG = 4 - Mode used for volumetric fog effect

Example Usage