Skip to content
Mtax edited this page Sep 5, 2026 · 2 revisions

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}
Contents

Constructors
Container
Angle
Management
● isFunctional()
Getters
● equals()
● difference()
Setters
● set()
● modify()
Conversion
● toString()
Color2
Management
● isFunctional()
Getters
● equals()
● interpolate()
Setters
● reverse()
● set()
● setAll()
Conversion
● toString()
● toArray()
Color3
Management
● isFunctional()
Getters
● equals()
● interpolate()
Setters
● reverse()
● set()
● setAll()
Conversion
● toString()
● toArray()
Color4
Management
● isFunctional()
Getters
● equals()
● interpolate()
Setters
● reverse()
● set()
● setAll()
Conversion
● toString()
● toArray()
● split()
DateTime
Management
● isFunctional()
Getters
● compareDateTime()
● compareDate()
● compareTime()
● spanOfYears()
● spanOfMonths()
● spanOfWeeks()
● spanOfDays()
● spanOfHours()
● spanOfMinutes()
● spanOfSeconds()
● getDate()
● getTime()
● getDaysInYear()
● getDaysInMonth()
● getWeekOfYear()
● getDayOfYear()
● getHourOfYear()
● getMinuteOfYear()
● getSecondOfYear()
● getWeekday()
● isToday()
● isLeapYear()
Setters
● modify()
● modifyYears()
● modifyMonths()
● modifyWeeks()
● modifyDays()
● modifyHours()
● modifyMinutes()
● modifySeconds()
● setCurrent()
● setDateTime()
Conversion
● toString()
● toStringDate()
● toStringTime()
● toArray()
● toArrayDate()
● toArrayTime()
EulerAngle
Management
● isFunctional()
Setters
● set()
● modify()
Conversion
● toString()
● toArray()
Range
Management
● isFunctional()
Getters
● sum()
● difference()
● product()
● quotient()
● clamp()
● interpolate()
● percent()
● randomReal()
● randomInt()
● getMiddle()
● isBetween()
● isBoundary()
Conversion
● toString()
● toArray()
RangedValue
Management
● isFunctional()
Getters
● equals()
● percent()
● isBoundary()
● isMinimum()
● isMaximum()
Setters
● modify()
● modifyWrap()
● modifyBounce()
● interpolate()
● set()
● setMinimum()
● setMaximum()
● setOriginal()
● setMiddle()
Conversion
● toString()
Scale
Management
● isFunctional()
Getters
● contains()
● equals()
● sum()
● difference()
● product()
● quotient()
● getMinimum()
● getMaximum()
● getSign()
Setters
● add()
● substract()
● multiply()
● divide()
● approach()
● grow()
● shrink()
● mirror()
● mirrorX()
● mirrorY()
● set()
● setAll()
Conversion
● toString()
● toArray()
TextAlign
Management
● isFunctional()
Getters
● equals()
● getMultiplier()
Setters
● mirror()
● mirrorX()
● mirrorY()
● setXLeft()
● setXCenter()
● setXRight()
● setYTop()
● setYMiddle()
● setYBottom()
Execution
● setActive()
Conversion
● toString()
● toArray()
Vector2
Management
● isFunctional()
Getters
● contains()
● equals()
● exceeds()
● subceeds()
● sum()
● difference()
● absoluteDifference()
● product()
● quotient()
● dotProduct()
● crossProduct()
● getAngle()
● getDistance()
● getMinimum()
● getMaximum()
● getMagnitude()
● getNormalized()
● getSign()
Setters
● add()
● substract()
● multiply()
● divide()
● approach()
● grow()
● shrink()
● clamp()
● setMinimum()
● setMaximum()
● flip()
● mirror()
● set()
● setAll()
● setFloor()
● setRound()
● setCeil()
● setCursor()
Conversion
● toString()
● toArray()
Vector3
Management
● isFunctional()
Getters
● contains()
● equals()
● exceeds()
● subceeds()
● sum()
● difference()
● absoluteDifference()
● product()
● quotient()
● dotProduct()
● crossProduct()
● getDistance()
● getMinimum()
● getMaximum()
● getMagnitude()
● getNormalized()
● getSign()
Setters
● add()
● substract()
● multiply()
● divide()
● approach()
● grow()
● shrink()
● mirror()
● set()
● setAll()
● setFloor()
● setRound()
● setCeil()
Conversion
● toString()
● toArray()
Vector4
Management
● isFunctional()
Getters
● contains()
● equals()
● exceeds()
● subceeds()
● sum()
● difference()
● absoluteDifference()
● product()
● quotient()
● dotProduct()
● interpolate()
● percent()
● getAngle()
● getDistance()
● getClosest()
● getMinimum()
● getMaximum()
● getMiddle()
● getMagnitude()
● getNormalized()
● getSign()
● isBetween()
● isDegenerate()
Setters
● add()
● substract()
● multiply()
● divide()
● approach()
● clamp()
● setMinimum()
● setMaximum()
● grow()
● shrink()
● flip()
● mirror()
● mirrorX()
● mirrorY()
● sort()
● roundToBorder()
● set()
● setAll()
● setFloor()
● setRound()
● setCeil()
● setCursor()
● setBoundary()
Conversion
● toString()
● toArray()
● split()
● combine()
Data Structure
Grid
Management
● isFunctional()
● destroy()
● clear()
● copy()
Getters
● contains()
● containsRegion()
● containsDisk()
● count()
● getValue()
● getCellCount()
● getRow()
● getColumn()
● getMinimum()
● getMinimumDisk()
● getMaximum()
● getMaximumDisk()
● getMean()
● getMeanDisk()
● getSum()
● getSumDisk()
● getValueLocation()
● getValueLocationDisk()
Setters
● setSize()
Execution
● forEach()
● set()
● setRegion()
● setDisk()
● setRegionCopied()
● add()
● addRegion()
● addDisk()
● addRegionCopied()
● multiply()
● multiplyRegion()
● multiplyDisk()
● multiplyRegionCopied()
● mirrorX()
● mirrorY()
● transpose()
● sort()
● shuffle()
Conversion
● toString()
● toArray()
● fromArray()
● toEncodedString()
● fromEncodedString()
List
Management
● isFunctional()
● destroy()
● clear()
● copy()
Getters
● contains()
● count()
● getValue()
● getFirst()
● getLast()
● getFirstPosition()
● getPositions()
● getSize()
● isEmpty()
Execution
● forEach()
● add()
● set()
● replace()
● removePosition()
● removeValue()
● insert()
● sort()
● shuffle()
Conversion
● toString()
● toArray()
● fromArray()
● toEncodedString()
● fromEncodedString()
Map
Management
● isFunctional()
● destroy()
● clear()
● copy()
Getters
● contains()
● count()
● getValue()
● getAllValues()
● getAllKeys()
● getFirst()
● getLast()
● getPrevious()
● getNext()
● keyExists()
● valueIsBoundList()
● valueIsBoundMap()
● getSize()
● isEmpty()
Execution
● forEach()
● add()
● addBoundList()
● addBoundMap()
● set()
● replace()
● remove()
Conversion
● toString()
● toArray()
● fromArray()
● toStruct()
● fromStruct()
● toEncodedString()
● fromEncodedString()
● secureToFile()
● secureFromFile()
● secureFromBuffer()
PriorityQueue
Management
● isFunctional()
● destroy()
● clear()
● copy()
Getters
● contains()
● count()
● getFirst()
● getLast()
● getPriority()
● getFirstPriority()
● getLastPriority()
● getSize()
● isEmpty()
Execution
● forEach()
● add()
● setPriority()
● remove()
● removeFirst()
● removeLast()
Conversion
● toString()
● toArray()
● fromArray()
● toEncodedString()
● fromEncodedString()
Queue
Management
● isFunctional()
● destroy()
● clear()
● copy()
Getters
● contains()
● count()
● getFirst()
● getLast()
● getSize()
● isEmpty()
Execution
● forEach()
● add()
● remove()
Conversion
● toString()
● toArray()
● fromArray()
● toEncodedString()
● fromEncodedString()
Stack
Management
● isFunctional()
● destroy()
● clear()
● copy()
Getters
● contains()
● count()
● getFirst()
● getLast()
● getSize()
● isEmpty()
Execution
● forEach()
● add()
● remove()
Conversion
● toString()
● toArray()
● fromArray()
● toEncodedString()
● fromEncodedString()
Debug
ErrorReport
Management
● isFunctional()
Execution
● report()
Conversion
● toString()

