W3cubDocs

/Godot 3.1

ShaderMaterial

Inherits: Material < Resource < Reference < Object

Category: Core

Brief Description

A material that uses a custom Shader program.

Properties

Shader shader

Methods

Variant get_shader_param ( String param ) const
bool property_can_revert ( String name )
Variant property_get_revert ( String name )
void set_shader_param ( String param, Variant value )

Description

A material that uses a custom Shader program to render either items to screen or process particles. You can create multiple materials for the same shader but configure different values for the uniforms defined in the shader.

Tutorials

Property Descriptions

Shader shader

Setter set_shader(value)
Getter get_shader()

The Shader program used to render this material.

Method Descriptions

Variant get_shader_param ( String param ) const

Returns the current value set for this material of a uniform in the shader.

bool property_can_revert ( String name )

Variant property_get_revert ( String name )

void set_shader_param ( String param, Variant value )

Changes the value set for this material of a uniform in the shader.

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