Closed mosra closed 1 year ago
Base: 81.64% // Head: 81.62% // Decreases project coverage by -0.02%
:warning:
Coverage data is based on head (
6ab446f
) compared to base (592548e
). Patch coverage: 0.00% of modified lines in pull request are covered.:exclamation: Current head 6ab446f differs from pull request most recent head d48d486. Consider uploading reports for the commit d48d486 to get more accurate results
:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.
This branch got to a practically usable state now, so I'm merging it to unblock people waiting on it being mainlined:
TODOs from the above list that are marked as "postponed" are tracked in the projects view, and will be worked on them directly on the master
branch. While there are known artifacts, they're only significant in really specific corner cases and shouldn't affect practical use too much, nevertheless I'll be fixing them. As well as implementing the more efficient mesh data layout (as documented) and support for stippling and textures.
TODOs left:
Add an option to figure out joins from the index buffer forpostponedLines
inputs (by default those are treated as separate segments), it should somehow check that a point is always a part of two segments at most, not moreLines
input is just segments alone,the prev/next attributes could alias the position as they're not used/needed at allnot really but yes, there's a similar optimization -- postponedMaybe even add an option to the shader for this, to treat everything as standalone segments to speed up?postponedMAGNUM_wide_lines
extensionAnd a utility that can do this in a streaming way instead of always from scratch (adding line strips, single points, segments...)not critical for MVP, postponedRound join and miter clip join as well, once I figure out the math (hint: vector projection)postponedNeeds extra effort to calculate proper edge factors in the shared verticespostponedInvestigate quad instancing to save 84% (?) of the datanot worth, as I'd need five attributes instead of four (first line point, second line point, two neighbors and categorization bits for all four), for which there isn't much binding slot space left, and the vertex shader would have to be significantly rewrittenFix smoothing factor calculation for long bevel joints -- needs to pass an extra attribute from the VS containing the bevel edge length, which gets combined with the edge distance and endpoint distancespostponedFix if a join next to the line cap extends beyond the center point of the line, the round cap looks wrong -- the point needs to remember not just whether the point itself is a cap, but also if the other segment point is a cap and act accordinglypostponedFix various nasty corner cases when a line join has endpoints too close to the other linepostponedFix the case where two joined line segments overlapping each other exactly disappear in the output -- some NaN or infinity causing issues probably, might be the same fix as for the aboveProbably would cause issues when a part of a line strip, investigatepostponednoperspective
to avoid artifacts, add a/gl_Position.w
fallback on platforms that don't have itbackport the same thing topostponedMeshVisualizer
so it looks always the same independently ofGL_NV_shader_noperspective_interpolation
being present on ESFix to be more precise with wider lines (it needs to extend the caps/joins including depth, not just screen-space)postponed*.frag
ES2/WebGL1 support? Would need a manualNot bothering with this anymore, I didn't bother with ES2 for skinning either and neither I will for PBR shaders.gl_VertexID
input, should I still bother?Credit https://twitter.com/hypersomniac_/status/1575776294096490496will do once I actually use the overlapping layoutA gradually-updated demo is at https://tmp.magnum.graphics/line-playground/