7 ms·
From what I can see this is comparing shader languages weighing pros and cons. To use an analogy. Think of Vulkan, Metal, DirectX 12 (DX12) as different datab
by Ygg2 4y ago
From what I can see this is comparing shader languages weighing pros and cons.
To use an analogy.
Think of Vulkan, Metal, DirectX 12 (DX12) as different database engines. They run compute/render shaders which are incompatible dialects of each other (like Oracle SQL != Postgres SQL != MySQL). WGPU tries to be the ANSI SQL.
This an oversimplification ofc. Today most shaders compile to an intermediate form Spir-V which then targets different backends and can lead to some funny translation.
> GLSL/HLSL/MSL -> SPIRV -> WGSL -> SPIRV -> GLSL/HLSL/MSL
See https://github.com/gpuweb/gpuweb/issues/566 https://github.com/gpuweb/gpuweb/issues/566