Compute bounding quad of a sphere with vertex shader

Posted by Ben Jones on Stack Overflow See other posts from Stack Overflow or by Ben Jones
Published on 2010-04-28T06:08:53Z Indexed on 2010/04/28 6:13 UTC
Read the original article Hit count: 559

I'm trying to implement an algorithm from a graphics paper and part of the algorithm is rendering spheres of known radius to a buffer. They say that they render the spheres by computing the location and size in a vertex shader and then doing appropriate shading in a fragment shader.

Any guesses as to how they actually did this? The position and radius are known in world coordinates and the projection is perspective. Does that mean that the sphere will be projected as a circle?

Thanks!

© Stack Overflow or respective owner

Related posts about opengl

Related posts about vertex-shader