Shader

Inherits: Resource < Reference < Object

Inherited By: VisualShader

Category: Core

Brief Description

A custom shader program.

Properties

String code

Methods

Texture get_default_texture_param ( String param ) const
Mode get_mode ( ) const
bool has_param ( String name ) const
void set_default_texture_param ( String param, Texture texture )

Enumerations

enum Mode:

  • MODE_SPATIAL = 0
  • MODE_CANVAS_ITEM = 1
  • MODE_PARTICLES = 2

Description

This class allows you to define a custom shader program that can be used for various materials to render objects.

Tutorials

Property Descriptions

Setter set_code(value)
Getter get_code()

Method Descriptions

  • Mode get_mode ( ) const

Returns the shader mode for the shader, either MODE_CANVAS_ITEM, MODE_SPATIAL or MODE_PARTICLES

  • void set_default_texture_param ( String param, Texture texture )