Pure GPU, instanced, screen-projected lines for regl
MIT License
normalized
and type
by @rreusser in https://github.com/rreusser/regl-gpu-lines/pull/9
Published by rreusser almost 3 years ago
Published by rreusser almost 3 years ago
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.Published by rreusser almost 3 years ago
postproject
pragma to apply an additional transformation to lines after screen-projection.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.Published by rreusser almost 3 years ago
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).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)Published by rreusser almost 3 years ago
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. π
Published by rreusser almost 3 years ago
Published by rreusser almost 3 years ago
npm run serve-render-tests
, accessible online using published module at https://rreusser.github.io/regl-gpu-lines/docs/tests.html
Published by rreusser almost 3 years ago
Published by rreusser almost 3 years ago
Changelog includes missed 0.0.19 changelog notes π
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.insertCaps
option to be explicit about when caps are automatically insertedw = 0
instead of NaN
since NaN
detection is a bit unreliable in GLSL.Published by rreusser almost 3 years ago
Published by rreusser almost 3 years ago
Published by rreusser almost 3 years ago
Published by rreusser almost 3 years ago
Published by rreusser almost 3 years ago
Published by rreusser almost 3 years ago
Published by rreusser almost 3 years ago
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.count
, elements
, attributes
or instances
to regl.Published by rreusser almost 3 years ago
Published by rreusser almost 3 years ago