Jump to content
  • Advertisement

Archived

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

Ysaneya

OGL: how to do bumpmapping+env multipass?

This topic is 6490 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
Advertisement
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 ?

Y.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!