Skip to content
Documentation

Shader Editor

A Shader changes rendered appearance. Begin with a preset and one target, such as a Camera effect or a 3D surface, so you can identify where the effect is applied.

Prerequisites

Show Advanced resources and open a Shader. Prepare the target Object, Camera, or Material. Screen effects, Sprite effects, 3D surface effects, and voxel surface effects have different contracts; choose the context intended for your target.

Build and Preview an Effect

  1. Choose an Effect Library preset and inspect its preview.
  2. Use Visual to edit the node graph or Code to edit GLSL. Keep a copy before switching back to Visual after manual code changes: that switch can replace code that no longer matches the graph.
  3. Adjust the offered uniform controls, including resource pickers for textures. Give a custom parameter a stable name and compatible type.
  4. Review compilation diagnostics and inspect the preview after each change.
  5. Save, reopen, and assign the Shader to its intended target.

The preview confirms compilation and an example image. The target’s textures, Scene, lighting, and screen size can produce a different result in the game. Test the actual target before tuning against a preview alone.

Assign and Control the Effect

Camera effects use Set Camera Shader, Add Camera Shader, Remove Camera Shader, and strength controls. Adding effects creates a stack; order matters when one effect samples the output of another.

Sprite presentation uses Set Scene Sprite Shader or Set Object Shader. Set Shader Param and Set Object Shader Param change parameters at their respective scopes. A per-Object parameter change doesn’t rewrite the resource default for every consumer.

For a 3D surface, choose the Shader in the Material’s Custom Shader section. The Material picker accepts compatible surface Shaders. Create voxel surface Shaders in the dedicated voxel surface authoring context.

Expected result: the selected target changes visibly, and changing a known parameter produces a repeatable change. Compare with the effect disabled, then test a fresh Scene and an exported game.

Troubleshooting

If compilation fails, inspect the reported source location and the required inputs for that Shader context. If nothing changes, check assignment, enabled/strength values, and the live target. If a texture is missing, restore the resource reference or select another texture.

If a Camera stack looks wrong, disable effects one at a time and check their order. If export differs, inspect browser/GPU errors and test the simplest preset in the same target. Reduce resolution or effect count when the effect raises frame time beyond your game’s budget.

See Materials, Cameras, and display settings.

Myth Engine Documentation