Jump to content
  • Advertisement


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


Lightmap filtering

This topic is 5795 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''m creating a Quake 2 rendering engine, and I was just working on the lightmaps. As you may know, the lightmaps are limited to 16x16, so I placed 64 of them in one texture (128x128). This works fine, except when I do a GL_LINEAR filter on the texture. There are black lines that border all the lightmaps (because it filters using the pixels outside of the lightmap border). Is there a better way of accomplishing this? I''d like to keep the lightmaps in this size texture unit, but I would like to get rid of the black borders. GL_NEAREST filter makes it look too blocky to use. Thanks, Mark Before I couldn''t spell engineer, now I are one!

Share this post

Link to post
Share on other sites
Guest Anonymous Poster
this is a common issue with certain rendering hardwares.

are you setting your uv coords right on the border of
your lightmaps? if so try using the center of that
particular corner instead.

so if you need to lightmap the 2nd lightmap in the texture
and its (upperleft/lowerright) coordinates are (16,0/32,16)
then you want your mapped uvs to be (16.5,0.5/31.5,15.5).

does that make sense?

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!