How do people pass functions to OpenGL ES GLSL functions?
问题 I want to rotate and translate a 2d shape made with signed distance functions. The docs say this is the method: vec3 opTx( in vec3 p, in transform t, in sdf3d primitive ) { return primitive( invert(t)*p ); } It looks to me like primitive is some kind of function (or a struct) I can call, Is there a way to pass functions like that (or how does this make sense)? Firstly I don't know what transform and sdf3d types are, and what is the invert function. Secondly how do I apply this to 2d? const