Texture borders with filtering

Post your questions, suggestions and experiences regarding to Image manipulation, 3d modeling and level editing for the Irrlicht engine here.
Post Reply
diegoribas
Posts: 8
Joined: Fri Nov 13, 2009 2:08 pm

Texture borders with filtering

Post by diegoribas »

I'm working on a little opengl application.
There is a terrain with multiple textures, using bilinear filtering I have some artifacts on the borders due to the fact that bilinear filtering interpolates using the pixel of the opposite side instead of the pixel of the adiacent texture.

I'm using raw opengl. How can I solve? I have the same problem in irrlicht too.
DavidJE13
Posts: 165
Joined: Tue Jan 09, 2007 7:17 pm

Post by DavidJE13 »

for Irrlicht, take a look at Material->TextureLayer[0]->TextureWrap. Setting it to ETC_CLAMP, ETC_CLAMP_TO_EDGE or ETC_CLAMP_TO_BORDER should probably work for you. (you will get no blending at the edges - it will be a sharp line)
If it doesn't do what you want, you'll need to make your own shader.

you can look at the source to see what irrlicht does with this if you want it elsewhere.
Post Reply