defold-shaders-editing
Installation
SKILL.md
Editing Defold Shaders
Creates and edits Defold shader files: vertex programs (.vp), fragment programs (.fp), and GLSL include snippets (.glsl).
When to use
This skill covers GLSL shader files used in Defold's rendering pipeline. It does NOT cover .material files — for those, use the defold-proto-file-editing skill (see references/material.md).
Shader pipeline and GLSL version
Defold supports two shader pipelines:
- Legacy pipeline — shaders written in OpenGL ES 2.0 compatible GLSL (no
#versiondirective). Deprecated since Defold 1.9.2. - Modern pipeline — shaders written in SPIR-V compatible GLSL with
#version 140or higher. This is the current standard.
Always write shaders using #version 140 (OpenGL 3.1) at the top of the file. This directive selects the modern pipeline during the build process. If no #version is found, Defold falls back to the legacy pipeline.