Advertisement Jump to content


This topic is now archived and is closed to further replies.


OGL: how to do bumpmapping+env multipass?

This topic is 6582 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, I''m trying to mix emboss bumpmapping and environment gloss mapping in a multi-pass context. For bumpmapping, i use 3 pass: 1) Put the bumpmap into the color buffer, 2) Add the inverse bumpmap with texture coords shifted to the color buffer, 3) Multiply x2 the base texture with the color buffer. I call that: Res = ( Bumpmap1.tex.col + Bumpmap2.tex.col ) * 2 * Base.tex.col For environment gloss mapping, i use 3 pass: 1) Put the environment texture into the color buffer, using spherical texture generation. 2) Back to standard texture coords and multiply the color buffer with the gloss map alpha. 3) Add the base texture to the color buffer. I call that: Res = Env.tex.col * Gloss.tex.alpha + Base.tex.col Now, my problem: how to mix the two ? I know how to do them both separately, but i don''t know in what order i should do the pass, nor what blending function to use.. i do not want to use specific cards extensions, nor the alpha-dest buffer. Any idea ? Basically the problem is that emboss bump mapping destroys the content of the color buffer in pass 1, and so does environment gloss mapping. So i can''t do one before the other... Has someone found a hack to this problem ? Y.

Share this post

Link to post
Share on other sites
Which tutorial is it exactly ? There are 30+ And i don''t remember any tutorial in which he''s doing bumpmapping AND environment mapping ...
As i said, there is no problem to do them separately.. but how to do them both at the same time ?


Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!