added alpha blending for image and text, nodes position are clamped to be integer
This commit is contained in:
@@ -46,8 +46,8 @@ void Node::update_internal(const glm::vec2& origin, const glm::mat4& proj)
|
||||
if (m_widget)
|
||||
{
|
||||
glm::mat4 pivot = glm::translate(glm::vec3(.5f, .5f, 0.f));
|
||||
glm::mat4 scale = glm::scale(glm::vec3(m_size, 1.f));
|
||||
glm::mat4 pos = glm::translate(glm::vec3(m_pos, 0));
|
||||
glm::mat4 scale = glm::scale(glm::vec3(glm::ceil(m_size), 1.f));
|
||||
glm::mat4 pos = glm::translate(glm::vec3(glm::floor(m_pos), 0));
|
||||
m_widget->mvp = proj * pos * scale * pivot;
|
||||
m_widget->pos = pos;
|
||||
m_widget->scale = scale;
|
||||
|
||||
Reference in New Issue
Block a user