Linear Filtering, Brightness and Contrast

Hi,

I render raster images as quads which are connected to each other forming a grid.

  1. When I apply linear filtering, a visible grid is formed on the edges. I want smooth edges.

  2. I want to set brightness and contrast of these textures.

Can anybody help me?
Thanks!

  1. Have you tried point filtering?

  2. What kind of contrast stretching are you interested in. There’s a simple min/max normalization or there’s histogram based techniques and others. What do you mean by brighten? Simply increase the RGB in the image or something fancier?

Cheers

:slight_smile:

  1. Try using GL_CLAMP_TO_EDGE extension, I understand it solves some artifacts in edges with filtering, like for a skybox for example. Honestly I never used it.

  2. Isn’t there an imaging API for those kind of things since 1.2? Otherwise you can use fragment programs but you’ll need a good gfx card.

  1. GL_CLAMP_TO_EDGE solved the problem, thank you.

  2. The scene is a simple orthographic projection. I render the tiles of a tiff image as quads. I call glColor3ub(255, 255, 255) before rendering. I may adjust this color but it is not actually a brightness or contrast adjustment. I don’t need image editing capabilities. I just need to darken or lighten the scene a bit.