Nathan Adams
545193b098
swf: Deduplicate GradientFilter again
2023-02-28 16:25:12 +01:00
Nathan Adams
f79015e201
render: Use swf Filter types where possible. Gradient types had to be split into duplicate classes to allow for different trait impls based on which gradient filter type it is.
2023-02-28 16:25:12 +01:00
Nathan Adams
9224aeca5d
swf: Add DropShadowFilter::hide_object(), it's the only time COMPOSITE_SOURCE is used
2023-02-28 16:25:12 +01:00
Nathan Adams
b8f7c66980
core: map_point in DisplacementMapFilter is i32 not u32
2023-02-28 16:25:12 +01:00
Nathan Adams
3777210117
core: Angle from swf tag is in radians, convert it to degrees
2023-02-28 16:25:12 +01:00
Nathan Adams
acc3180db7
core: Strength in filters is a f32, not u8
2023-02-28 16:25:12 +01:00
Nathan Adams
7da2a061cc
swf: ColorMatrixFilter::matrix is actually f32, not Fixed16
2023-02-28 16:25:12 +01:00
Nathan Adams
fc00ae8eb6
core: Load filters from PlaceObject tag
2023-02-28 16:25:12 +01:00
Nathan Adams
e39fbe871d
render: Add Filter::GradientGlowFilter
2023-02-28 16:25:12 +01:00
Nathan Adams
bb38a7fa55
render: Add Filter::GradientBevelFilter
2023-02-28 16:25:12 +01:00
Nathan Adams
c8030d047d
render: Add Filter::GlowFilter
2023-02-28 16:25:12 +01:00
Nathan Adams
c9656c429e
render: Add Filter::DropShadowFilter
2023-02-28 16:25:12 +01:00
Nathan Adams
dbe2efff00
render: Add Filter::DisplacementMapFilter
2023-02-28 16:25:12 +01:00
Nathan Adams
f9c7303f01
render: Add Filter::ConvolutionFilter
2023-02-28 16:25:12 +01:00
Nathan Adams
9c1f6ea129
render: Add Filter::BevelFilter
2023-02-28 16:25:12 +01:00
Nathan Adams
5ee3a4b512
avm2: Extract out the Value -> Filter logic into a trait
2023-02-28 16:25:12 +01:00
renovate[bot]
71e24eedba
fix(deps): update rust dependencies
2023-02-27 11:48:53 +02:00
relrelb
dc9ec40d31
chore: Allow `clippy::bool_to_int_with_if`
...
Seems like Clippy no longer complains about it.
2023-02-26 13:23:38 +02:00
Nathan Adams
01af1af4d9
webgl: Fixed blown out colortransform in webgl
2023-02-24 19:01:41 +01:00
Nathan Adams
edd7f80341
wgpu: Fix blown out colors when transforming them above 100% - fixes #9698
2023-02-24 19:01:41 +01:00
Aaron Hill
455124d3ba
render: Fix blending onto BitmapData contents
...
When rendering to an offscreen texture for `Bitmapdata.draw`,
we first render to a temporary frame buffer, and then copy the contents
of the frame buffer back to the target texture. However, this results
in blend modes being incorrectly applied - for example, rendering with
BlendMode.SUBTRACT will subtract against the framebuffer (which starts
with each pixel as 0x00000000), instead of the previous BitmapData
contents.
To fix this, we now use our texture target as the frame buffer
when performing `render_offscreen`. This ensure that we blend
over existing pixels (taking into account the `blendMode` provided
in the `BitmapData.draw` call).
When multisampling is enabled, we use a copy pipeline to copy
the existing contents of our texture to a fresh multisampled frame
buffer (the non-multisampled texture target becomes our resolve buffer).
2023-02-23 09:52:56 -06:00
Nathan Adams
6539262db7
render: Add Quality option to RenderBackend::render_offscreen
2023-02-22 17:36:55 +01:00
relrelb
2aaf337b6a
swf: Introduce `BlurFilterFlags`
2023-02-21 16:55:13 +02:00
renovate[bot]
a27bd66b58
fix(deps): update rust dependency patches
2023-02-13 04:59:31 +01:00
Aaron Hill
c597f9f996
core: Fix Clippy lints on nightly
2023-02-13 03:38:54 +01:00
renovate[bot]
fed24aa243
fix(deps): update rust dependencies - wasm-bindgen related
2023-02-13 02:57:52 +01:00
Nathan Adams
0e9b1e4a77
wgpu: Better support for 2x and 8x msaa
2023-02-06 16:08:04 +01:00
Nathan Adams
68761608fc
desktop: Add --quality option
2023-02-06 16:08:04 +01:00
Nathan Adams
1cb3ea7bf9
wgpu: Store quality, not sample_count, and calculate the correct sample count per format
2023-02-06 16:08:04 +01:00
Nathan Adams
b95983b492
wgpu: Hook up set_quality
2023-02-06 16:08:04 +01:00
Nathan Adams
d8e924affc
render: Add RenderBackend::set_quality method, and call it from core
2023-02-06 16:08:04 +01:00
Nathan Adams
b270d1bbd7
render: Move StageQuality from core to render
2023-02-06 16:08:04 +01:00
Nathan Adams
3411a04cef
render: Made render specific Filter enum & structs, as swf ones don't map 1:1 to potential filters
2023-02-05 18:41:43 +01:00
Nathan Adams
b5a250e16f
render: Changed render_offscreen to return an Option instead of an Result
2023-02-05 18:41:43 +01:00
Nathan Adams
e73389aa71
wgpu: Implement blur filter
2023-02-05 18:41:43 +01:00
Nathan Adams
284a58c817
avm2: Implement BitmapData.apply_filter for ColorMatrixFilter
2023-02-05 18:41:43 +01:00
Nathan Adams
72bfd499f8
wgpu: Reuse whole-mesh uniform buffer for gradients
2023-02-05 18:02:19 +01:00
Nathan Adams
013a2424ef
wgpu: Only use uniform buffers for gradients, we don't need storage buffers now that we squeeze the ratios into alignment
2023-02-05 18:02:19 +01:00
Nathan Adams
3bc7d44e9c
wgpu: Reuse the same vertex and index buffer for an entire mesh
2023-02-05 18:02:19 +01:00
Nathan Adams
571a1780e2
wgpu: Provide usage and alignment to BufferBuilder
2023-02-05 18:02:19 +01:00
Nathan Adams
cbc227b0a0
wgpu: Split up mesh creation into a 2 step process so we can reuse the same buffer for each draw
2023-02-05 18:02:19 +01:00
Nathan Adams
a3a7f79f04
render: Switch from log to tracing
2023-02-05 18:02:19 +01:00
Nathan Adams
f9b378b29a
wgpu: Changed most pipelines & shaders to only use Pos, not Pos and Color, as vertex attribs
2023-02-05 18:02:19 +01:00
renovate[bot]
caaf6d5c87
fix(deps): update rust dependencies
2023-01-31 09:39:42 -06:00
Nathan Adams
5dd3060a28
wgpu: Ensure we clear before blending an object onto nothing
2023-01-29 20:45:01 +01:00
Nathan Adams
7b1c101c81
wgpu: Fix repeat & reflect gradients
2023-01-29 17:17:44 +01:00
Aaron Hill
184734267d
tests: Deny unknown fields when deserializing test.toml files
...
This will catch typos and misplaced options when modifying tests.
2023-01-28 16:27:43 -06:00
Nathan Adams
9b43836d1d
tests: Allow executing of with_renderer tests always, but image comparison is still gated
2023-01-28 12:15:59 -07:00
Nathan Adams
7d234956eb
tests: Move tests away from giant macro to individual test.toml files that describe the test
2023-01-27 13:53:43 +01:00
renovate[bot]
8b6eef1715
fix(deps): update rust dependencies
2023-01-24 20:10:40 -06:00