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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user