Description
Changelog
Reviews (0)

Shader Stutter Tracker

A Godot 4.6+ add-on to debug and fix shader compilation stutters in the Compatibility rendering pipeline.

Limitations

Debugging tools do not yet capture all possible compilation triggers; the project is under development.

Installation

  • Download the latest release and paste it into your Godot project
  • For debugging tools: Enable the addon in the Project Settings

Usage

Watch the video in the GitHub README to see the plugin in action with the Third Person Shooter Demo.

Shader precompilation

Create an SSTShaderPrecompiler node and assign it a configuration describing the materials, environments and nodes to precompile.

There are two configuration variants:

  1. SSTSceneExtractorPrecompilerConfig accepts a list of scenes and extracts compilation triggers from them and their dependencies. The best option to start with. SSTSceneExtractorPrecompilerConfig example
  2. SSTPrecompilerConfig can be generated by debug tools or filled in manually.

Example scene with precompilation: addons/shader_stutter_tracker/examples/precompiler_screen_example.tscn. You can simply create an inherited scene to get started. Scene example

Limitations

  1. Dynamically changed or created triggers and scenes loaded via load/preload cannot be covered by SSTSceneExtractorPrecompilerConfig. Add these scenes manually.
  2. Not all node types may be covered. Comprehensive analysis of compilation triggers is a complex and difficult task. For instructions on identifying a problematic node, refer to the Debugging section. If you successfully identify a new compilation trigger, please create an issue.

Two trigger sources are checked:

  1. Specific node types: Label3D, SpriteBase3D, Light3D and their subtypes.
  2. Node properties that contain resources like Material, Mesh, Shader, MeshLibrary, MultiMesh, Environment.

Supported node properties since v0.2.0 (inherited properties are hidden):

Property/Function Type
CanvasItem.material CanvasItemMaterial
GeometryInstance3D.material_override BaseMaterial3D
GeometryInstance3D.material_overlay BaseMaterial3D
Camera3D.environment Environment
MeshInstance3D.mesh Mesh
MeshInstance3D.skin Skin
MeshInstance3D.get_surface_override_material(surface) Material
GPUParticles3D.process_material ParticleProcessMaterial
GPUParticles3D.get_draw_pass_mesh(pass) Mesh
CPUParticles3D.mesh Mesh
MultiMeshInstance3D.multimesh MultiMesh
WorldEnvironment.environment Environment
GPUParticles2D.process_material ParticleProcessMaterial
MeshInstance2D.mesh Mesh
MultiMeshInstance2D.multimesh MultiMesh
CSGMesh3D.mesh Mesh
CSGMesh3D.material BaseMaterial3D
CSGSphere3D.material BaseMaterial3D
CSGBox3D.material BaseMaterial3D
CSGCylinder3D.material BaseMaterial3D
CSGTorus3D.material BaseMaterial3D
CSGPolygon3D.material BaseMaterial3D
GridMap.mesh_library MeshLibrary

Debugging

Installation

  1. Enable plugin.
  2. Enable shader_stutter_tracker/shader_watcher/enable (enabled by default in debug mode).
  3. Enable shader_stutter_tracker/shader_watcher/clear_cache_on_run (enabled by default in debug mode).
  4. Play your scene, then open the Shader Stutter Tracker debugger tab.
  5. Report settings: shader_stutter_tracker/report/scan_triggers, take_screenshots, save_scenes.

Monitors

Add new monitors to track counters for compiled GLSL shaders.

Monitors

New debug tab

In the new debug tab you can see all compilation trigger events and known compilation triggers detected by the plugin.

Some shaders are compiled on the second frame after their triggers' appearance:

  • Environment related,
  • Particles.

In that case, see the previous frame for the triggers.

Debug tab

Brute-force analysis

This tool runs the scene and iterates through the nodes, looking for trigger nodes that will be displayed in the debugging tab. Context menu

Settings

All settings are under the shader_stutter_tracker/ prefix in Editor Settings.

Group Setting Default Default.debug Description
base preserve_settings_when_disabled false false Keep settings after disabling the plugin
shader_watcher enable false true Enable the runtime shader cache watcher
shader_watcher clear_cache_on_run false true Clear the shader cache before each run
report scan_triggers false true Collect trigger candidates on stutter
report take_screenshots false true Capture a viewport screenshot per frame
report save_scenes false true Save debug scene with visible nodes
report preserve_last_logs 3 3 Number of log directories to keep in user://shader_stutter_tracker/logs

Acknowledgements

Standing on the shoulders of giants:

License

This project is licensed under the MIT License. See the LICENSE file for details.

Development

Formatter

gdscript-formatter

gdscript-formatter --reorder-code addons/shader_stutter_tracker
gdscript-formatter --reorder-code addons/shader_stutter_tracker_test
gdscript-formatter --reorder-code test

Testing

GUT framework

Changelog for version v0.2.0

2026-09-28 15:53:06

No changelog provided for this version.

Reviews

Shader Stutter Tracker has no reviews yet.

Login to write a review.

Consider supporting the creators!

If you enjoyed this asset consider supporting its creator. Follow the link below.