crshader
Version, currently 0.1.4127 versions
- 0.1.53latestNov 6, 2026
- 0.1.52not indexedNov 6, 2026
- 0.1.51not indexedNov 6, 2026
- 0.1.48not indexedNov 6, 2026
- 0.1.47Oct 29, 2026
- 0.1.46Oct 14, 2026
- 0.1.45not indexedOct 14, 2026
- 0.1.44Oct 13, 2026
- 0.1.43not indexedOct 13, 2026
- 0.1.42not indexedOct 13, 2026
- 0.1.41not indexedOct 13, 2026
- 0.1.19Sep 27, 2026
- 0.1.18not indexedSep 28, 2026
- 0.1.17not indexedSep 28, 2026
- 0.1.16not indexedSep 28, 2026
- 0.1.15not indexedSep 28, 2026
- 0.1.14not indexedSep 28, 2026
- 0.1.13not indexedSep 28, 2026
- 0.1.12not indexedSep 28, 2026
- 0.1.11not indexedSep 28, 2026
- 0.1.10not indexedSep 28, 2026
- 0.1.8not indexedSep 28, 2026
- 0.1.7not indexedSep 28, 2026
- 0.1.6not indexedSep 28, 2026
- 0.1.5not indexedSep 28, 2026
- 0.1.4not indexedSep 28, 2026
- 0.1.0not indexedSep 28, 2026
github.com/sol-vin/crshader
No description declared in shard.yml.
Nothing has been indexed for 0.1.41 yet. The tag is recorded, its shard.yml has not been read, so the manifest and dependency list below are empty because they are unknown rather than because they are absent.
Installation
# Add this to your shard.yml
dependencies:
crshader:
github: sol-vin/crshader
version: ~> 0.1.41Then run:
shards installshard.yml
No shard.yml has been indexed for 0.1.41. You can read it on the repository.
Dependencies
Unknown: the shard.yml for this version has not been read yet.
README
This README is the one indexed from the repository at its latest ref, not from the tag for this version.
CRShader
CRShader is a high-performance shader trans-compiler and live runtime development toolchain for Godot Engine 4.8+, powered by Crystal and Lapis. It introduces a declarative, type-safe Crystal shader DSL that transpiles down to optimized Godot GDShader (4.x) and GLSL compute kernels with native machine speed (~1.1ms transpilation, >100,000 LOC/s).
Architecture
CRShader bridges compile-time Crystal syntax with Godot's runtime rendering pipeline:
graph TD
subgraph CRShader Toolchain Pipeline
SRC[".crshader Source File"] --> LEX[Lexer & AST Parser]
LEX --> AST[Typed Shader AST]
AST --> GEN_GD[GDShader 4.x Transpiler Backend]
AST --> GEN_GLSL[GLSL Compute Transpiler Backend]
GEN_GD --> GD_OUT[Target .gdshader]
GEN_GLSL --> GLSL_OUT[Target .glsl]
end
subgraph Godot Engine Integration
RFL[ResourceFormatLoaderCRShader] -->|Transparent In-Memory Load| RES[Godot Shader Resource]
RES --> MAT[ShaderMaterial]
MAT --> GPU[Godot Vulkan / D3D12 / Metal Pipeline]
PLUG[CRShaderPlugin] --> HIGHLIGHT[ScriptEditor Syntax Highlighter Hook]
PLUG --> STUDIO[CRShader Studio Dock Panel]
end
SRC -->|Direct Engine Import| RFL
- Transparent In-Memory Loading:
ResourceFormatLoaderCRShaderregisters with Godot'sResourceLoader, allowing.crshaderfiles to be assigned directly toShaderMaterialwithout requiring intermediate files on disk. - In-Editor Syntax Highlighting: Hooks into Godot's
ScriptEditorto dynamically provide full Crystal/Shader keyword and type highlighting for.crshaderfiles. - CRShader Studio: Embedded split-screen dock providing side-by-side live source editing and transpiled
.gdshader/.glsloutput preview.
Features
- Crystal Shader DSL: Author shaders using expressive Crystal constructs (
shader_type :canvas_item,render_mode :unshaded,uniform,varying,stage :fragment). - High-Speed Transpiler: Compiles complex spatial and post-processing shaders in ~1.1ms at >100,000 lines of code per second.
- Transparent Godot Integration: Full GDExtension plugin loaded via
crystal_bridge.dll/.sowithout requiring end-users to have Crystal installed. - Mirrored Godot Documentation: Complete offline API documentation generated under
CRShader::Languagecapturing every Godot 4 built-in function, stage variable, and preprocessor macro. - Interactive Shader Viewer: Bundled standalone showcase viewer allowing real-time inspection, shader parameter tweaking, and hot-reloading across a rich gallery of 20+ shaders.
Performance Benchmarks
CRShader includes a quantitative compiler benchmark measuring lexical parsing, AST construction, and transpilation throughput:
Run benchmarks locally:
make benchmark
# or directly via Lapis CLI:
lapis benchmarks run html
View the latest automated Interactive Benchmark Report deployed live on GitHub Pages.
DSL Comparison
Quickstart
1. Installation
Add crshader as a dependency in your shard.yml:
dependencies:
crshader:
github: sol-vin/crshader
branch: master
Run shards install.
2. Command Line Tool (crshader)
Build the standalone CLI compiler:
make
crystal build src/cli.cr -o bin/crshader
3. Godot Editor Integration
- Launch Godot Editor:
make editor - Enable the plugin in Project Settings -> Plugins -> CRShader.
- Create or drag any
.crshaderfile into theres://directory. - Open the CRShader Studio bottom panel to inspect, recompile, and preview transpiled output in real time.
Standalone Shader Applications
1. Interactive Shader Viewer
CRShader provides an interactive standalone viewer showcasing 20+ procedural shaders (animated water, CRT scanlines, Kuwahara filter, PSX retro, fire particles, tonemapping, compute kernels) across multiple 3D polygon meshes (Cube, Sphere, Cylinder, Torus, Prism, Plane), screen-space quad post-processing, camera compositor passes, and dynamic uniform tweaking:
make viewer
Packaged standalone viewer executables are available on the Releases page under viewer-windows.zip and viewer-linux.zip.
2. Live Shader Sandbox
CRShader includes a split-screen live coding environment allowing side-by-side editing in Crystal DSL with real-time viewport preview:
- Rich syntax highlighting for keywords, built-ins, and types.
- Reference sample gallery: open, edit, and experiment with any of our 20+ bundled
.crshadershaders. - 2D, 3D (with mesh selection), screen-space quad, and compute modes.
- Background pattern/color switcher and texture input slots (
uniform sampler2D). - Real-time uniform parameter tweaking.
make sandbox
Packaged standalone sandbox executables are available on the Releases page under sandbox-windows.zip and sandbox-linux.zip.
Development & Testing
License
MIT License. Copyright (c) Ian Rash and Sol-Vin contributors.
Documentation
Built from the current release. The first visit to a release nobody has asked for starts its build.
Links
This release
- Version
0.1.41- Tagged
- Oct 13, 2026
- Commit
9654a2bd56ad- Indexed
- not yet
Dependents
No indexed shard depends on this one yet.
Repository
github.com/sol-vin/crshader
Metadata
- Created
- Sep 28, 2026
- Updated
- Nov 8, 2026
- Synced
- Nov 8, 2026
- Versions
- 27