Fix depth conversion in ui::painter_impl

This commit is contained in:
Nikita Lisitsa 2021-02-25 11:13:17 +03:00
parent b7014f2eda
commit 72ae8604cb

View file

@ -20,7 +20,7 @@ out vec4 color;
void main()
{
gl_Position = u_transform * vec4(in_position, float(in_depth) / 16777216.0 * 2.0 - 1.0, 1.0);
gl_Position = u_transform * vec4(in_position, 1.0 - float(in_depth) / 16777216.0 * 2.0, 1.0);
color = in_color;
}
)";