Advertisement
Guest User

Untitled

a guest
Jul 22nd, 2019
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. float theta = 2.0 * PI * world_position.x / world_radius;
  2. float phi = 2.0 * atan(exp(world_position.y / world_radius)) - PI / 2.0;
  3. float radius = world_position.z
  4.  
  5. gl_Position = vec4(radius * vec3(sin(theta)*cos(phi), sin(phi), cos(theta)*cos(phi)), 1.0);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement