Hi All,
I would like to draw isolines (lines that have the same elevation for example) just like the picture shown below using shaders. The lines have the same z-value (say z = 5, z= 10, z= 15, etc.)
this is what I have so far:
Currently I have two problems:
**1)- I can’t add vHeight attribute to the vertex shader using R3F. I tried using useMemo but I’m having an issue understanding the logic. I have commented out the section of **
<bufferAttribute
attach="attributes-vHeight"
count={vHeight.length}
array={vHeight}
itemSize={1}
/>
2)- I’m trying to plot the isolines using the code from this thread:
graphics - Contour line and Contour tree - Stack Overflow
however, without vHeight passed to the frag shader, i can’t do much
what I have so far :
what I would like to get