View Full Version : Render a glass sphere
01-13-2004, 03:00 AM
What is the technique to render a glass sphere? Note that we want the sphere to have glass outside AND inside!
01-13-2004, 05:47 AM
OpenGL does not really draw volumes. But you can get a nice reflection and refraction effect with some tricks.
Check out the glass bunny in the NV2X shaders: http://developer.nvidia.com/object/cg_effects_explained.html
Generally you use the angle between normal and view vector to calculate reflection and refraction vectors and look up colors with them from a cube map which shows the environment and mix them together.
Search for refraction and Fresnel to find more info.
Powered by vBulletin® Version 4.2.2 Copyright © 2014 vBulletin Solutions, Inc. All rights reserved.