PDA

View Full Version : glsl texture



homer_simpson0
02-17-2009, 12:07 AM
ok when i was rendering without glsl i used to just use
glTexGeni (GL_S, GL_TEXTURE_GEN_MODE, GL_SPHERE_MAP);
glTexGeni (GL_T, GL_TEXTURE_GEN_MODE, GL_SPHERE_MAP);

for my water texture. i know how to do simple texture rendering with glsl but how do i do sphere map?

_NK47
02-17-2009, 02:43 AM
http://3dshaders.com/home/index.php?page...emart&Itemid=34 (http://3dshaders.com/home/index.php?page=shop.product_details&flypage=shop.flypage&product_id=1&category_id=1&manufacturer_id=0&option=com_virtuemart&Itemid=34)

you can't use those functions any longer if you go with GLSL because GLSL programs overwrite the fixed-function pipeline. you can implement it yourself in the shader though (link above).