Jump to content
  • Advertisement

Archived

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

cosmonaut

MultiTexturing + Lightmaps

This topic is 5445 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 there! My model and scene loader is working, and it looks good. i''ve always written a lightmap generator which creates a lightmap for each object in the scene. is this wrong? should i calculate only one lightmap for the entire scene? okay, now the main question: i''m currently rendering my scene with lighting and texturing on. in the second pass i''m rendering it with my lightmaps as texture and disabled lights
glBlendFunc(GL_DST_COLOR, GL_ZERO) 
 
it seems to create correct results, but i have one extra pass. i think i could solve this problem by using multitexturing. but how are the different texels combined to each other? can i specify this somewhere? maybe someone has a good tutorial on this in spare? that''ll be nice TIA

Share this post


Link to post
Share on other sites
Advertisement
"but how are the different texels combined to each other? can i specify this somewhere? "


you can specify how texels are combined using glTexEnv. the following are avaible: GL_MODULATE, GL_DECAL, GL_BLEND, or GL_REPLACE.

here''s a link to the function description. (This is the 3dlabs version of the documentation):
http://www.3dlabs.com/support/developer/GLmanpages/gltexenv.htm


If you want to specify a custom combination of fragments. you can use various ''Combine'' extensions (GL_ARB_texture_env_combine,...).
Also you can do this with Fragment Programs (ARB_fragment_shader),...if your card supports them.

Share this post


Link to post
Share on other sites
okay i understand! thx!

there are a lot of things (shaders, combiners etc) that are connected together, but i don''t understand the difference between them (okay, i know what pixel and vertexshaders are, but thats it)

i heard of fragment programs, vertex programs, register combiners, etc

so what are those things? or could anyone recommend a good tutorial that covers the topic "shaders" ?

thanx in advance
cosmo

Share this post


Link to post
Share on other sites
From what i understand, Pixel Shaders and Vertex Shaders are DirectX terminology for Fragment Programs and Vertex Programs respectivley.

According to Sillicon Graphics (?i think it was them?) ''Fragment'' is the correct term as ''Pixel'' shaders dont work per pixel, but per texel or fragment.

Register combiners are the earlier effort at creating a programmable pipeline, which shaders have taken over.

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!