mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 22:47:29 -06:00
Make lines update in real-time in the simulation-view too.
This approach does suffer from returning to exactly the same point, which can mess up the view. part of CURA-11521
This commit is contained in:
parent
7c00d2f0b3
commit
6e75eb34af
3 changed files with 27 additions and 1 deletions
|
@ -19,6 +19,10 @@ vertex41core =
|
|||
|
||||
uniform highp mat4 u_normalMatrix;
|
||||
|
||||
uniform vec3 u_last_vertex;
|
||||
uniform vec3 u_next_vertex;
|
||||
uniform float u_last_line_ratio;
|
||||
|
||||
in highp vec4 a_vertex;
|
||||
in lowp vec4 a_color;
|
||||
in lowp vec4 a_material_color;
|
||||
|
@ -134,6 +138,10 @@ vertex41core =
|
|||
void main()
|
||||
{
|
||||
vec4 v1_vertex = a_vertex;
|
||||
if (v1_vertex.xyz == u_next_vertex)
|
||||
{
|
||||
v1_vertex.xyz = mix(u_last_vertex, u_next_vertex, u_last_line_ratio);
|
||||
}
|
||||
v1_vertex.y -= a_line_dim.y / 2; // half layer down
|
||||
|
||||
vec4 world_space_vert = u_modelMatrix * v1_vertex;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue