Shader - Mtax-Development/GML-OOP GitHub Wiki

Description

Constructs a Shader Resource used to alter graphical rendering with GLSL or HLSL code executed by the Graphics Processing Unit. Values in its code can be set through Uniforms, the copy of which is then saved in a property with the same property name in the uniform struct of this constructor. They are contained in the Uniform constructors, used to further update their values. Values set while a Shader is not active will be ignored by its code.

As Shader programs are written in their own languages, GameMaker Language makes use of several systems to communicate with them. Example of such are ones used to communicate with variables within the Shader code to manage uniforms and samplers. After being read, last received information will be added to an appropriate {struct} in this constructor for later reading, each in a newly created property named with the exact name of the variable inside the Shader code.

Specification

Destruction
Elements
Garbage Collection
None

Properties

Name
Type
Default
Modifiable
ID
{handle:shader}
None
No
name
None
No
compiled
None
No
uniform
{}
No

Construction types

Name
Arguments
New constructor
shader {handle:shader}
Empty
Constructor copy
other {Shader}
⚠️ **GitHub.com Fallback** ⚠️