module CrShader::Docs::D_SHOWCASE_AND_BENCHMARKS::B_SHADER_VIEWER

Overview

Interactive Shader Viewer & Sandbox

CRShader bundles two standalone interactive applications: the Shader Viewer (a gallery inspecting 20+ shaders on various 3D primitives and screen quads) and the Live Shader Sandbox (a split-screen live coding environment).

Executive Summary & Key Topics

Topic Method / Anchor Description
Shader Viewer Showcase .topic_01_shader_viewer Exploring the bundled gallery of 20+ procedural shaders across 3D meshes and post-processing.
Split-Screen Live Shader Sandbox .topic_02_live_sandbox Live in-game shader authoring environment with real-time viewport feedback.

Related Guides & Source References

Defined in:

docs/d_showcase_and_benchmarks/b_shader_viewer.cr

Class Method Summary

Class Method Detail

def self.topic_01_shader_viewer : Nil #

Shader Viewer Showcase: Exploring the bundled gallery of 20+ procedural shaders across 3D meshes and post-processing.

The Shader Viewer demonstrates real-world CRShader applications across a rich variety of techniques:

  • Water & Fluid Simulation: Dynamic foam lines, refraction, and vertex wave displacement.
  • Stylized & Retro: PSX affine texture warping, vertex snapping, dithering, and CRT phosphor scanlines.
  • Painterly Post-Processing: Kuwahara edge-preserving blur and oil-painting effects.
  • Procedural Volumetrics: Raymarched clouds, fire particles, and plasma spheres.

Launch the viewer with:

make viewer

def self.topic_02_live_sandbox : Nil #

Split-Screen Live Shader Sandbox: Live in-game shader authoring environment with real-time viewport feedback.

The Shader Sandbox provides an in-game live coding environment:

  • Left pane contains an embedded text editor with live syntax coloring.
  • Right viewport renders the active scene in real time (2D canvas, 3D mesh, or screen quad).
  • Bottom bar provides quick presets to load sample shaders or switch 3D meshes (Cube, Sphere, Cylinder, Torus, Prism, Plane).
  • Parameter sliders allow live uniform adjustments with immediate GPU visual updates.

Launch the sandbox with:

make sandbox