Skip to main content

Module custom_shader_renderer

Module custom_shader_renderer 

Source
Expand description

Custom shader renderer for post-processing effects

Supports Ghostty/Shadertoy-style GLSL shaders with the following uniforms:

  • iTime: Time in seconds (animated or fixed at 0.0)
  • iResolution: Viewport resolution (width, height, 1.0)
  • iChannel0-3: User texture channels (Shadertoy compatible)
  • iChannel4: Terminal content texture
  • iTimeKeyPress: Time when last key was pressed (same timebase as iTime)

Ghostty-compatible cursor uniforms (v1.2.0+):

  • iCurrentCursor: Current cursor position (xy) and size (zw) in pixels
  • iPreviousCursor: Previous cursor position and size
  • iCurrentCursorColor: Current cursor RGBA color (with opacity baked in)
  • iPreviousCursorColor: Previous cursor RGBA color
  • iTimeCursorChange: Time when cursor last moved (same timebase as iTime)

Modules§

pipeline
Pipeline and bind group creation for custom shader renderer.
textures
Channel texture management for custom shaders
transpiler
types

Structs§

CustomShaderRenderer
Custom shader renderer that applies post-processing effects