What it does
SpriteShader sets Shader on a Sprite object. It takes spriteID (an integer) and shaderID (an integer), and returns nothing. spriteID is the id of a Sprite object, the one CreateSprite returned: it is how the call knows what to act on.
Syntax
SpriteShader(spriteID integer, shaderID integer)Parameters
| Name | Type |
|---|---|
| spriteID | integer |
| shaderID | integer |
Every form returns
nothing
Example · generated
image = LoadImage("assets/sprite.png", 1)sprite = CreateSprite(image)shader = LoadSpriteShader("assets/data.dat")SpriteShader(sprite, shader)DO Sync()LOOPLoadImage, CreateSprite and LoadSpriteShader are there to give the call something to act on; SpriteShader is the line that matters. The DO … LOOP is not decoration: a classic BASIC program ends the moment it runs out of lines, and Sync() is what draws the frame.