separate shaders, RGBA16F doesn’t work with picking in iOS
This commit is contained in:
@@ -246,7 +246,7 @@ void ui::Canvas::stroke_draw_mix(const glm::vec2& bb_min, const glm::vec2& bb_sz
|
||||
m_plane_transform[plane_index] *
|
||||
glm::translate(glm::vec3(0, 0, -1));
|
||||
|
||||
ui::ShaderManager::use(kShader::TextureAlpha);
|
||||
ui::ShaderManager::use(kShader::TextureAlphaSep);
|
||||
ui::ShaderManager::u_int(kShaderUniform::Tex, 0);
|
||||
ui::ShaderManager::u_int(kShaderUniform::TexA, 1);
|
||||
ui::ShaderManager::u_float(kShaderUniform::Alpha, m_layers[layer_index].m_opacity);
|
||||
@@ -899,8 +899,8 @@ void ui::Canvas::resize(int width, int height)
|
||||
for (int i = 0; i < 6; i++)
|
||||
{
|
||||
#if __IOS__
|
||||
m_tmp[i].create(width, height, -1, GL_RGBA16F);
|
||||
m_tex[i].create(width, height, GL_RGBA16F);
|
||||
m_tmp[i].create(width, height, -1, GL_RGBA8);
|
||||
m_tex[i].create(width, height, GL_RGBA8);
|
||||
#else
|
||||
m_tmp[i].create(width, height, -1, GL_RGBA32F);
|
||||
m_tex[i].create(width, height, GL_RGBA32F);
|
||||
@@ -919,8 +919,8 @@ bool ui::Canvas::create(int width, int height)
|
||||
for (int i = 0; i < 6; i++)
|
||||
{
|
||||
#if __IOS__
|
||||
m_tmp[i].create(width, height, -1, GL_RGBA16F);
|
||||
m_tex[i].create(width, height, GL_RGBA16F);
|
||||
m_tmp[i].create(width, height, -1, GL_RGBA8);
|
||||
m_tex[i].create(width, height, GL_RGBA8);
|
||||
#else
|
||||
m_tmp[i].create(width, height, -1, GL_RGBA32F);
|
||||
m_tex[i].create(width, height, GL_RGBA32F);
|
||||
|
||||
Reference in New Issue
Block a user