Shader

Inherits: Resource < Reference < Object

Inherited By: VisualShader

Category: Core

Brief Description

A custom shader program.

Properties

Stringcode

Methods

Textureget_default_texture_param ( String param ) const
Modeget_mode ( ) const
boolhas_param ( String name ) const
voidset_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

Setterset_code(value)
Getterget_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 )