W3cubDocs

/Godot 3.1

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

String code

Setter set_code(value)
Getter get_code()

Method Descriptions

Texture get_default_texture_param ( String param ) const

Mode get_mode ( ) const

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

bool has_param ( String name ) const

void set_default_texture_param ( String param, Texture texture )

© 2014–2019 Juan Linietsky, Ariel Manzur, Godot Engine contributors
Licensed under the MIT License.
http://docs.godotengine.org/en/3.1/classes/class_shader.html