-
-
Notifications
You must be signed in to change notification settings - Fork 828
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
wgpu: Implement blend modes #8262
Conversation
adc295b
to
10d46b4
Compare
This seems to completely fix #4464, making The Queen of Snakes fully playable. EDIT: Not completely fixed. Some rooms are still black. But a great improvement. |
Updated with (I believe) fully functional blend modes, and with latest code from master. It looks like everything works, but the performance is bad so I'm keeping this a draft for now. |
Hm, one of the later updates seems to have caused #4464 to regress. The triangles everywhere are back, but completely black rather than the previously blue stretched eye graphic. When I tested this four days ago, they were properly invisible. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks so much for your effort on this! It'll be very exciting to get this in.
Here are some quickie fixes for the additive modes that I saw. I can take a look at Erase etc. later. As I know your availability is limited, if you'd like, I can go ahead and push fixes to your branch.
At first I got confused when testing because I was still seeing this message. I guess it should be removed, right? |
Seems like #7820 also regressed... So there's at least a problem with darken blend mode... Edit : Nevermind, it just doesn't work with vulkan on Linux for some reason, but with opengl it's perfect. Edit 2 : With recent changes, it finally works with vulkan ! |
@n0samu Oh yep absolutely!
@angstsmurf Oh no! Thanks for testing!
@Herschel Thank you! Please feel free to push and do whatever you like to progress this, I'd appreciate it. I'll be available on discord from my phone but time in front of a PC is very painful atm. |
a778471
to
0789269
Compare
thank you - would be great to have for web-selfhosted ;) |
With this PR, the highlight effect works when hovering the mouse over the gems in Bejeweled 2 (King.com version). I also tried building Ruffle-selfhosted with wgpu-webgl to test this out on web. I built with dual-wasm enabled for best performance, but the performance running this Bejeweled game was still unacceptable in both Firefox and Chromium. |
here some performance testing for web-selfhosted: |
6882b93
to
a7f46ef
Compare
…Adjustments::IDENTITY where we can
… care for stencil
All blend modes should, as far as I am aware and have been able to test, work correctly.
Performance isn't amazing - there's definitely areas to improve and if you stress it with hundreds of blends you'll notice it chug. I don't think it should be an impact on a "normal" swf though, and a big part of the performance hit is from the lack of cacheAsBitmap.