67: Update to latest wgpu-native commit r=kvark a=rukai
closes https://github.com/gfx-rs/wgpu-rs/issues/66
Make sure my documentation for sample_mask and alpha_to_coverage_enabled is correct, I am not familiar with these fields.
Co-authored-by: Rukai <rubickent@gmail.com>
61: Cleanup examples by using wgpu::read_spirv instead of manually creating a Vec<u32> r=kvark a=rukai
Wait for me to update the git reference once https://github.com/gfx-rs/wgpu/pull/280 is merged.
Co-authored-by: Rukai <rubickent@gmail.com>
58: Update to latest wgpu native r=kvark a=rukai
This PR is waiting on https://github.com/gfx-rs/wgpu/pull/276 but also allows us to test 276
Co-authored-by: Rukai <rubickent@gmail.com>
48: Exposing `set_viewport_rect()` on `RenderPass`. r=kvark a=seivan
Noticed that while viewport work with floats, scissors only work with unsigned integers.
Not sure if relevant but [`width & height`](https://www.khronos.org/registry/OpenGL-Refpages/es2.0/xhtml/glViewport.xml) might not be able to be negative.
Co-authored-by: Seivan Heidari <seivan.heidari@icloud.com>
38: Add an example showing how to capture a render r=kvark a=paulkernfeld
I had wanted to use wgpu-rs to generate `.png` images rather than displaying to the screen, so I coded up this prototype as an example to others who might want to do something similar.
Possible changes:
- Create an actual `.png` or other image
- Convert this into a unit test
I'm happy to make other modifications to this as well.
Co-authored-by: Paul Kernfeld <paulkernfeld@gmail.com>
40: Update running an example documentation r=kvark a=Napokue
- Removed link to gfx getting started
- Created our own getting started (with examples)
- Updated syntax
Motivation: I always forget how to run the examples, gfx getting started is not the same as the wgpu-rs one. So I found the correct usage of the syntax to run examples. I am noticing in the Gitter channel that many people are struggling with running the examples, maybe this will clear it up a little.
This is the beginning, I will continue to expand the documentation in the future.
Co-authored-by: Timo de Kort <dekort.timo@gmail.com>
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>
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.
25: Add MSAA example r=kvark a=rukai
This example is the same as the triangle example except:
* The render pipeline is created with a sample_count of 4
* A new texture with a sample_count of 4 is created and set as the color_attachment instead of the swapchain
* The swapchain is now specified as a resolve_target
It doesn't work yet as wgpu-native doesn't handle MSAA yet.
Co-authored-by: Rukai <rubickent@gmail.com>