godot-convert-shaders

Convert Godot 3.x shader code to Godot 4.x syntax.

3|1|Updated Feb 2, 2026
One-click install
npx skills add https://github.com/Asreonn/godot-superpowers --skill godot-convert-shaders
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: godot-convert-shaders
Source: https://github.com/Asreonn/godot-superpowers/tree/main/mini-skills/godot-convert-shaders
Command: npx skills add https://github.com/Asreonn/godot-superpowers --skill godot-convert-shaders

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Converts Godot 3.x shaders to Godot 4.x shader syntax, handling uniform declarations, texture sampling updates, and built-in varyings upgrades to preserve visuals during migration.

Core Features & Use Cases

  • Converts SCREEN_TEXTURE and DEPTH_TEXTURE usage to explicit uniforms (screen_texture and depth_texture) with appropriate hints.
  • Rewrites texture(...) calls to textureLod() for screen/depth textures and updates built-in varyings to Godot 4.x-compatible forms.
  • Supports light-function variable name changes and optional renaming of shader extensions for Godot 4.x projects in upgrades ranging from small edits to large-scale migrations.

Quick Start

Run the converter on a Godot 3.x project. It scans shader files, injects uniforms, rewrites texture calls, and renames files with .gdshader extensions; verify results in Godot 4.x after migration.

Frequently Asked Questions about godot-convert-shaders

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I convert Godot 3 shaders to Godot 4?

Godot 4 shader migration requires updating SCREEN_TEXTURE and DEPTH_TEXTURE to explicit uniforms, rewriting texture() calls to textureLod(), updating built-in varyings, and renaming .shader files to .gdshader extensions.

What do I need to change when upgrading Godot 3.x shader code to 4.x?

Upgrading Godot 3.x shader code to 4.x requires updating uniform declarations, mapping light-function variable names, converting texture sampling to textureLod for screen and depth textures, and updating built-in varyings to Godot 4.x-compatible forms.

Why does SCREEN_TEXTURE not work in Godot 4 shaders?

SCREEN_TEXTURE does not work in Godot 4 shaders because it must be replaced with an explicit uniform, such as screen_texture, with appropriate hints, and sampled using textureLod() instead of the standard texture() function.

Can I automatically rename .shader files to .gdshader during Godot 4 migration?

Yes, you can automatically rename .shader files to .gdshader extensions during Godot 4 migration, which also updates built-in varyings and light-function variables to preserve visual effects across small edits and large-scale migrations.

Does Godot 4 shader conversion support light function variable name changes?

Yes, Godot 4 shader conversion supports light-function variable name changes, alongside updating built-in varyings, injecting explicit screen and depth texture uniforms, and rewriting texture sampling calls for full visual preservation.