Jump to content
  • Advertisement

Archived

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

SZ

Lightmaps problem

This topic is 6417 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 have a lightmap stored in a unsigned char TexData[LightmapRes*LightmapRes]. It could look somthing like this: (very low res 4x4) TexData={0,0,255,255 ,0,0,255,255 ,0,0,255,255 ,0,0,255,255} That texture data should look like this: one side of the lightmap all black(left) and the other all "white"... My problem is that on the right(white) edge there is a little black streak and on the left edge there is a "white" streak were it should be all black I use gluBuild2DMipmaps(GL_TEXTURE_2D, 1, iLightmapResolution,iLightmapResolution, GL_LUMINANCE, GL_UNSIGNED_BYTE, TexData) to build the lightmap The lightmaps works really good(got shodows and all)..execpte for this little problem.. Damn that was hard to explain... if anyone understood that and have any idea what the problem may be..please let my know sorry about my english..

Share this post


Link to post
Share on other sites
Advertisement
Hi,

I use to have the same problem. What you have to do is this...

glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP);

I have it optionable in my engine, just in case I want to tile a texture.

Hope that helps.



~-=-=-=-=-=-=~
~Justin Eslinger~
~.."BlackScar"..~
~-=-=-=-=-=-=~

Edited by - BlackScar on November 28, 2000 3:34:39 PM

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!