Scenes > Shaders

Read our guide on Shaders for an explanation of these blocks.


Apply Shader

apply shader to game

Applies the specified shader to the game. This replaces the existing shader. To use multiple shaders at a time, use the combine shader blocks below.


Clear Shaders

clear shaders from game

Removes the existing shader from the game.


Toggle shaders for HUD layer

toggle shaders for hud layer

Enables/disables shaders for the HUD (top, non-scrolling) layer.


Combine 2 Shaders

shader + shader

Combines 2 shaders together. If combining more than 2, stick further combines in the second slot.


Combine 3 Shaders

shader + shader + shader

Combines 3 shaders together.


Combine 4 Shaders

shader + shader + shader + shader

Combines 4 shaders together.


Load Shader from File

shader from file text

Loads a shader placed into a game's extras directory.

new ExternalShader([TEXT])

Load Shader from Text

shader from code text

Define a shader inline using GLSL.

new InlineShader([TEXT])


Set Shader Property

set text for shader to object

Instantly set a shader's properties. This lets you tweak a shader (in ways that the blocks don't allow) and alter its appearance after creation.

Consult our Shaders article for property names.

[SHADER].setProperty([TEXT], [VALUE]);

Tween a Shader Property

change text for shader to number over number sec using dropdown

Change a shader's properties over time. Consult our Shaders article for property names.

[SHADER].tweenProperty([TEXT], [NUMBER], [NUMBER], [EASING]);

Set Time Scale for Shader

set time scale to number for shader

Makes animated shaders run faster/slower. Useful for porting shaders written for other environments. 1.0 is normal time. 2.0 is twice as fast.


Color Shaders


adjust hue by number degrees

Adjusts the screen's hue in degrees.

new HueShader([NUMBER])

Contrast / Saturation / Brightness

set contrast to number %

Adjust the screen's contrast, saturation or brightness, in percentages. 100% means original value, 200% means twice as much, 50% means half as much.

CSBShader.create("contrast", [NUMBER]/100)
CSBShader.create("saturation", [NUMBER]/100)
CSBShader.create("brightness", [NUMBER]/100)


tint using color at number %

Apply a color-based tint to the screen using the specified opacity in pecentage between 0% (no tint), 100% (full tint).

new TintShader([COLOR], [NUMBER]/100)

Filter Shaders

Filters (Grayscale / Inverse / Sepia)

grayscale filter

Apply simple filters (grayscale, inverse, sepia) to the screen.

new GrayscaleShader()
new InvertShader()
new SepiaShader()


blur by x number y number , number pixels

Applies a directional blur to the screen. x/y collectively define a 'slope' for the direction, so -1,-1 is a diagonal blur.

new BlurShader([NUMBER], [NUMBER], [NUMBER])


sharpen by number

Sharpen with the given intensity.

new SharpenShader([NUMBER])


bloom filter

Causes highlights (bright areas) to bleed and glow.

new BloomShader()

Effect Shaders


add grain

Apply a dynamic, film grain effect to the screen.

new GrainShader()


add scanlines with width number px

Apply TV-like scanlines to the screen.

new ScanlineShader([NUMBER])