Jump to content
  • Advertisement

Archived

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

mubios

Lightmapping...

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

K, I have it all set up except for one piece: ... glBlendFunc(GL_SRC_ALPHA, GL_ONE); pModel->drawLightmaps(true); glBlendFunc(GL_DST_COLOR, GL_ZERO); pModel->draw(true); ... it draws correctly except that it will only draw in the first light''s lightmaps - if i dont draw the main model (//pModel->draw(true) it will draw all of the lights and their lightmaps correctly, so I think it has to do with my blend funcs. I hope that this is enough to go off of :> Thanks in advance for any help.

Share this post


Link to post
Share on other sites
Advertisement
You want to draw the model first, with the decal texture without blending, then modulate the lightmap ontop of that, so using two passes that would be:


glBlendFunc( GL_ONE, GL_ZERO );
DrawDecalModel();

glBlendFunc( GL_DST_COLOR, GL_ZERO );
DrawLightmapModel()



Death of one is a tragedy, death of a million is just a statistic.

Share this post


Link to post
Share on other sites
no
draw lighting first (with out blending)
+ draw the decal textures over the top with dst_color zero blending

http://uk.geocities.com/sloppyturds/gotterdammerung.html

Share this post


Link to post
Share on other sites
quote:
Original post by python_regious
Death of one is a tragedy, death of a million is just a statistic.


This is off topic I admit, but I''ve been meaning to ask for a while, that quote, from the Marilyn Manson song ''fight song'' or does it come from another source?

right... sorry, carry on with the OGL talk

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.

GameDev.net 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!