// 回転体作成シェーダ "spin" // ver 1.2 2020/09/06 // by yarunashi@dooon float map(vec3 v){ float center = iVolumeSize.x * 0.5; float x = v.x - center; float y = v.y - center; float r = sqrt(x*x + y*y); float far = iVolumeSize.y - 1.0; //最背面 return voxel(vec3(center + r, far, v.z)); }