Quick answer: Ctrl+S to save the shader. Build → Clean. Run. Use shader_is_compiled(sh) at first use to detect compile failures.

You edit a fragment shader in the IDE. Run the game; the old behavior persists. Build cache held the previous compiled output.

The Symptom

Shader changes don’t appear at runtime. Editor highlight may show the new code; game uses old.

The Fix

1. Save (Ctrl+S) the shader file.
2. Build menu → Clean.
3. Run.

Clean invalidates the compiled cache. Next build recompiles every shader. New behavior at runtime.

Verify Compile

/// In a one-time check (Game Start)
if (!shader_is_compiled(sh_my_effect)) {
    show_debug_message("Shader compile failed: " + shader_get_name(sh_my_effect));
}

The Output panel shows the GLSL compile error. Fix and re-run.

Hot Reload Note

GameMaker doesn’t hot-reload shaders during a single Run. Stop the game, save, Clean, Run.

Verifying

Trivial test: change ALBEDO to a hardcoded red. After Clean + Run, scene turns red. Confirms shader pipeline picked up the edit.

“Save. Clean. Run. Verify compile.”

Related Issues

For shader uniform array, see uniform array. For surface lost, see surface lost.

Save. Clean. Run. Recompile.