About Store Forum Documentation Contact



Post Reply 
Renderer.screenShots() Gamma Issue
Author Message
llynx Offline
Member

Post: #1
Renderer.screenShots() Gamma Issue
When taking screenshots with Renderer.screenShots() D.gamma() is not included in the output while programs like Fraps take the screenshots correctly.
08-31-2010 11:07 PM
Find all posts by this user Quote this message in a reply
Esenthel Online
Administrator

Post: #2
RE: Renderer.screenShots() Gamma Issue
it works differently, you can manually apply gamma if you want using Image::color
08-31-2010 11:25 PM
Find all posts by this user Quote this message in a reply
llynx Offline
Member

Post: #3
RE: Renderer.screenShots() Gamma Issue
Is there any benefit to manually applying gamma with Image::color over D.gamma() other than the ability to take accurate screenshots with the renderer?

There isn't really any documentation on how to apply gamma manually and I'm having trouble doing this, any code to help?
09-01-2010 09:02 PM
Find all posts by this user Quote this message in a reply
Esenthel Online
Administrator

Post: #4
RE: Renderer.screenShots() Gamma Issue
Flt exponent=ScaleFactor(D.gamma()*-0.5f);

apply gamma:
red=Pow(red,exponent)
green=Pow(green,exponent)
blue=Pow(blue,exponent)

rgb are here assumed to be 0..1 Flt
09-01-2010 11:41 PM
Find all posts by this user Quote this message in a reply
llynx Offline
Member

Post: #5
RE: Renderer.screenShots() Gamma Issue
Works, thanks!

Is there any reason to use one over the other? (D.gamma(gamma) vs. ColorMatrix)?

Edit: D.gamma(Gamma) seems to make colors richer and increases contrast?
(This post was last modified: 09-02-2010 01:51 AM by llynx.)
09-02-2010 01:27 AM
Find all posts by this user Quote this message in a reply
Esenthel Online
Administrator

Post: #6
RE: Renderer.screenShots() Gamma Issue
gamma is faster than color matrix
it shouldn't have any overhead, while color matrix requires shaders drawing and texture copy
09-02-2010 12:09 PM
Find all posts by this user Quote this message in a reply
Post Reply