We take a look at Godot Shader Previewer by OldDew, a free plugin that adds real-time variable inspection and visual previews directly inside the Godot shader code editor.
When writing shaders in Godot, understanding intermediate values usually requires workarounds. You might temporarily route a variable to ALBEDO or COLOR, comment and uncomment lines, or manually construct debug outputs just to inspect what a value looks like.
Visual Shader users get node previews. Text-based shader users do not.
Godot Shader Previewer by
OldDew bridges that gap.
Godot Shader Previewer adds a real-time visual debugger to the .gdshader code editor. It allows you to:
- Preview the value of a variable at the current cursor line
- Inspect intermediate results inside the fragment() function
- Mirror uniform values from the selected node in your scene
The result is a workflow similar to node preview systems, but inside the text-based shader editor.
The core feature is cursor-based inspection. Place the cursor on a line that assigns a value inside fragment():
The plugin evaluates that variable at that exact point in execution and displays a visual representation in a dock panel. It supports:
This allows inspection of masks, noise fields, lighting terms, UV transformations, or any intermediate calculation without rewriting the shader output. It also works with multiline assignments.
Live Uniform Synchronization
The plugin detects the selected node in your scene and mirrors its uniform values automatically.
That means:
- Colors match the material currently applied
- Textures are respected
- Numeric uniforms remain consistent with the scene setup
You do not need to manually duplicate parameters in a separate debug environment.
There are some technical constraints:
- Shader compile errors will appear twice in the Output panel because the addon generates additional shader variants.
- Uniform matching relies on name comparison rather than exact shader equivalence, which may lead to false positives if two shaders share identical uniform names.
- Godot does not expose a public API for the Shader Editor, so the plugin accesses it through internal editor structures. Future Godot updates could break this integration.
These limitations are tied to current editor API restrictions.
Godot Shader Previewer is particularly useful for:
- Developers writing custom lighting models
- Procedural shader experimentation
- Debugging masks, UV logic, and blending
- Transitioning from Visual Shader to code-based shaders
- Shader Previewer: A Godot Asset Library plugin that adds a real-time shader preview and variable inspector inside the editor. It lets you see how shader changes affect output live in a custom preview pane, easing iteration and debugging without running the scene.
Differences: This plugin provides a dedicated shader preview panel with live variable inspection, similar to godot-shader-previewer but hosted directly via the Asset Library, making installation and updates simpler.
- Godot Better Shader Preview (GitHub): An open-source plugin that adds a shader preview dock to the Godot editor, giving more space and focus for shader visualization while editing code. Currently in development and intended to be added to the Asset Library.
Differences: Unlike godot-shader-previewer, this tool aims to give a separate preview dock that doesn’t share space with other editor views, which makes it easier to work with large shader files.
✨
Godot Shader Previewer is now available on
GitHub.
📘
Interested in mastering shaders in Godot from the ground up? Check out
The Godot Shaders Bible, a complete step-by-step guide covering mesh composition, lighting and rendering, procedural shapes, vertex animation, and advanced VFX for Godot 4.x.