I started experimenting with WebGPU. My hope is that I'll be able to replace Sigma.js with a custom renderer tailored specifically to Helveg's purposes. However, right now, all I have is a few triangles and cubes.
In any case, I thought it could be helpful to have a place for some of my WebGPU findings... in case I need to find them again:
NDC
API | X range | Y range | Z range | Y Direction Origin | Handedness | Bottom-left corner | Source |
---|---|---|---|---|---|---|---|
WebGL | [-1, 1] | [-1, 1] | [-1, 1] | UP | Left-handed | [-1,-1,-1] | mdn-mvp |
OpenGL | [-1, 1] | [-1, 1] | [-1, 1] | UP | Left-handed | [-1,-1,-1] | learnopengl |
WebGPU | [-1, 1] | [-1, 1] | [0, 1] | UP | Left-handed | [-1, -1, z]^1 | ndc-spec |
Vulkan | [-1, 1] | [-1, 1] | [0, 1] | DOWN | Right-handed | [-1, 1, 0]^2 | vulkan-spec |
Math
glm
for OpenGL: wgpu-matrix.