add color dodge and multiply blending modes shaders, change tmp framebuffer to RGBA32F for better precision and fix the blending problem for the stroke not reaching full opacity

This commit is contained in:
2017-11-11 16:54:21 +00:00
parent 71f18cb292
commit fa4e67617b
4 changed files with 17 additions and 14 deletions

View File

@@ -710,9 +710,9 @@ void ui::Canvas::resize(int width, int height)
m_height = height;
for (int i = 0; i < 6; i++)
{
m_tmp[i].create(width, height);
m_tex[i].create(width, height);
m_tex2[i].create(width, height);
m_tmp[i].create(width, height, -1, GL_RGBA32F);
m_tex[i].create(width, height, GL_RGBA32F);
m_tex2[i].create(width, height, GL_RGBA8);
}
for (auto& l : m_layers)
{
@@ -725,9 +725,9 @@ bool ui::Canvas::create(int width, int height)
m_height = height;
for (int i = 0; i < 6; i++)
{
m_tmp[i].create(width, height);
m_tex[i].create(width, height);
m_tex2[i].create(width, height); // TODO: destroy before recreating
m_tmp[i].create(width, height, -1, GL_RGBA32F);
m_tex[i].create(width, height, GL_RGBA32F);
m_tex2[i].create(width, height, GL_RGBA8); // TODO: destroy before recreating
}
m_sampler.create(GL_NEAREST);
m_sampler_brush.create();