Developer of 'Banished' Develops His Own Shading Language
jones_supa writes Luke Hodorowicz, the hard-working developer behind the townbuilding strategy computer game Banished, has
designed a novel GPU shading language and written a compiler for it. The language has been christened 'Shining Rock Shading Language' (SRSL) and it outputs the program in several other shading languages. The first goal for the language was to treat the vertex, fragment and geometry shader as a single program. The language sees the graphics pipeline as a stream of data, followed by some code, which outputs a stream of data, and then more code runs, and another stream of data is output. Body text of the shaders is very C-like and should be understood easily coming from other shading languages. SRSL has all the intrinsic functions you would expect from HLSL or GLSL. All types are HLSL-style. Loops and conditionals are available, but switch statements and global variables are seen redundant and not implemented. Luke's blog post tells more about the details of the language, complemented with examples.
designed a novel GPU shading language and written a compiler for it. The language has been christened 'Shining Rock Shading Language' (SRSL) and it outputs the program in several other shading languages. The first goal for the language was to treat the vertex, fragment and geometry shader as a single program. The language sees the graphics pipeline as a stream of data, followed by some code, which outputs a stream of data, and then more code runs, and another stream of data is output. Body text of the shaders is very C-like and should be understood easily coming from other shading languages. SRSL has all the intrinsic functions you would expect from HLSL or GLSL. All types are HLSL-style. Loops and conditionals are available, but switch statements and global variables are seen redundant and not implemented. Luke's blog post tells more about the details of the language, complemented with examples.
SRSL-E?
The developer wrote in his blog that he wants to add a "Y" to the end but can't think of something for it to stand for.
Why not? (and, some of his reasons are described in his blog entry.)
I think this is newsworthy because this developer single-handedly wrote it, after (nearly) single-handedly writing an entire game. This level of motivation and productivity is something special. I'd rather celebrate it (or at least give it a tip o' the hat), instead of deriding it.
I once scooted through the source code of Return to Castle Wolfenstein, and it also seemed to have some kind of intermediate "mini-language" for shaders. It wasn't a language really, but it allowed artists to execute various effects with different parameters (like "winterfog 22 3.0 3.0 1"), which were then converted to real shaders on the fly. What is also surprising that I would have expected such an old game using fixed functionality instead of shaders.
I'll write my own shading language! With blackjack! And hookers!
"The Greens lynched a hacker in Chicago. Last month, but I think the body's still hanging from the old Water Tower."
For my purposes, I use third-party engines that already can render to OpenGL and Direct3D. It is trivial for me to support both -- unless I have shaders, in which case I have to write my shaders twice. I don't mind doing that for a small number of shaders. I do mind doing that for five dozen shaders.
In the case of SRSL, I think the idea was partly just because he could, and partly because he found himself modifying shaders moderately frequently.