fixed 3d ingame gui

This commit is contained in:
Mikulas Florek 2022-02-08 23:47:01 +01:00
parent 676ab83e9e
commit 3848a9d694
2 changed files with 2 additions and 2 deletions

View file

@ -5,7 +5,7 @@ vertex_shader [[
layout(location = 1) in vec2 a_uv;
layout(location = 2) in vec4 a_color;
layout(std140, binding = 4) uniform Bones {
layout(std140, binding = 4) uniform Drawcall {
mat4 u_matrix;
};

View file

@ -1322,7 +1322,6 @@ struct PipelineImpl final : Pipeline
Draw2DJob& cmd = m_renderer.createJob<Draw2DJob>(allocator);
cmd.pipeline = this;
cmd.atlas_texture = atlas_texture->handle;
cmd.prepare(drawdata);
cmd.matrix = m_scene->getUniverse().getRelativeMatrix(e, m_viewport.pos);
cmd.is_3d = true;
Matrix normalize(
@ -1338,6 +1337,7 @@ struct PipelineImpl final : Pipeline
cmd.matrix.multiply3x3(tr.scale);
}
cmd.matrix = m_viewport.getProjection() * m_viewport.getViewRotation() * cmd.matrix * normalize;
cmd.prepare(drawdata);
m_renderer.queue(cmd, m_profiler_link);
}