Archived

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

lightmap blending?

This topic is 5010 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

i know i have to use glBlendFunc some how, which parameters to i use to render a second model over the top, but as the light map, so it does a 50/50 blend or sumthing?

Share this post


Link to post
Share on other sites
You don''t really *blend* a light map, you modulate the already drawn texture... You multiply the texture color by the lightmap color.

I know how to do this with multitexturing but not without. In OpenGL, for multitexturing, you need the ARB_multitexture extension (preferably). By default, it is set so your new texture will multiply the texture that is already in place (which is what you want for a lightmap).



Looking for a serious game project?
www.xgameproject.com

Share this post


Link to post
Share on other sites
What Max_Payne said is correct. Look at the opengl tutorials at gametutorials.com to find out about using multiple textures...

EDIT: Wait, do you want to render a second polygon on top of the first to produce the light map effect?? If so, I wouldn't do this. Go look at the tutorial...If not, ignore this edit .

[edited by - tHiSiSbOb on March 26, 2004 10:36:39 AM]

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Either glBlendFunc(GL_DST_COLOR, GL_ZERO) or glBlendFunc(GL_ZERO, GL_SRC_COLOR)
With multitexturing disable blending and set the texture environment for the second TMU to GL_MODULATE

Share this post


Link to post
Share on other sites