ShaderMaterial

Inherits: Material < Resource < RefCounted < Object

A material that uses a custom Shader program.

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

Properties

Shader

shader

Methods

Variant

get_shader_parameter ( StringName param ) const

void

set_shader_parameter ( StringName param, Variant value )


Property Descriptions

Shader shader

The Shader program used to render this material.


Method Descriptions

Variant get_shader_parameter ( StringName param ) const

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


void set_shader_parameter ( StringName param, Variant value )

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

Note: param must match the name of the uniform in the code exactly.