ErrorReport.ReportData
Management
● isFunctional()
Getters
● equals()
● formatLocation()
● formatDetail()
● formatCallstack()
● formatTime()
Conversion
● toString()
Handler
ArrayParser
Management
● isFunctional()
● setParser()
● create()
● clear()
● copy()
● merge()
Getters
● contains()
● containsAll()
● containsCondition()
● equals()
● getValue()
● getUniqueValues()
● getSharedValues()
● getFirst()
● getLast()
● getFirstPosition()
● getLastPosition()
● getPositions()
● getPositionsCondition()
● getReduction()
● getColumn()
● getSize()
● isEmpty()
Setters
● setSize()
Execution
● forEach()
● add()
● addUnique()
● set()
● insert()
● removePosition()
● removeValue()
● sort()
Conversion
● toString()
AudioPlayer
Management
● isFunctional()
Execution
● play()
Conversion
● toString()
Callback
Management
● isFunctional()
● clear()
Getters
● prependArgument()
Setters
● set()
● setAll()
Execution
● execute()
Conversion
● toString()
● toArray()
SpriteRenderer
Management
● isFunctional()
Getters
● equals()
● getVertexLocation()
● getUV()
● getPrimitiveRenderData()
Execution
● render()
Conversion
● toString()
● toArray()
● toVertexBuffer()
StringParser
Management
● isFunctional()
● setParser()
Getters
● contains()
● containsAll()
● startsWith()
● endsWith()
● charEquals()
● charIsWhitespace()
● split()
● getFirst()
● getLast()
● getBetween()
● getByte()
● getByteLength()
● getChar()
● getOrd()
● getPart()
● getLetters()
● getDigits()
● getLettersAndDigits()
● getSubstringCount()
● getSubstringPosition()
● getSize()
● getPixelSize()
Setters
● remove()
● formatNumber()
● formatStruct()
● insert()
● duplicate()
● replace()
● reverse()
● trim()
● setByte()
● setLowercase()
● setUppercase()
● capitalize()
Execution
● forEach()
● displayOutput()
● displayMessageBox()
Conversion
● toString()
● toNumber()
● toArray()
● fromArray()
● toFile()
● fromFile()
● fromJSON()
SurfaceRenderer
Management
● isFunctional()
Execution
● render()
Conversion
● toString()
● toVertexBuffer()
TextRenderer
Management
● isFunctional()
Getters
● equals()
● getScaleMultiplier()
● getPixelSize()
● getBoundaryOffset()
Setters
● wrapText()
Execution
● render()
Conversion
● toString()
● toVertexBuffer()
Resource
Audio
Management
● isFunctional()
Getters
● isPlaying()
Setters
● setOffset()
Execution
● play()
Conversion
● toString()
Buffer
Management
● isFunctional()
● destroy()
● copy()
Getters
● getSeekPosition()
● getType()
● getAlignment()
● getPointer()
● getSize()
Setters
● setSeekPosition()
Execution
● write()
● fill()
● read()
● compress()
● decompress()
● getValue()
Conversion
● toString()
● toHashMD5()
● toHashSHA1()
● toHashCRC32()
● toEncodedString()
● fromEncodedString()
● secureFromMap()
● fromSurface()
● toFile()
● fromFile()
● fromFilePart()
Camera
Management
● isFunctional()
● destroy()
Execution
● applySettings()
● createOrtographicProjectionMatrix()
● createPerspectiveProjectionMatrix()
● createPerspectiveFieldOfViewProjectionMatrix()
● createViewMatrix()
Conversion
● toString()

