4 ms·
> If we do this project right, developers could use open-source crates that provide the graphical effects needed to create beautiful experiences. Instead of sha
by bogwog 6y ago
> If we do this project right, developers could use open-source crates that provide the graphical effects needed to create beautiful experiences. Instead of sharing snippets of code on forum posts, they could simply add the right crates.
That’s not a very compelling value proposition. You don’t need to switch languages to use a package manager.
Plus, not all engines have the same data layout, so an “effect crate” would either require your engine to work a very specific way, or would require integration work that would probably defeat the purpose of using a package manager in the first place.
And what does Rust itself add that GLSL/HLSL don’t offer? It can’t be worth the headaches, especially when you consider how a TON of devices still only support OpenGL, which not only requires runtime compilation of shaders (so only GLSL unless your app ships a cross compiler), but different drivers behave differently, requiring ugly hacks for the sack of performance in some cases.
- chungus_khan 6y agoThe project actually says it compiles to SPIR-V (Vulkan's standard intermediate representation), so driver/GPU support really shouldn't be too much of an issue so long as the target is one that supports Vulkan.
- flohofwoe 6y agoSPIRV can also be used as intermediate format and converted to various target shader languages: https://github.com/KhronosGroup/SPIRV-Cross https://github.com/KhronosGroup/SPIRV-Cross
- pcwalton 6y ago> Plus, not all engines have the same data layout, so an “effect crate” would either require your engine to work a very specific way, or would require integration work that would probably defeat the purpose of using a package manager in the first place. You could say the same thing about nodes in shader graph systems, but in practice they work quite well. > It can’t be worth the headaches, especially when you consider how a TON of devices still only support OpenGL, which not only requires runtime compilation of shaders (so only GLSL unless your app ships a cross compiler) You can AOT compile SPIR-V to GLSL with SPIRV-Cross.