I’m reading in contours from TSPS in real-time and want to render them using a shader. My current approach is to use an ofPolyline to house the points and then just ofBeginShape. This allows me to “mask” the shader with the contour, but provides no geometric information.
Ideally, I would want the distance to the contour as a varying parameter to the shader. I thought of writing a buffer with the information and then passing it in as a texture, but it’s way too slow for real-time.
Are there any better approaches to get this information to my shader?