Camera.OrtographicProjectionMatrix
Management
● isFunctional()
Execution
● build()
Conversion
● toString()
Camera.PerspectiveProjectionMatrix
Management
● isFunctional()
Execution
● build()
Conversion
● toString()
Camera.PerspectiveFieldOfViewProjectionMatrix
Management
● isFunctional()
Execution
● build()
Conversion
● toString()
Camera.ViewMatrix
Management
● isFunctional()
Execution
● build()
Conversion
● toString()
Font
Management
● isFunctional()
● destroy()
Getters
● equals()
● getTexture()
● getTexel()
● getUV()
● isActive()
Execution
● setActive()
Conversion
● toString()
Layer
Management
● isFunctional()
● destroy()
Getters
● hasInstance()
● getElements()
Setters
● setLocation()
● setSpeed()
● setVisible()
● setDepth()
● setShader()
● setFunctionDrawBegin()
● setFunctionDrawEnd()
Execution
● createBackground()
● createInstance()
● createTilemap()
● createSprite()
● createParticleSystem()
● destroyInstance()
● setInstancePause()
Conversion
● toString()

Layer.SpriteElement
Management
● isFunctional()
● changeParent()
● destroy()
Setters
● setSprite()
● setScale()
● setColor()
● setAlpha()
● setFrame()
● setSpeed()
Conversion
● toString()
Layer.BackgroundElement
Management
● isFunctional()
● changeParent()
● destroy()
Setters
● setSprite()
● setScale()
● setColor()
● setAlpha()
● setFrame()
● setSpeed()
● setStretch()
● setTiled()
● setVisible()
Conversion
● toString()
Layer.TilemapElement
Management
● isFunctional()
● destroy()
● clear()
● changeParent()
Getters
● getFrame()
● getMask()
● getTileInCell()
● getTileAtPoint()
● getCellAtPoint()
Setters
● setMask()
● setTileset()
● setSize()
Execution
● render()
● setTileInCell()
● setTileAtPoint()
Conversion
● toString()

