Open krober10nd opened 3 years ago
float opCheapBend( in sdf3d primitive, in vec3 p ) { const float k = 10.0; // or some other amount float c = cos(kp.x); float s = sin(kp.x); mat2 m = mat2(c,-s,s,c); vec3 q = vec3(m*p.xy,p.z); return primitive(q); }
float opCheapBend( in sdf3d primitive, in vec3 p ) { const float k = 10.0; // or some other amount float c = cos(kp.x); float s = sin(kp.x); mat2 m = mat2(c,-s,s,c); vec3 q = vec3(m*p.xy,p.z); return primitive(q); }