vg-renderer icon indicating copy to clipboard operation
vg-renderer copied to clipboard

Make alpha blending optional

Open hugoam opened this issue 5 years ago • 2 comments

When using vg-renderer to "compose" viewports on the screen, there is currently no control on the blend mode, which right now is hardcoded to alpha blending. It would be nice if vg-renderer exposed a way to change that blend mode :)

hugoam avatar Mar 13 '19 21:03 hugoam

I'll have to think about it a bit more because alpha blending is currently required for antialiasing to work.

To be honest I totally forgot about blend modes (had no use for them). NanoVG supports them, so I should probably put that on the readme, in the section "What's not supported compared to NanoVG", at least until I manage to figure out how to implement them properly.

jdryg avatar Mar 14 '19 06:03 jdryg

I kind of realized that the issue I thought I was having was not due to vg alpha blending after all. After thinking a bit more about it, even for blitting pre-rendered viewports on the screen, alpha blending should be the correct mode anyway. So this is not so needed after all. If I ever actually need it, it will probably come with a pull request :)

hugoam avatar Mar 14 '19 11:03 hugoam