Skip to content

MasterQ32/cg-workbench

Repository files navigation

CG Workbench

The CG Workbench is a small GLSL coding environment which allows to rapidly prototype some shaders or shader pipelines.

Live Shading Demo: Youtube

Controls / Usage

Input Action
Ctrl+Space, Rightclick on Background Open New Node window
Right-Click on a node Open node editor (save to template, rename node)
Ctrl + Left Mouse + Drag Drag viewport window
Ctrl + R Recompile current window
Ctrl + S Save
Ctrl + Shift + S Save As
Ctrl + N New document
Ctrl + O Open File
Alt + F4 Exit

Examples

Gems

Build Instructions

CG Workbench uses Zig as a build system. Just call zig build to build your project, zig-cache/bin will contain the executable.

Linux

Install the following libraries / packages:

  • sdl2
  • gtk-3.0

Windows

Should work out of the box

External Libraries

This project would be much harder without those great libraries:

Ideas / Missing Nodes

  • Save query when creating new node with existing content
  • Shader Common Node
    • Provide "includes" for all shaders
  • Graphic Nodes
    • Geometry Node
      • Primitives
        • Sphere
        • Cube
  • Player-Modus (lädt jgraph-File und hat ein Haupt-Renderer)
  • Event-Delay Visualisierung
  • Buffer -> Texture
    • 1D Input/Over → 1D Texture with n width
    • 2 * 1D Input/Over → 2D Texture with n * m width
  • Input Node
    • Keyboard
    • Mouse
    • Joystick
  • Lua Node
    • SetUp
    • Update
    • Shutdown
  • Sound Node
    • Seek (?)
  • Timeline Node
    • Attach values to a timeline
    • Time as input
  • Synth-Kram mit T$
  • LUT-Node
    • Maps input→output by indexing a table
  • Audio Nodes
    • Signal Mixer Node
    • Envelope Generator Node