Electronic Arts have just open sourced an incredibly handy tool for developing and debugging GLSL and HLSL shaders – ShaderToHuman. This is a (development only!) tool that essentially provides 2 features… C PrintF style text output and a minimalistic ImGui-like UI layer. This makes it easy to display debug information and to craft simple tools and widgets in your shaders, while only requiring a few lines of code to use. The entire project is open source under the BSD-3 license.
Highlight features of ShaderToHuman include:
“PrintF” for Shaders
The most requested feature in graphics programming history. S2H allows you to print values directly from the GPU to the screen.
- Variable Inspection: Print
float,int,uint, andvectortypes (float2, float3, etc.) directly into the viewport. - Watch Windows: Create a persistent “watch window” overlay that updates in real-time as your shader executes.
- String Literals: Support for printing text strings (limited in GLSL, but highly flexible in modern HLSL).
Dear ImGui-Style UI Layer
Borrowing the philosophy of Dear ImGui, it allows you to build interactive UI elements inside the shader itself.
- Interactive Widgets: Includes support for buttons, checkboxes, radio buttons, and sliders (float, RGB, and RGBA).
- Progress Bars: Built-in
s2h_progressfunctions to visualize normalized values or loop completions.
2D & 3D Visual Debugging
Sometimes numbers aren’t enough. S2H provides primitive drawing functions to visualize spatial data.
- 2D Shapes: Easily draw lines, arrows, and coordinate systems over your render.
- 3D Gizmos: Includes support for 3D boxes and other gizmos.
- Cursor System: A
pxCursorsystem that lets you manually set where text or UI elements are “pasted” on the screen.
Engine-Agnostic Design
While it comes from EA, it is designed to be highly portable.
- Single-File Integration: The core philosophy is “one file, few lines of code” to get up and running.
- Cross-Language Support: Works with both HLSL and GLSL.
- Permissive Licensing: Released under a license that allows for free use in both personal and commercial projects.
Key Links
ShaderToHuman GitHub Repository
Graphics Programmers Conference 2025 ShaderToHuman Presentation
You can learn more about the ShaderToHuman project and see the Gigi demonstrations in action in the video below. It is incredibly important to note that this library uses features that are appropriate for development/debugging only and that will have detrimental to final performance!
