lume / three-meshline

Mesh-based replacement for `THREE.Line` to allow lines thicker than 1 pixel and other features.
https://docs.lume.io/three-meshline/
MIT License
40 stars 5 forks source link

Support Clipping Planes #8

Open bryaan opened 1 year ago

bryaan commented 1 year ago

Please add support for clipping planes!

This guy suggested to do it like this:

Put this at the top of the main function in the fragment shader:

if ( useClippingPlane == 1.0 && dot( vPosition, clippingPlane.xyz ) > clippingPlane.w ) discard;

trusktr commented 8 months ago

Sorry for the late reply on this one. Please join Discord for quick response!

This feature should be super easy to add (as the snippet implies), because it is not coupled to the geometry/shape in any way.

Would love to have this because when I add the <lume-meshline> element to lume proper, it will need to be compatible with the <lume-clip-plane> element.