Skip to main content

shader_debugger_core 1.0.0 copy "shader_debugger_core: ^1.0.0" to clipboard
shader_debugger_core: ^1.0.0 copied to clipboard

Pure-Dart core of the Flutter shader debugger: a GLSL type model, symbol table and probe-shader instrumenter for Flutter fragment shaders.

shader_debugger_core #

Pure-Dart core of the Flutter shader debugger. It has no dart:io or Flutter dependency, so it runs both in the DevTools extension (Flutter web) and in a command-line tool.

Status: M1 done. analyzeShader() turns a .frag file into a ShaderAnalysis, and instrument() turns a picked variable into a probe.

Type What it is
analyzeShader() Preprocess, parse and resolve a shader ("The analyzer" in docs/architecture.md). Never throws; problems become diagnostics.
GlslType The GLSL types Flutter shaders use, and how the probe shows each one ("Type → visualization" in docs/architecture.md).
SymbolTable, Scope, GlslSymbol Scopes (global → function → block) and declarations, with GLSL's visibility rules.
StatementInfo What a statement writes, and what is in scope where its value is captured.
ShaderAnalysis Everything the variable picker needs from one .frag file.
instrument(), CaptureRequest, Probe Probe generation ("Probes" in docs/architecture.md).

The instrumenter (instrument()) turns an analysis and a picked variable into a probe shader. lib/protocol.dart holds the names it shares with the runtime package.

The tests include a contract (parsing reproduces the hand-built analyses in test/support/fixtures.dart) and a corpus of real shaders, the Flutter SDK's own among them, with a compiled probe at every statement.

dart test
dart analyze --fatal-infos
0
likes
150
points
28
downloads

Documentation

API reference

Publisher

verified publishermohamed.al-samarrai.com

Weekly Downloads

Pure-Dart core of the Flutter shader debugger: a GLSL type model, symbol table and probe-shader instrumenter for Flutter fragment shaders.

Repository (GitHub)
View/report issues

Topics

#shaders #glsl #debugging #graphics

License

MIT (license)

Dependencies

source_span

More

Packages that depend on shader_debugger_core