Velan Studios Velan Studios Blog

A Modern Shading Language

Brett Lajzer — December 22, 2016

High-level shading languages (GLSL, HLSL, MetalSL, etc...) are one of the few areas in games and graphics programming that, despite their name, are still very low level and have evaded tighter, more meaningful integration with applications. There have been past attempts to provide richer semantic information, but those are largely couched in the realm of being wrappers over an existing language: e.g. FX and Cg. The biggest issue with this approach is that the semantic information isn't a first-class citizen of the language. These wrappers are just fancy variations on the C preprocessor, which by definition makes them lossy. What we really want is a language that has application-level semantics built into it. Let's start by examining why, especially through the lens of game development.