friction2d / friction

Friction Graphics
https://friction.graphics
GNU General Public License v3.0
233 stars 12 forks source link

ShaderEffects refactor v1 #191

Closed rodlie closed 3 months ago

rodlie commented 3 months ago

This is the first refactor of the shader effects code. The goal is to keep all QJSEngine / QJSValue calculations and calls inside the ShaderEffectJS class.

This should improve stability when many shader effects are used in a project. See #64 for more information.

Everything should "just work" as usual, I have been careful to not modify the actual calculations or order. Tested on various projects with misc shader effects and I have not noticed any regressions.

Will provide binaries when I get the time.

Note that this is not a perfect fix. Qt might still crash if you have enough effects (mostly on Linux), but this PR bumps the stability to usable. The main goal is to remove usage of QJSEngine in shader effects with something better, this will be done in a v2 refactor sometime down the road.

rodlie commented 3 months ago

I think this is ready to merge.

On Windows I was not able to replicate any issues, on Linux things are usable, but not as good as on Windows. Why? Don't know and at this point I don't really care to figure out why, I would rather just get rid of QJSEngine in a future release and forget this ever happened.

Anyway, this is an improvement :)