mirror of
https://github.com/storytold/wgpu.git
synced 2026-11-19 22:11:01 +01:00
00f7dfa9e861e7875c787b45c6acfbb0d797ff3f
32: Add conversion matrix from OpenGL to wgpu r=kvark a=dragly The matrices in the examples are given in an OpenGL-like coordinate system, while a Vulkan-like coordinate system is used by wgpu. This was previously partially corrected in the shader and by flipping the up axis of the camera, but left the x-axis mirrored in the final result. This change adds a conversion matrix to framework.rs that can be used to convert from OpenGL to wgpu. This also allows us to set the winding-order to counter-clockwise, which matches the ordering in the data. Co-authored-by: Svenn-Arne Dragly <dragly@cognite.com> Co-authored-by: Dzmitry Malyshau <dmalyshau@mozilla.com>
Languages
Rust
78.5%
WGSL
13%
GLSL
3.1%
Metal
2.8%
HLSL
2.3%
Other
0.2%