Commit graph

14 commits

Author SHA1 Message Date
Jay Oster 051a523ee6
Update wgpu to 0.13 (#300)
* Intial work towards wgpu 0.13

* Increase MSRV for egui

* Add missing texture formats

* Update fermium

- Replaces beryllium with our own hand-rolled high-level abstraction
  layer for SDL2.

* Update dependencies

Co-authored-by: JMS55 <47158642+JMS55@users.noreply.github.com>
2022-08-17 17:30:04 -07:00
Jay Oster d3dbc8b4f2
Use Fused-Multiply-Add (#246)
This reverts commit 598cf6c1ba.
2021-12-31 15:40:12 -08:00
Jay Oster c1962ae35c
Update dependencies (#230)
* Move to Edition 2021
* Update `wgpu`, `raw-window-handle`, and all dependencies for the examples
* Update MSRV
* Closes #244
2021-12-31 14:57:57 -08:00
Jay Oster 598cf6c1ba
Revert "Use Fused-Multiply-Add (#232)" (#241)
This reverts commit bd2de37b84.
2021-12-07 17:43:30 -08:00
Jay Oster bd2de37b84
Use Fused-Multiply-Add (#232)
- There are a few places in the `simple-invaders` crate that could use
  `f32::mul_add()` as well.
2021-12-04 09:08:29 -08:00
Jay Oster c2454b01ab
Simplify vertex attributes (#228)
- Vertex UVs can be computed from the positions, which saves a small amount of code and a small amount of bandwidth (both inconsequential).
- This is mostly for readability.
- Fixes vertically-flipped pixel buffer in the `custom-shader` example.
2021-11-20 14:06:23 -08:00
JMS55 800dd931b7
Update to wgpu 0.11 (#209)
Co-authored-by: Jay Oster <jay@kodewerx.org>
2021-10-08 11:49:51 -07:00
Jay Oster c4df23f65d
Update to wgpu 0.9 (#179)
* Update to wgpu 0.9

* Fix validation error in WGSL shader

- This moves the hardcoded vertex positions and texture coordinates to
  the vertex buffer.
- Replaces the two-triangle quad to 1 full-screen triangle (fixes #180)
- Rewrites the custom shader example to fix a bug with large surface
  textures;
  - The input texture size was used for the output texture, causing the
    purple rectangle to appear very jumpy on large displays in full screen.
- The `ScalingRenderer` now exposes its clipping rectangle. The custom
  shader example uses this for its own clipping rectangle, but it can
  also be used for interacting with the border in general.

* Switch to `wgpu::include_wgsl!()`

- This is a nice little simplification.
- Thanks to @JMS55 for the suggestion!
2021-06-27 11:09:29 -07:00
Jay Oster 8d77ac2f8b
Rewrite shaders in WGSL (#172)
- Fixes #141
2021-06-05 18:40:33 -07:00
Jay Oster 994cc9a03c Fix typo 2019-10-27 16:36:47 -07:00
Jay Oster 8bebb29a06
Fix screen scaling when window is resized (#25)
* Refactor window creation and size handling

* Require pixel aspect ratio to be > 0

* Fix screen scaling when window is resized

- Ensure the screen retains its correct pixel aspect ratio
- Updated public API on `RenderPass` ... this will continue to be unstable until the initial release
- Add build instructions for the internal shaders
2019-10-27 16:35:22 -07:00
Jay Oster 383b0d83ff
Replace vk-shader-macros with pre-compiled GLSL. Fixes #9 (#10) 2019-10-13 21:43:30 -07:00
Jay Oster d0391be62a Initial pass with texture rendering
- The example app generates a scaled version of pixel Ferris as a test.
- TODO:
  - Pixel aspect ratio is still unsupported
  - The `RenderPass` trait is incomplete
2019-10-02 20:22:20 -07:00
Jay Oster cc4976079b Initial commit.
- Just a copy of the wgpu `hello-triangle` example for now... more to come!
2019-09-25 23:07:30 -07:00