add function 'shapeFromGLSL'
PWhiddy opened this issue · comments
Peter Whidden commented
create an sdf primitive using sdf string
Peter Whidden commented
provide glsl source which defines a function which defines an sdf with signature 'float shapeSDF(vec3 p)'
automatically create primitive
let mySphere = glslShape(`
float shapeSDF(vec3 p) {
return length(p) - 0.5;
}`);
mySphere()
Torin Blankensmith commented
It's working! de8e517