Skip to main content
gamedev.net
🔒 Locked

Lightmapping...

Started by mubios 4 replies 550+ views
Original Post
mubios
mubios
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.
uhm, heya
python_regious
python_regious
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.
If at first you don't succeed, redefine success.
zedzeek
zedzeek
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
python_regious
python_regious
Hmmm... yeah I could quite possibly be wrong, I just use multitexturing

Death of one is a tragedy, death of a million is just a statistic.
If at first you don't succeed, redefine success.
_the_phantom_
_the_phantom_
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

python_regious
python_regious
You caught me! It''s a quote from the Marilyn Manson song

Death of one is a tragedy, death of a million is just a statistic.
If at first you don't succeed, redefine success.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.