Adrian Wielgosik
9394f7788c
wgpu: Don't use textures for shader cache keys
2024-07-06 22:44:34 +02:00
Kamil Jarosz
d86d69f791
render: Implement drawing lines using canvas
...
This patch provides an efficient implementation of draw_line
and draw_line_rect for canvas using strokes.
2024-07-02 23:40:50 +02:00
Kamil Jarosz
2ba5e47b59
render: Implement drawing lines using WebGL
...
This patch provides an efficient implementation of draw_line
and draw_line_rect for WebGL using Gl::LINE_STRIP.
2024-07-02 23:40:50 +02:00
Kamil Jarosz
9ba6569a2e
render: Implement drawing lines using wgpu
...
This patch provides an efficient implementation of draw_line
and draw_line_rect for wgpu using PrimitiveTopology::LineStrip.
2024-07-02 23:40:50 +02:00
Kamil Jarosz
7dd4d2006e
render: Add primitives for drawing lines
...
This patch adds draw_line and draw_line_rect methods to CommandHandler,
providing empty impls to be overridden by corresponding backends.
The ability to draw lines is described using a new bitflags struct
RenderBackendFeatures, which contains a set of features
supported by the given render backend.
Currently, it contains a DRAW_LINES flag, which informs whether
the backend supports drawing lines as primitives.
2024-07-02 23:40:50 +02:00
Kamil Jarosz
cff1b14409
render: Emulate drawing lines using quads
2024-07-02 23:40:50 +02:00
Kamil Jarosz
23931ed863
render: Refactor chunk_blends to use CommandHandler
...
This refactor simplifies code, gets rid of the large number of
parameters, and allows calling other rendering methods from themselves.
The latter is useful for emulating lines on Dx12.
2024-07-02 23:40:50 +02:00
Kamil Jarosz
23f01e0dd9
render: Add Matrix::create_box_with_rotation
...
This patch splits the current method of create_box into
1. create_box -- without rotation, and
2. create_box_with_rotation -- with rotation.
The reason for that refactor is that create_box was often used without
rotation, and always passing 0.0 as rotation and having
a dedicated condition for 0.0 was superfluous.
2024-07-02 23:40:50 +02:00
Kamil Jarosz
78b2d84fa7
swf: Add ColorTransform::multiply_from
...
This method is used to instantiate ColorTransform with its
multiplicative component equal to the given color.
2024-07-02 23:40:50 +02:00
Kamil Jarosz
28b86490cc
render: Draw quads using Gl::TRIANGLE_FAN for WebGL
...
This patch changes the mode of drawing quads to Gl::TRIANGLE_FAN.
This makes the buffers smaller, as we need only 4 vertices instead of 6,
and allows them to be reused for rendering lines.
2024-07-02 23:40:50 +02:00
Kamil Jarosz
07df84a486
render: Add WebGlRenderBackend::draw_quad
...
Moving draw_rect to draw_quad prevents code duplication when
methods related to drawing lines are added.
2024-07-02 23:40:50 +02:00
Kamil Jarosz
83ed478beb
wgpu: Do not use 'packed' as variable name in WGSL shaders
...
Turns out that 'packed' is a keyword in some GLSL shaders,
and naga currently preserves it, producing a syntax error.
As a workaround, this patch renames the variable to something else.
2024-06-23 09:51:04 +02:00
Nathan Adams
7eef31046b
render: Make serde optional
2024-06-13 00:22:33 +02:00
Nathan Adams
aa804e520b
web: Store StageQuality in builder, do the defaulting in JS
2024-06-08 08:42:04 +02:00
TÖRÖK Attila
4eb1bb358a
chore: Bump h263-rs git reference
2024-05-21 18:38:29 +02:00
TÖRÖK Attila
9522acf61d
render/wgpu: Switch to pipeline-overridable constant for bitmap saturation order toggle
...
Also call it `late_saturate` instead, to avoid the confusing negation
between the constant name and the (now removed) shader module name.
2024-05-17 22:13:13 +02:00
dependabot[bot]
5fbf39fd7a
build(deps): bump the cargo-minor group across 1 directory with 7 updates
...
Bumps the cargo-minor group with 7 updates in the / directory:
| Package | From | To |
| --- | --- | --- |
| [async-channel](https://github.com/smol-rs/async-channel ) | `2.3.0` | `2.3.1` |
| [serde](https://github.com/serde-rs/serde ) | `1.0.201` | `1.0.202` |
| [either](https://github.com/rayon-rs/either ) | `1.11.0` | `1.12.0` |
| [syn](https://github.com/dtolnay/syn ) | `2.0.63` | `2.0.64` |
| [toml_edit](https://github.com/toml-rs/toml ) | `0.22.12` | `0.22.13` |
| [insta](https://github.com/mitsuhiko/insta ) | `1.38.0` | `1.39.0` |
| [toml](https://github.com/toml-rs/toml ) | `0.8.12` | `0.8.13` |
Updates `async-channel` from 2.3.0 to 2.3.1
- [Release notes](https://github.com/smol-rs/async-channel/releases )
- [Changelog](https://github.com/smol-rs/async-channel/blob/master/CHANGELOG.md )
- [Commits](https://github.com/smol-rs/async-channel/compare/v2.3.0...v2.3.1 )
Updates `serde` from 1.0.201 to 1.0.202
- [Release notes](https://github.com/serde-rs/serde/releases )
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.201...v1.0.202 )
Updates `either` from 1.11.0 to 1.12.0
- [Commits](https://github.com/rayon-rs/either/compare/1.11.0...1.12.0 )
Updates `syn` from 2.0.63 to 2.0.64
- [Release notes](https://github.com/dtolnay/syn/releases )
- [Commits](https://github.com/dtolnay/syn/compare/2.0.63...2.0.64 )
Updates `toml_edit` from 0.22.12 to 0.22.13
- [Commits](https://github.com/toml-rs/toml/compare/v0.22.12...v0.22.13 )
Updates `insta` from 1.38.0 to 1.39.0
- [Release notes](https://github.com/mitsuhiko/insta/releases )
- [Changelog](https://github.com/mitsuhiko/insta/blob/master/CHANGELOG.md )
- [Commits](https://github.com/mitsuhiko/insta/compare/1.38.0...1.39.0 )
Updates `toml` from 0.8.12 to 0.8.13
- [Commits](https://github.com/toml-rs/toml/compare/toml-v0.8.12...toml-v0.8.13 )
---
updated-dependencies:
- dependency-name: async-channel
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo-minor
- dependency-name: serde
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo-minor
- dependency-name: either
dependency-type: direct:production
update-type: version-update:semver-minor
dependency-group: cargo-minor
- dependency-name: syn
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo-minor
- dependency-name: toml_edit
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo-minor
- dependency-name: insta
dependency-type: direct:production
update-type: version-update:semver-minor
dependency-group: cargo-minor
- dependency-name: toml
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2024-05-17 01:41:44 +02:00
TÖRÖK Attila
331d1789da
render,core,desktop: Port to `wgpu` `v0.20.0`, switch to `egui` `master`
2024-05-17 01:19:01 +03:00
TÖRÖK Attila
f9f4c3bb82
render/wgpu: Drop `naga_oil` in favor of manual string manipulation
2024-05-16 20:24:49 +02:00
sleepycatcoding
be8cbd64d6
core/render/web: Make FromStr exclusively for snake_case
2024-05-16 01:14:42 +03:00
Kamil Jarosz
b99bdadb8f
render: Improve performance of round_to_i32
...
This patch improves performance of matrix::round_to_i32()
by using f32::round_ties_even(), which has been stable
since 1.77.0, instead of a custom algorithm.
2024-05-08 22:16:40 +02:00
Kamil Jarosz
6ad4bc4999
render: Add tests for round_to_i32
2024-05-08 22:16:40 +02:00
TÖRÖK Attila
3ca7cc821e
nit: Silence nightly `dead_code` lint
2024-04-20 17:39:54 +02:00
dependabot[bot]
ae10b76431
build(deps): bump the cargo-minor group with 6 updates
...
Bumps the cargo-minor group with 6 updates:
| Package | From | To |
| --- | --- | --- |
| [image](https://github.com/image-rs/image ) | `0.25.0` | `0.25.1` |
| [downcast-rs](https://github.com/marcianx/downcast-rs ) | `1.2.0` | `1.2.1` |
| [regress](https://github.com/ridiculousfish/regress ) | `0.9.0` | `0.9.1` |
| [syn](https://github.com/dtolnay/syn ) | `2.0.55` | `2.0.58` |
| [webbrowser](https://github.com/amodm/webbrowser-rs ) | `0.8.13` | `0.8.14` |
| [getrandom](https://github.com/rust-random/getrandom ) | `0.2.12` | `0.2.14` |
Updates `image` from 0.25.0 to 0.25.1
- [Changelog](https://github.com/image-rs/image/blob/main/CHANGES.md )
- [Commits](https://github.com/image-rs/image/compare/v0.25.0...v0.25.1 )
Updates `downcast-rs` from 1.2.0 to 1.2.1
- [Changelog](https://github.com/marcianx/downcast-rs/blob/master/CHANGELOG.md )
- [Commits](https://github.com/marcianx/downcast-rs/compare/v1.2.0...v1.2.1 )
Updates `regress` from 0.9.0 to 0.9.1
- [Release notes](https://github.com/ridiculousfish/regress/releases )
- [Commits](https://github.com/ridiculousfish/regress/compare/v0.9.0...v0.9.1 )
Updates `syn` from 2.0.55 to 2.0.58
- [Release notes](https://github.com/dtolnay/syn/releases )
- [Commits](https://github.com/dtolnay/syn/compare/2.0.55...2.0.58 )
Updates `webbrowser` from 0.8.13 to 0.8.14
- [Release notes](https://github.com/amodm/webbrowser-rs/releases )
- [Changelog](https://github.com/amodm/webbrowser-rs/blob/main/CHANGELOG.md )
- [Commits](https://github.com/amodm/webbrowser-rs/compare/v0.8.13...v0.8.14 )
Updates `getrandom` from 0.2.12 to 0.2.14
- [Changelog](https://github.com/rust-random/getrandom/blob/master/CHANGELOG.md )
- [Commits](https://github.com/rust-random/getrandom/compare/v0.2.12...v0.2.14 )
---
updated-dependencies:
- dependency-name: image
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo-minor
- dependency-name: downcast-rs
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo-minor
- dependency-name: regress
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo-minor
- dependency-name: syn
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo-minor
- dependency-name: webbrowser
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo-minor
- dependency-name: getrandom
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2024-04-08 23:44:16 +02:00
Nathan Adams
bb5ec64670
chore: Use workspace version for wasm-bindgen
2024-04-04 17:29:00 +02:00
Nathan Adams
45a2ab69c0
chore: Use workspace version for thiserror
2024-04-04 17:29:00 +02:00
Nathan Adams
9d665ce448
chore: Use workspace version for serde
2024-04-04 17:29:00 +02:00
Nathan Adams
80758cbaeb
chore: Use workspace version for num-traits
2024-04-04 17:29:00 +02:00
Nathan Adams
a7404e7506
chore: Use workspace version for num-derive
2024-04-04 17:29:00 +02:00
Nathan Adams
2b2be8a992
chore: Use workspace version for log
2024-04-04 17:29:00 +02:00
Nathan Adams
ab8b1c654c
chore: Use workspace version for js-sys
2024-04-04 17:29:00 +02:00
Nathan Adams
d8fec1cabc
chore: Use workspace version for image
2024-04-04 17:29:00 +02:00
Nathan Adams
2036d85a95
chore: Use workspace version for futures
2024-04-04 17:29:00 +02:00
Nathan Adams
2bd1ef47b7
chore: Use workspace version for flate2
2024-04-04 17:29:00 +02:00
Nathan Adams
c3711e3953
chore: Use workspace version for enum-map
2024-04-04 17:29:00 +02:00
Nathan Adams
6cca9bb3b7
chore: Use workspace version for clap
2024-04-04 17:29:00 +02:00
Nathan Adams
937664e737
chore: Use workspace version for bytemuck
2024-04-04 17:29:00 +02:00
Nathan Adams
4e3cd75c30
chore: Use workspace version for bitflags
2024-04-04 17:29:00 +02:00
Nathan Adams
8e4127aef6
chore: Use workspace version for anyhow
2024-04-04 17:29:00 +02:00
TÖRÖK Attila
36413a70f2
chore: Remove or ignore any unused deps detected by cargo-machete
2024-04-01 22:29:38 +02:00
TÖRÖK Attila
1396d8de5b
chore: Update `insta` to `v1.38.0`
2024-03-29 14:46:25 +01:00
renovate[bot]
9dfc6dc224
fix(deps): update rust dependencies
2024-03-26 13:56:59 +01:00
sleepycatcoding
1b41abf3a3
chore: Remove unused dependencies
2024-03-25 17:45:26 +01:00
renovate[bot]
98cbe9cf31
fix(deps): update rust dependencies
2024-03-25 02:47:32 +01:00
Nathan Adams
e9afce3103
wgpu: Actually, we *do* support opengl on windows now!
2024-03-24 21:04:09 +01:00
Adrian Wielgosik
08157a056e
build: Fix redundant import warnings
2024-03-23 19:23:18 +01:00
renovate[bot]
d70560cb82
fix(deps): update rust dependencies
2024-03-22 11:10:59 +01:00
TÖRÖK Attila
c941955c22
chore: Bump `h263-rs` git refs
2024-03-22 10:51:11 +01:00
TÖRÖK Attila
d9f17dac44
chore: Bump `image` to `v0.25`, without the `dxt` feature
2024-03-19 00:14:48 +01:00
TÖRÖK Attila
7a269c054d
fix(deps): update rust dependencies
2024-03-18 12:21:47 +01:00