ruffle-rs / ruffle

A Flash Player emulator written in Rust
https://ruffle.rs
Other
15.39k stars 796 forks source link

DisplayObject filter tracking issue #15

Open Herschel opened 5 years ago

Herschel commented 5 years ago
ivanpopelyshev commented 5 years ago

I have all flash blur-based filters implementation in PixiJS WebGL if you need it ;)

Drop shadow / Blur / Glow / Bevel

I have two versions: "looks like" and "pixel-perfect".

That's pixel-perfect flash blur: https://www.pixiplayground.com/#/edit/4rskiJ8lb8k6437WmSwKy

Not related to filters:

I know that AwayJS have complete avm1 support.

My own port is based on Mozilla Shumway and I'm gonna publish it this autumn. I can explain all the filter mechanics , and how they relate to ColorTransform, I have many tests for it.

Herschel commented 5 years ago

Thank you, the shaders will definitely come in handy as I add filters to the GL backend! I am interested in both pixel-perfect and approximations and allowing the user to choose (for example, in the canvas2d backend, I'd be happy with using standard SVG filter effects).

ivanpopelyshev commented 5 years ago

I dont know parameters for svg blur :( Shumway renderer has it, but its not that close as my webgl approximation.

I know which kernel and strength to use for different values of quality for approximation.

Pixel-perfect version is actually Fenwick tree :)

In Flash, blur filter is just "average premultiplied ARGB in a rectangle" , quality shows number of times applied.

theblooopz commented 3 years ago

Updates?

Herschel commented 3 years ago

No updates yet. Blend modes will probably be implented first as they all rely on "cache as bitmap" behavior.

SelixGithub commented 2 years ago

Is there a timeline for implementation? Are you planning to wait until everything else in AVM1 is complete?

n0samu commented 1 year ago

Similarly to #5538, Pursuit of Hat needs ColorMatrixFilter - the cannons are always shown as red because their colors are supposed to be set via ColorMatrixFilter. This is particularly annoying on levels 15 and 17 because it's impossible to know in advance which button will fire which cannon. image

(Just adding another example, for whatever it's worth)

Aaron1011 commented 1 year ago

@ivanpopelyshev Ruffle is at the point where were implementing more filters. Could you share the source for the pixel-perfect flash filter implementations you mentioned? Thanks!

n0samu commented 1 year ago

The problem with Pursuit of Hat is fixed by #11702 (and other DO/AVM2 ColorMatrixFilter issues will also be fixed)

ivanpopelyshev commented 1 year ago

@Aaron1011 t.meSLASHhackerham , write me in telegram, i'll share details. Cant post the source unfortunately )

Hexstream commented 7 months ago

Banned from Equestria has some remaining filter issues at night. (Multiple scenes, but probably one bug.)

opfx commented 3 weeks ago

It seems that DisplayObject filters are only implemented for the wgpu renderer. Are there any plans to implement them for the webgl render? Thanks