Layer.TilemapElement.TileData
Management
● isFunctional()
● clear()
Getters
● getTilesetIndex()
● isEmpty()
● isMirroredX()
● isMirroredY()
● isRotated()
Setters
● setTilesetIndex()
● setMirrorX()
● setMirrorY()
● setRotate()
Execution
● render()
Conversion
● toString()
Layer.ParticleSystem
Management
● isFunctional()
● destroy()
● clear()
● changeParent()
Getters
● getParticleCount()
Setters
● setLocation()
● setDrawOrder()
● setAutomaticUpdate()
● setAutomaticRender()
Execution
● createEmitter()
● render()
● update()
Conversion
● toString()

Layer.ParticleSystem.ParticleEmitter
Management
● isFunctional()
● destroy()
● clear()
Setters
● setRegion()
● setStreamEnabled()
● setStreamCount()
Execution
● burst()
● stream()
Conversion
● toString()
ParticleType
Management
● isFunctional()
● destroy()
● clear()
Setters
● setShape()
● setSprite()
● setScale()
● setSize()
● setSpeed()
● setDirection()
● setAngle()
● setGravity()
● setLife()
● setColor()
● setColorMix()
● setColorRGB()
● setColorHSV()
● setBlend()
● setAlpha()
● setStep()
● setDeath()
Execution
● create()
● createShape()
Conversion
● toString()
Room
Management
● isFunctional()
● copy()
Getters
● isActive()
Setters
● setSize()
● setPersistent()
Execution
● createInstance()
● setActive()
Conversion
● toString()

Room.AddedInstance
Management
● isFunctional()
Conversion
● toString()
Shader
Management
● isFunctional()
Getters
● isActive()
Setters
● setUniformFloat()
● setUniformInt()
● setUniformMatrix()
● setUniformTexture()
● updateUniforms()
Execution
● setActive()
● createUniformData()
Conversion
● toString()

