ShaderMaterial

A material that uses a custom Shader program.

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. Note: Due to a renderer limitation, emissive ShaderMaterials cannot emit light when used in a GIProbe. Only emissive SpatialMaterials can emit light in a GIProbe.

Members

Aliases

BaseClasses
alias BaseClasses = AliasSeq!(typeof(_GODOT_base), typeof(_GODOT_base).BaseClasses)
Undocumented in source.

Functions

_shaderChanged
void _shaderChanged()
getShader
Ref!Shader getShader()
getShaderParam
Variant getShaderParam(String param)

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

opAssign
typeof(null) opAssign(typeof(null) n)
opEquals
bool opEquals(ShaderMaterial other)
opEquals
bool opEquals(typeof(null) n)
propertyCanRevert
bool propertyCanRevert(String name)

Returns true if the property identified by name can be reverted to a default value.

propertyGetRevert
Variant propertyGetRevert(String name)

Returns the default value of the material property with given name.

setShader
void setShader(Shader shader)
setShaderParam
void setShaderParam(String param, VariantArg1 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.

toHash
size_t toHash()

Mixins

__anonymous
mixin baseCasts
Undocumented in source.

Properties

shader
Shader shader [@property getter]
Shader shader [@property setter]

The Shader program used to render this material.

Static functions

_new
ShaderMaterial _new()

Construct a new instance of ShaderMaterial. Note: use memnew!ShaderMaterial instead.

Static variables

_classBindingInitialized
bool _classBindingInitialized;
Undocumented in source.

Structs

GDNativeClassBinding
struct GDNativeClassBinding
Undocumented in source.

Unions

__anonymous
union __anonymous
Undocumented in source.

Variables

_GODOT_internal_name
enum string _GODOT_internal_name;
Undocumented in source.

Mixed In Members

From mixin baseCasts

as
inout(To) as()
Undocumented in source. Be warned that the author may not have intended to support it.
as
inout(To) as()
Undocumented in source. Be warned that the author may not have intended to support it.
as
inout(ToRef) as()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
template opCast(To)
Undocumented in source.
opCast
template opCast(To)
Undocumented in source.
opCast
template opCast(ToRef)
Undocumented in source.
opCast
void* opCast()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
godot_object opCast()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
bool opCast()
Undocumented in source. Be warned that the author may not have intended to support it.

Meta