View Full Version : Some sort of blending?
08-17-2006, 07:29 AM
I need to do gamma correction on my buffer. Vurrently i do it per pixel, but thats getting too slow now. How can i alter all the r, g, b channels independantly in the buffer by a given amount/equation?
08-17-2006, 09:11 AM
The simplest what comes to my mind is using a fragment shader. Is it an option for you? If not, just gnore my post ;-)
08-17-2006, 09:25 AM
check this tutorial:
08-17-2006, 10:48 AM
Well i noticed the gammaramp API call but also noticed a few places back in 2002 saying that its isnt implemented on many cards, and thought they were pahsing it out not in? Anyway couldnt get it to do anything on my app.
08-17-2006, 10:58 AM
Actually no it must be my cack coding, the demo works!
08-17-2006, 02:21 PM
Anyone know how the gamma curve (correction factor) is applied to within the setdevicegammaramp function? i need to know so i can implement my own gamma corretion function. ta
08-18-2006, 03:18 AM
check this article: http://www.delphi3d.net/articles/viewarticle.php?article=gamma.htm
08-18-2006, 03:23 AM
Yep seen that, but we use a different gamma correction equation/curve, and so i need to know what setgamma does once it receives the gamma correction curve/ramp, as in how it applies it to the frame buffer
08-18-2006, 05:24 AM
Read the manual. It's a simple mapping of R, G, and B channels from display RAM contents to monitor output done on the fly by the DAC and described as a table of 256 entries for R, G and B. Means it does not affect the frame buffer contents, just the monitor output.
However you generate that table is your choice.
If you need to modyfy the pixel data itself, write a fragment shader.
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.