PDA

View Full Version : How are the S and T's calculated in Auto mode?



rantrod
02-25-2001, 06:24 PM
To get the cheap enviroment mapping effect, I can do:
glTexGeni(GL_S, GL_TEXTURE_GEN_MODE, GL_SPHERE_MAP);
glEnable(GL_TEXTURE_GEN_S);
-same of T
-draw polys

Now how are these S and T values calculated?
Anyone know the algorithm?
Where to find info on it?

Is there a way to extract those automatically generated values?

Relic
02-26-2001, 12:24 AM
>>Now how are these S and T values calculated?
>>Anyone know the algorithm?
>>Where to find info on it?

OpenGL 1.2.1 specs chapter 2.10 "Coordinate Transformations" page 37.
Download here: http://www.opengl.org/developers/documentation/OpenGL12.html

sualkdimsch
02-26-2001, 10:59 PM
A good description of spheremapping and other techneques is given in the file GDC2K_ShadingComputations.pdf that can be found under http://www.nvidia.com/Marketing/Developer/DevRel.nsf/bookmark/486693A161C04F3D882568A500827B15

Relic
02-27-2001, 12:45 AM
Nice username!

cileR