Snapmaker does use Marlin, that is correct. I haven’t tried @MadHatter 's method, so I’ll let him comment on the rest, but if you are looking for “true” grayscale, I would suggest looking at the following thread:
It seems that the problem is that Marlin stops movement when it changes the laser power (as seen in MadHatter’s failed test where only the borders were engraved). @brent113 and @MrWorf have made modified firmware that enables a relatively new feature in Marlin that allows the laser to continue moving while changing power, allowing for more pure grayscale.
I would recommend checking out the thread if you’re interested. And of course, any firmware downloaded and installed from a third party is at your own risk.