7 ms·
I wonder how common GLSL is for demos, though; as far as I know you have to have the actual source text and send that to the driver at runtime for compilation.
by ygra 9y ago
I wonder how common GLSL is for demos, though; as far as I know you have to have the actual source text and send that to the driver at runtime for compilation. In contrast, shaders for DirectX are AOT-compiled, greatly minimising their size. An executable packer might mitigate that for the most part, although it probably depends.
In this particular case they noted that they weren't size-constrained anyway.
- majewsky 9y agoThe article mentioned that the final executable was packed again, so the GLSL source code is also stored compressed.
- hrydgard 9y agoZipped GLSL (if you're using short variable names) is usually smaller than the corresponding DX byte code, so it turns out to actually be an advantage.
- laurentlb 9y agoBoth GLSL and HLSL are very popular, for both 64kB intros and 4kB intros. Even Elevated is storing the actual text in the binary (http://www.pouet.net/prod.php?which=52938 http://www.pouet.net/prod.php?which=52938). Compressed text can be quite small. I wrote a minifier specifically for these use-cases and it has been used in many demoscene productions: https://github.com/laurentlb/Shader_Minifier https://github.com/laurentlb/Shader_Minifier On a 64kB intro like Guberniya, it can save a few kilobytes (but size was not an issue for them) - after compression.