4 ms·
> "text is more webby". TBF, having to include a binary shader blob in a small WebGL-style demo (e.g. some interactive math visualization embedded in a blog po
by flohofwoe 6y ago
> "text is more webby".
TBF, having to include a binary shader blob in a small WebGL-style demo (e.g. some interactive math visualization embedded in a blog post) would suck compared to just adding a few lines of text.
It would be possible to load a WASM module with a text-to-SPIRV compiler, but that would most likely be a few megabytes.
IMHO one shouldn't discard those small shadertoy-style demos, this is what made WebGL popular, not the "AAA games on the web" pipe dream.
- atq2119 6y agoIt would be possible to load a WASM module with a text-to-SPIRV compiler, but that would most likely be a few megabytes. My understanding is that this was discussed, and the answer is: glslang is much smaller than this. (Glslang now has a bunch of #ifndef WEB to facilitate precisely this.)
- om2 6y agoI don’t think anyone exhibited a version that got to acceptable binary size and startup/execution time. Might be that it would have been possible with way more effort.
- Jasper_ 6y agoGoing from "a few megabytes I'd rather not include, for a simple use case" to "let's design our own shading language, derail the project for three years, and discover from first principles all the reasons that this is actually a hard problem, while telling everyone else it's actually easy!" is quite the leap. I sympathize with people who believe that page sizes are getting larger and we should do something to prevent it, but the latter is not a worthwhile solution that meets the tradeoffs IMO.
- om2 6y agoGoogle folks who have been primary designers of the new shader language have been deeply involved in SPIR-V; and Apple has made its own shading language, Metal. Apple also produces GPUs that ship in very high volume via A-series SoCs. I’m not sure why you think the people involved in this effort are clueless about shader languages. That does not seem supported by the evidence.