module CrShader::Docs

Overview

The CrShader::Docs module is the authoritative technical reference and documentation guide.

Learning Tracks & Topic Index

The documentation is paced into 4 distinct tracks:

1. Getting started (A_GETTING_STARTED)

Submodule Title Description
A_OVERVIEW CRShader Architecture & Transpiler Pipeline Overview of the CRShader language, AST compilation model, and transparent Godot integration.
B_INSTALLATION Installation & Project Setup Adding CRShader to Godot projects, configuring shards, and building the standalone compiler.
C_QUICK_START Quick Start: Authoring Your First Shader Writing a canvas_item tint shader, assigning it to a Sprite2D, and inspecting live compilation.

2. Language dsl (B_LANGUAGE_DSL)

Submodule Title Description
A_SHADER_TYPES Shader Types & Render Modes Canvas item (2D), spatial (3D), particles, sky, fog, and compute shader types with render modes.
B_UNIFORMS_AND_VARYINGS Uniforms, Varyings & Built-In Variables Declaring typed uniforms with hints, passing data across stages via varyings, and accessing engine built-ins.
C_PIPELINE_STAGES Pipeline Stages: Vertex, Fragment & Light Writing code blocks for stage :vertex, stage :fragment, and stage :light.
D_COMPOSITOR_AND_COMPUTE Compositor Passes & Compute Shaders Authoring screen-space compositor post-processing effects and parallel compute shaders.

3. Editor tooling (C_EDITOR_TOOLING)

Submodule Title Description
A_IN_EDITOR_HIGHLIGHTER ScriptEditor Syntax Highlighting How CRShader hooks into Godot's ScriptEditor to provide real-time syntax coloring for .crshader files.
B_SHADER_STUDIO CRShader Studio Dock Panel Live split-screen editor dock, side-by-side GDShader preview, error diagnostics, and uniform controls.
C_CLI_AND_STUBS CRShader CLI Tool & IDE Stubs Standalone CLI compiler commands, directory watcher, and Crystal IDE completion stub generation.

4. Showcase and benchmarks (D_SHOWCASE_AND_BENCHMARKS)

Submodule Title Description
A_PERFORMANCE_BENCHMARKS Compiler Performance & Throughput Benchmarks Quantitative compiler benchmarks measuring AST parsing, transpilation throughput, and memory overhead.
B_SHADER_VIEWER Interactive Shader Viewer & Sandbox Standalone showcase application featuring 20+ procedural shaders, 3D mesh switcher, and live sandbox.

Defined in:

docs.cr
docs/a_getting_started/a_overview.cr
docs/a_getting_started/b_installation.cr
docs/a_getting_started/c_quick_start.cr
docs/b_language_dsl/a_shader_types.cr
docs/b_language_dsl/b_uniforms_and_varyings.cr
docs/b_language_dsl/c_pipeline_stages.cr
docs/b_language_dsl/d_compositor_and_compute.cr
docs/c_editor_tooling/a_in_editor_highlighter.cr
docs/c_editor_tooling/b_shader_studio.cr
docs/c_editor_tooling/c_cli_and_stubs.cr
docs/d_showcase_and_benchmarks/a_performance_benchmarks.cr
docs/d_showcase_and_benchmarks/b_shader_viewer.cr

Class Method Summary

Class Method Detail

def self.topic_01_quick_start : Nil #

Quick-Start Commands: Essential commands for building, running, and testing.

CrShader Quick Start:

make docs        # Build offline HTML documentation site in docs/
make test        # Execute specifications and test suites
make all         # Build and verify all targets

def self.topic_02_reading_paths : Nil #

Learning Tracks & Reading Paths: Curated reading order from beginner to advanced.

Structured Learning Tracks

1. Getting started (A_GETTING_STARTED)
  • A_GETTING_STARTED::A_OVERVIEW: **CRShader Architecture & Transpiler Pipeline** — Overview of the CRShader language, AST compilation model, and transparent Godot integration.
  • A_GETTING_STARTED::B_INSTALLATION: **Installation & Project Setup** — Adding CRShader to Godot projects, configuring shards, and building the standalone compiler.
  • A_GETTING_STARTED::C_QUICK_START: Quick Start: Authoring Your First Shader — Writing a canvas_item tint shader, assigning it to a Sprite2D, and inspecting live compilation.
2. Language dsl (B_LANGUAGE_DSL)
  • B_LANGUAGE_DSL::A_SHADER_TYPES: **Shader Types & Render Modes** — Canvas item (2D), spatial (3D), particles, sky, fog, and compute shader types with render modes.
  • B_LANGUAGE_DSL::B_UNIFORMS_AND_VARYINGS: **Uniforms, Varyings & Built-In Variables** — Declaring typed uniforms with hints, passing data across stages via varyings, and accessing engine built-ins.
  • B_LANGUAGE_DSL::C_PIPELINE_STAGES: **Pipeline Stages: Vertex, Fragment & Light** — Writing code blocks for stage :vertex, stage :fragment, and stage :light.
  • B_LANGUAGE_DSL::D_COMPOSITOR_AND_COMPUTE: **Compositor Passes & Compute Shaders** — Authoring screen-space compositor post-processing effects and parallel compute shaders.
3. Editor tooling (C_EDITOR_TOOLING)
4. Showcase and benchmarks (D_SHOWCASE_AND_BENCHMARKS)

def self.topic_03_table_of_contents : Nil #

Master Table of Contents: Complete hierarchical topic index.

Complete Documentation Index

A_GETTING_STARTED
  • A_GETTING_STARTED::A_OVERVIEW: **CRShader Architecture & Transpiler Pipeline** — Overview of the CRShader language, AST compilation model, and transparent Godot integration.
  • A_GETTING_STARTED::B_INSTALLATION: **Installation & Project Setup** — Adding CRShader to Godot projects, configuring shards, and building the standalone compiler.
  • A_GETTING_STARTED::C_QUICK_START: Quick Start: Authoring Your First Shader — Writing a canvas_item tint shader, assigning it to a Sprite2D, and inspecting live compilation.
B_LANGUAGE_DSL
  • B_LANGUAGE_DSL::A_SHADER_TYPES: **Shader Types & Render Modes** — Canvas item (2D), spatial (3D), particles, sky, fog, and compute shader types with render modes.
  • B_LANGUAGE_DSL::B_UNIFORMS_AND_VARYINGS: **Uniforms, Varyings & Built-In Variables** — Declaring typed uniforms with hints, passing data across stages via varyings, and accessing engine built-ins.
  • B_LANGUAGE_DSL::C_PIPELINE_STAGES: **Pipeline Stages: Vertex, Fragment & Light** — Writing code blocks for stage :vertex, stage :fragment, and stage :light.
  • B_LANGUAGE_DSL::D_COMPOSITOR_AND_COMPUTE: **Compositor Passes & Compute Shaders** — Authoring screen-space compositor post-processing effects and parallel compute shaders.
C_EDITOR_TOOLING
D_SHOWCASE_AND_BENCHMARKS