Creating a shader

To demonstrate some shader effects, create a scene with a Sprite node and choose any texture you like. This demo will use the cactus image from Coin Dash:

A shader can be added to any CanvasItem derived node—in this case, Sprite, via its Material property. In this property, select New Shader Material and click on the newly created resource. The first property is Shader, where you can choose a New Shader. When you do, a Shader panel appears at the bottom of the editor window.

This is where you'll write your shader code:

A blank ...

Get Godot Engine Game Development Projects now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.