jdryg / vg-renderer

A vector graphics renderer for bgfx, based on ideas from NanoVG and ImDrawList (Dear ImGUI)
BSD 2-Clause "Simplified" License
503 stars 55 forks source link

Make alpha blending optional #14

Open hugoam opened 5 years ago

hugoam commented 5 years ago

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 :)

jdryg commented 5 years ago

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.

hugoam commented 5 years ago

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 :)