This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
Lines TODO #3641
Labels
bug
Collection
contains multiple issues
enhancement
Feature requests and enhancements
planning
For discussion and planning development
This supersedes #2548 and closes it once #3558 gets merged.
New Features
Joinstyle and linecap (from #2548 & #3558)
Rounded joints, caps and extruded caps should be much easier with the added signed distance fields. We just need to adjust their interpretation.
Closed Lines / Loops (from #2548)
Add a keyword that makes lines closed loops. This would require adjusting indices + shaders to cleanly connect the line.
Bring back per-point linewidth (from #3558)
This is getting removed in #3558 as it complicates things a lot. With a large difference in linewidth the shape of the line segment can become concave, which makes the signed distance fields cut away from sections they should not affect. A potential way to deal with this is to detect concave corners and switch
max(width, length)
tomin(width, length)
for them.Bug fixes / Improvements
Poly Optimization (from #3558)
poly
picks the first method definitionMakie.jl/src/basic_recipes/poly.jl
Line 11 in 1c6d934
Rect
, which means it relies onwireframe
which useslinesegments
. So it will always produce bad corners (fully overlapping, partially overlapping or missing corners). We should make it go into the second methodMakie.jl/src/basic_recipes/poly.jl
Line 86 in 1c6d934
lines
Optimize line length calculation/slow path (from #3558)
In order to correctly continue patterns from line segment to segment we need to calculate the cumulative line length on the CPU. Currently we always do a full transformation to pixel space. I think that is unnecessary when if the camera does not have perspective projection or at least if it does not have rotation.
Avoid bending dots across joints (from #3558)
In #3558 this can be done by setting
offset = max(abs(extrusion, halfwidth)
inprocess_pattern
however that result in patterns breaking in dense lines (e.g. bracket tests). This might be fixable by limiting halfwidth to the segment length.Sample colormap in fragment shader (from #3558)
Currently colormaps are sampled in the vertex/geometry shaders, which means that we interpolate colors directly rather than interpolating values and resampling the colormap. This leads wrong colors in some cases.Fixed in #3558
Move line length calculation to JavaScript in WGLMakie (from #3558)
WGLMakie artifacts in dense lines (from #3558)
In #3558 one of the tests shows artifacts:
I can't reproduce these directly, but I can get something similar with
px_per_unit = 0.5
. When rendering alpha >= 1 as black, alpha <= 0 as red and the in-between as green I get:Based on this I'm assuming that the issue has something to do with MSAA as well. If two segments draw to the same pixel we should either see flat black, green or red. To get dark red pixels there needs to be mixing between alpha >= 1 and alpha <= 0, i.e. multisampling. It should also not be the case that the green and red outline sections get anti-aliased, but they do.
Probably won't fix (anytime soon)
Truncated joints overlap themselves (from #2548)
Removing this overlap is doable with the new signed distance field approach, but it's unclear how to handle lines that overlap across their whole length. For example, a short line cutting away from a longer may result in a missing section like this:
Cutting away up until the end of the shorter line is more difficult and will likely lead to further AA issues.
Line-fxaa issues in GLMakie (from #2548)
Lines produce artifacts on other objects with
fxaa = true
. This is a result of the fxaa masking we are doing. There is now a workaround (settingfxaa = true
for the line) and a fix for this requires redoing our renderloop. So it's pretty low priority.The text was updated successfully, but these errors were encountered: