Shaders that draw different types of geometry

I want to draw a shader that renders various types of geometry. But the examples I’ve seen have been stationary objects like squares or circles.

I wonder how to write a shader that can draw various types of geometry such as star, polygon, polyline, PlaneGeometry, etc.

Thank you for posting, tips, and various knowledge.

See

From the Collection of examples from discourse.threejs.org

Little Shader Book

DashedTubes(shader)

SignalMarkers(VertexShader)


Shader - Shadertoy BETA

1 Like