Skip to content

Commit

Permalink
fix px_per_unit?
Browse files Browse the repository at this point in the history
  • Loading branch information
ffreyer committed Feb 10, 2024
1 parent 58f41eb commit f0422a0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
7 changes: 2 additions & 5 deletions GLMakie/src/drawing_primitives.jl
Original file line number Diff line number Diff line change
Expand Up @@ -456,9 +456,7 @@ function draw_atomic(screen::Screen, scene::Scene, @nospecialize(plot::Lines))

positions = lift(apply_transform, plot, transform_func, positions, space)
else
linewidth = gl_attributes[:thickness]
px_per_unit = data[:px_per_unit]
data[:pattern] = map(*, plot, linestyle, px_per_unit)
data[:pattern] = linestyle
data[:fast] = false

pvm = lift(*, plot, data[:projectionview], data[:model])
Expand Down Expand Up @@ -489,8 +487,7 @@ function draw_atomic(screen::Screen, scene::Scene, @nospecialize(plot::LineSegme
if isnothing(ls)
data[:pattern] = nothing
else
linewidth = gl_attributes[:thickness]
data[:pattern] = lift(*, plot, linestyle, px_per_unit)
data[:pattern] = linestyle
end
positions = handle_view(plot[1], data)

Expand Down
4 changes: 2 additions & 2 deletions WGLMakie/src/Lines.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ function lines_vertex_shader(uniforms, attributes, is_linesegments) {
////////////////////////////////////////////////////////////////////
float width = px_per_unit * (is_end ? linewidth_end : linewidth_start);
float width = is_end ? linewidth_end : linewidth_start;
float halfwidth = 0.5 * max(AA_RADIUS, width);
vec3 p1 = screen_space(linepoint_start);
Expand Down Expand Up @@ -409,7 +409,7 @@ function lines_vertex_shader(uniforms, attributes, is_linesegments) {
////////////////////////////////////////////////////////////////////
float width = px_per_unit * (is_end ? linewidth_end : linewidth_start);
float width = is_end ? linewidth_end : linewidth_start;
float halfwidth = 0.5 * max(AA_RADIUS, width);
vec3 p0 = screen_space(linepoint_prev);
Expand Down
4 changes: 2 additions & 2 deletions WGLMakie/src/wglmakie.bundled.js
Original file line number Diff line number Diff line change
Expand Up @@ -21421,7 +21421,7 @@ function lines_vertex_shader(uniforms, attributes, is_linesegments) {
////////////////////////////////////////////////////////////////////


float width = px_per_unit * (is_end ? linewidth_end : linewidth_start);
float width = is_end ? linewidth_end : linewidth_start;
float halfwidth = 0.5 * max(AA_RADIUS, width);

vec3 p1 = screen_space(linepoint_start);
Expand Down Expand Up @@ -21687,7 +21687,7 @@ function lines_vertex_shader(uniforms, attributes, is_linesegments) {
////////////////////////////////////////////////////////////////////


float width = px_per_unit * (is_end ? linewidth_end : linewidth_start);
float width = is_end ? linewidth_end : linewidth_start;
float halfwidth = 0.5 * max(AA_RADIUS, width);

vec3 p0 = screen_space(linepoint_prev);
Expand Down

0 comments on commit f0422a0

Please sign in to comment.