Shader.Uniform
Management
● isFunctional()
Execution
● update()
Conversion
● toString()
Sprite
Management
● isFunctional()
● destroy()
● replace()
● merge()
Getters
● getNineslice()
● getTexture()
● getUV()
● getTexel()
● getTextureTrim()
Setters
● setNineslice()
● setOrigin()
● setSpeed()
● setCollisionMask()
Execution
● render()
● renderTiled()
● renderPerspective()
● load()
● generateAlphaMap()
Conversion
● toString()
● toFile()
Surface
Management
● isFunctional()
● create()
● destroy()
● clear()
● copy()
Getters
● equals()
● getPixel()
● getTexture()
● getTexel()
● isActive()
Setters
● setSize()
Execution
● render()
● renderTiled()
● setActive()
Conversion
● toString()
● toFile()
● fromBuffer()
VertexBuffer
Management
● isFunctional()
● destroy()
● copy()
Getters
● getSize()
Setters
● setLocation2D()
● setLocation3D()
● setColor()
● setUV()
● setNormal()
Execution
● render()
● setActive()
● createPrimitiveRenderData()
● makeReadOnly()
Conversion
● toString()

VertexBuffer.PrimitiveRenderData
Management
● isFunctional()
● destroy()
Execution
● render()
Conversion
● toString()
VertexFormat
Management
● isFunctional()
● destroy()
Conversion
● toString()
Shape
Circle
Management
● isFunctional()
Getters
● equals()
● collision()
● containsPoint()
● cursorOver()
● cursorHold()
● cursorPressed()
● cursorReleased()
● getVertexLocation()
● getPrimitiveRenderData()
Execution
● render()
Conversion
● toString()
● toArray()
● toVertexBuffer()
Cube
Management
● isFunctional()
Getters
● getVertexLocation()
● getUV()
● getNormal()
● getSpriteFrameOrder()
● getVertexSign()
● getPrimitiveRenderData()
Execution
● render()
Conversion
● toString()
● toVertexBuffer()
Ellipse
Management
● isFunctional()
Getters
● equals()
● collision()
● containsPoint()
● cursorOver()
● cursorPressed()
● cursorHold()
● cursorReleased()
● getVertexLocation()
● getPrimitiveRenderData()
● getOutlineLocation()
Execution
● render()
Conversion
● toString()
● toArray()
● toVertexBuffer()
Line
Management
● isFunctional()
Getters
● equals()
● collision()
● containsPoint()
● cursorOver()
● cursorPressed()
● cursorHold()
● cursorReleased()
● getVertexLocation()
● getPrimitiveRenderData()
Execution
● render()
Conversion
● toString()
● toArray()
● toVertexBuffer()
Plane
Management
● isFunctional()
Getters
● getVertexLocation()
● getUV()
● getNormal()
● getTransform()
● getVertexSign()
● getPrimitiveRenderData()
Execution
● render()
Conversion
● toString()
● toVertexBuffer()
Point
Management
● isFunctional()
Getters
● equals()
● collision()
● cursorOver()
● cursorHold()
● cursorPressed()
● cursorReleased()
● getPrimitiveRenderData()
Execution
● render()
Conversion
● toString()
● toArray()
● toVertexBuffer()
Rectangle
Management
● isFunctional()
Getters
● equals()
● collision()
● containsPoint()
● cursorOver()
● cursorHold()
● cursorPressed()
● cursorReleased()
● getVertexLocation()
● getPrimitiveRenderData()
● getOutlineLocation()
Execution
● render()
Conversion
● toString()
● toArray()
● toVertexBuffer()
RoundRectangle
Management
● isFunctional()
Getters
● equals()
● containsPoint()
● cursorOver()
● cursorPressed()
● cursorHold()
● cursorReleased()
● getVertexLocation()
● getPrimitiveRenderData()
● getOutlineLocation()
Execution
● render()
Conversion
● toString()
● toArray()
● toVertexBuffer()
Triangle
Management
● isFunctional()
Getters
● equals()
● containsPoint()
● cursorOver()
● cursorHold()
● cursorPressed()
● cursorReleased()
● getVertexLocation()
● getPrimitiveRenderData()
● getOutlineLocation()
Execution
● render()
Conversion
● toString()
● toArray()
● toVertexBuffer()

Clone this wiki locally