View Full Version : Contrast on texture
05-02-2002, 12:07 PM
I have divided and mapped an image on several quads, and I'm looking for a way of controlling contrast, brightness, etc to it.
I know the equation to use, but I don't know how to access the texture data without reallocating everything.
05-02-2002, 01:58 PM
Keep the image data in your own structure, as well as creating a texture from it.
Then, mess around with your own personal copy of the image data, and when you're finished, use glTexSubImage2d to move your changed data to the texture.
Just search for an explaination of glTexSubImage2d for the details.
[This message has been edited by knackered (edited 05-02-2002).]
05-06-2002, 09:57 AM
if you have a Geforce:
you could also programm your Register Combiners to do your calculations at rendering time...
usualy this feature is used to do per-pixel-lighting, but you are free to calculate whatever you want with it.
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.