3 ms·
I'd personally be completely satisfied if they decided to compromise on letting you use either WSL/whatever-shader-language and SPIR-V. I just want to be able
by macawfish 7y ago
I'd personally be completely satisfied if they decided to compromise on letting you use either WSL/whatever-shader-language and SPIR-V. I just want to be able to use SPIR-V because I'm tired of high level shader language lock-in preventing me from:
1. using existing libraries written in other languages
2. using features that the graphics hardware has supported for years simply because the language/API has been abandoned
I agree that it could be convenient to have a readily available human writable shader language, but don't think it should replace SPIR-V. WSL could be that language for all I care. It already compiles to SPIR-V.
- throwaway34241 7y agoYeah that seems like it would be ideal since it would satisfy both use cases. I’m just using OpenGL right now and hoping to port to WebGPU (and the corresponding native libraries) when it comes out. If the performance is adequate maybe I’ll skip porting to Vulkan altogether. So to dynamically load shaders I’d prefer not to have to ship a separate shader compiler on every platform. I also worry that a separate shader compiler implementation (used mostly offline) might not have as good portability/security/performance as something that’s part of a web standard and implemented directly by browser vendors, although that’s not guaranteed I guess. Of course this doesn’t matter to game engines that always compile shaders up front and already support SPIR-V. But a lot of existing WebGL code isn’t like that. The rest of the API doesn’t look too complex, so if there was an easy way to input shaders (of course in addition to SPIR-V) I think it would go a long way to making it a total replacement for existing WebGL code.