regl-gpu-lines

Pure GPU, instanced, screen-projected lines for regl

MIT License

Downloads
289
Stars
176
Committers
2
regl-gpu-lines - v2.4.1 Latest Release

Published by rreusser over 1 year ago

What's Changed

regl-gpu-lines - v2.2.1

Published by rreusser almost 3 years ago

Bugfixes

  • Try hot-fixing an issue with VAO setup.
regl-gpu-lines - v2.2.0

Published by rreusser almost 3 years ago

Features

  • Adds support for Vertex Array Objects (VAOs). To use, move vertexAttributes and endpointAttributes out of per-frame draw call properties to the drawLines.vao({vertexAttributes, endpointAttributes}) constructor, then pass the resulting object to the draw call as the vao property.
regl-gpu-lines - v2.1.0

Published by rreusser almost 3 years ago

Features

  • Adds postproject pragma to apply an additional transformation to lines after screen-projection.
  • Adds viewportSize render-time option in case you wish to project lines to some other shape than the viewport size. May be used in conjunction with postproject, for example to render to the unit square and then view that square from some other angle.
regl-gpu-lines - v2.0.0

Published by rreusser almost 3 years ago

Features

  • Moves insertCaps from a compile-time to a runtime configuration option by lazily instantiating the four potential draw command variations (endpoints vs. interior segments, and insert caps true vs. false).
  • Adds reorder as a compile-time option. When true (default: true), it internally reorders draw calls for arrays of line props (drawLines([{...}, {...}, ...])) to avoid repeatedly changing the shader program. (See: examples/batching.html)
regl-gpu-lines - v1.1.0

Published by rreusser almost 3 years ago

1.1.0

Features

  • Reenable NaN to signal line breaks. It seems to work now. Confirm here.
regl-gpu-lines - v1.0.0

Published by rreusser almost 3 years ago

This release has no new features. Flipping the switch since, for the first time since starting, I don't have major new features or blocking bugs which would prevent me from calling this a piece of usable software. πŸŽ‰

regl-gpu-lines - v0.0.23

Published by rreusser almost 3 years ago

Features

  • Turning an integer index into a position was somewhat badly done. This release completely renumbers all of the indices. Instead of modifying geometry and flipping it in order to get winding order correct, it now shifts vertex indices by one while preserving geometry. At the cost of one extra wasted vertex, this has the effect of flipping winding order when needed in order to make it consistentβ€”but without modifying geometry. The resulting code is easier to follow, shorter, cleaner, and shows better results.

Bugfixes

  • As a result of renumbering, winding order is now consistent.
  • Collapsed triangle vertices are now repeated at the first and last points only, rather than scattered throughout the instances.
regl-gpu-lines - v0.0.22

Published by rreusser almost 3 years ago

Features

Bugfixes

  • Fixes badly broken behavior on devices which don't successfully check for NaN in the shader
regl-gpu-lines - v0.0.21

Published by rreusser almost 3 years ago

Features

  • Clean up one of the worst parts of the shader code and get end cap insertion working with all combinations of joins and caps. πŸŽ‰
regl-gpu-lines - v0.0.20

Published by rreusser almost 3 years ago

Changelog includes missed 0.0.19 changelog notes πŸ™ˆ

Features

  • Add optional extrapolate keyword, as in #pragma lines: extrapolate varying float name to distinguish between varyings which are extrapolated outside the bounds of their respective segment endpoint values, and varyings which are clamped to the range of the segment. This can be used to dash caps and joins or to ensure colors are not extrapolated.
  • Add insertCaps option to be explicit about when caps are automatically inserted

Bugfixes

  • Switch to preferring w = 0 instead of NaN since NaN detection is a bit unreliable in GLSL.
regl-gpu-lines - v0.0.18

Published by rreusser almost 3 years ago

Features

  • Now inserts caps when it encounters NaN. With some remaining API cleanup since miters and bevels don't have enough points per instance to build a proper round.

Bugfixes

  • Resolve hairpin and collinear cases!! πŸŽ‰
regl-gpu-lines - v0.0.17

Published by rreusser almost 3 years ago

Bugfixes

  • Fix debug instance ID
regl-gpu-lines - v0.0.16

Published by rreusser almost 3 years ago

Features

  • Almost a complete rewrite. Consolidated everything into a single shader with two switches (round vs. miter, cap vs. interior).
  • Line dashes work with both round and miter
  • SDF borders now work with round and miter
  • Bundle size down to 11kB minified, 4.5kB gzipped

Limitations

  • Degenerate lines which turn 180 degrees are a regression. They sometimes but not always work. A tiny floating point offset will fix things.
regl-gpu-lines - v0.0.15

Published by rreusser almost 3 years ago

Features

  • Completely reworked rounded join geometry to split joins down the middle. This makes dashes usable, currently only with rounded joins.
  • Improved handling of z-coordinate
  • Improved handling of some corner cases, including self-intersecting lines and short segments
  • Added render tests! πŸŽ‰
regl-gpu-lines - v0.0.14

Published by rreusser almost 3 years ago

0.0.14

Features

  • Convert the index attribute into a unit-grid-aligned coordinate for wireframes. This is equivalent but much easier than exploding the triangle strip geometry into individual triangles.

Bugfixes

  • Republish after botched 0.0.13 publish
regl-gpu-lines - v0.0.12

Published by rreusser almost 3 years ago

0.0.12

Bufixes

  • Fix an issue in which varying parameters were not triggering inclusion of their respective attributes.
  • Fix custom attribute divisor not set correctly

Features

  • Debugged interleaved attributes. They work great! πŸŽ‰
regl-gpu-lines - v0.0.11

Published by rreusser almost 3 years ago

0.0.11

Features

  • Rename isstart to capOrientation and change from a boolean to a float. isstart seemed unpleasantly asymmetric. CAP_START and CAP_END are now exported as constants on the reglLines function. In the future this may be used as a bit mask to additionally allow signaling two-vertex lines.

Bugfixes

  • Throw errors when attempting to forward count, elements, attributes or instances to regl.
regl-gpu-lines - v0.0.10

Published by rreusser almost 3 years ago

Bugfixes

  • Fix inner miters to clip to the lesser of the two adjacent segment lengths
regl-gpu-lines - v0.0.9

Published by rreusser almost 3 years ago

Bugfixes

  • Remove the minimum-length constraint (was 1/100 pixel) since it sometimes results in missing caps.

Features

  • Improved documentation!