Advertisement

Multitexturing + Sphere Mapping

Started by February 01, 2001 05:31 PM
1 comment, last by Arros 23 years, 9 months ago
I tried to use multitexturing to apply on an object a texture blended with an environment map (with Sphere Mapping), I mean the 1st texture unit has the base texture bound and glMultiTexCoord2fvARB(GL_TEXTURE0_ARB, ...), the 2nd texture unit with the environment texture bound, GL_TEXTURE_GEN_x and GL_BLEND enabled. But the Sphere Mapping doesn''t work right! It looks weird.. It works fine if I do it in two passes. Anybody knows how to do it right with multitexturing? Thanks.
Get the example1 and 2 sourcecode from www.demogl.com/download.asp. These examples work with the demogl demosystem, but the opengl code is just normal OpenGL code. In it is a routine that will tmap a cube using multitexturing with envmapping using a spheremap.


--

Get productive, Get DemoGL: http://www.demogl.com
--
Get productive, Get DemoGL: http://www.demogl.com
Advertisement
Thanks Otis, that helped me! I found my error, I forgot to specify glTexGeni(...., GL_SPHERE_MAP) in the *second* texture unit and OpenGL used the default TexGen mode (GL_OBJECT_LINEAR I think) , that''s why it looked weird

This topic is closed to new replies.

Advertisement