Skip to content
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

Glowfilter implementation is inaccurate #19516

Open
xrtxn opened this issue Feb 14, 2025 · 3 comments · May be fixed by #19645
Open

Glowfilter implementation is inaccurate #19516

xrtxn opened this issue Feb 14, 2025 · 3 comments · May be fixed by #19645
Labels
bug Something isn't working

Comments

@xrtxn
Copy link

xrtxn commented Feb 14, 2025

Describe the bug

It looks like this in ruffle latest nightly:
Image

Expected behavior

In flash player standalone:
Image

Content Location

Code and swf file available in:
https://github.com/xrtxn/ruffle_bug_report

Affected platform

Desktop app

Operating system

Artix linux

Browser

No response

Additional information

For some reason in the game it looks like this, with a black background, but this may be because of a sideeffect.
Image

@xrtxn xrtxn added the bug Something isn't working label Feb 14, 2025
@torokati44
Copy link
Member

bojler eladó btw

@xrtxn
Copy link
Author

xrtxn commented Feb 26, 2025

Actually, I did some more testing, and it turns out there is something wrong with the glowfilter implementation.
I updated the example project, but here is the important part:

			bordersmc.filters = bordersmc.filters.concat(new GlowFilter(
						0xB3B3B3, // RGB(179,179,179)
						0.3, // Alpha ≈76/255 (0.298 rounded to 0.3)
						8, // blurX
						8, // blurY
						3, // strength // higher strength makes it more noticable
						2, // quality/passes
						true, // inner glow
						true // knockout
					)
				);

The stronger the strength is, the more it differs. Here is strength 25:

Image

@xrtxn xrtxn changed the title Multiple layered movieclips with filters looks different than in flash player Glowfilter implementation is inaccurate Feb 26, 2025
@xrtxn
Copy link
Author

xrtxn commented Feb 27, 2025

I can't believe it but I actually found the issue. I will prepare a pull request shortly :D

Image

Also I just noticed, that the RGB color code compared to the flash player, the Green color is more by 1(!)
hex 007200 in flash player
hex 007300 in ruffle emulator

@xrtxn xrtxn linked a pull request Feb 27, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants