Problem with mapping the lightmap textures
I have two screenshots to explain the problem:
http://www.geocities.com/proje_x/q.html
Basically My lightmaps are calculated correctly but when I use LINEAR filtering, I can see black strips at the edges of the polygons. Can anyone help me?
The problem lies in size of your lightmap. You should use border around it, but better solution is to keep lightmaps a bit smaller than it is real needed. OpenGL in linear filtering is calculating pixel color by using linear interpolation of neightbours texels. (When you don''t have ANY border around the lightmap OpenGL uses black color).
The simplest solution here is instead of 16x16 lightmaps have 15x15 and when calculating lightmap''s coords shift them a little (1/32 for 15x15 lightmap), so OpenGL won''t mess with lightmap edges. I hope it helps.
If you want some theory please ask.
The simplest solution here is instead of 16x16 lightmaps have 15x15 and when calculating lightmap''s coords shift them a little (1/32 for 15x15 lightmap), so OpenGL won''t mess with lightmap edges. I hope it helps.
If you want some theory please ask.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement