jit.gl.gridshape mask?
Hello!
Trying and failing to implement a sort of a "lens" effect for a gridshape slider moving across a waveform so that the waveform colors are inversed when under the slider. Is it possible without writing a custom shader / material? And if not would appreciate any pointers in the right direction.
Hi!
You're on the right track:
Here’s what I changed to make it behave as intended:
Enabled blending on both
jit.gl.meshandjit.gl.gridshapeDisabled depth testing with
@depth_enable 0, and handled the draw order manually using the@layerattributeUpdated
jit.exprto generate signed normalized coordinates,snorm[0], so there’s no need to modify thepositionattribute injit.gl.meshSet
jit.world @ortho 2to remove perspective and keep the slider coordinates within the[-1, +1]range
This is great, way more simple than I expected it to be. Thanks, Matteo!