• Advertisement
Sign in to follow this  

Problem with Emboss bump mapping in polygon mode ?

This topic is 3585 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

hi all, i'm trying to implement the emboss bump mapping in a polygon mode, my problem is when i activate the base texture in second pass, i got a black-white scene ? this is my code, is there any error ? void activeBaseTexture(int id){ glActiveTextureARB(GL_TEXTURE1_ARB); glDisable(GL_TEXTURE_2D); glActiveTextureARB(GL_TEXTURE0_ARB); glEnable(GL_TEXTURE_2D); glTexEnvf (GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); glBindTexture(GL_TEXTURE_2D,texture[id]); glBlendFunc(GL_DST_COLOR,GL_SRC_COLOR); glEnable(GL_BLEND); glEnable(GL_LIGHTING); } //----------------------- this is the code where i call it id=loadGLtexture("base.jpg"); bumpID=loadGLtexture("bump.jpg"); firstpass(); //with the bump map texture activeBaseTexture(id); secondpass();

Share this post


Link to post
Share on other sites
Advertisement
Don't use emboss bump mapping. It's a completely outdated hack, designed for pre-GeForce1 cards that couldn't do a dot product operation way back in the 'stone age' of hardware 3D. The technique is slow, looks horrible, and is completely unusable.

You should look into normal mapping, which will save you a lot of headaches.

[Sidenote: could someone please, please, please throw that NeHe emboss mapping article into the digital equivalent of a very large black hole ? Thank you.]

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement