Re: Linear Color ( or not? )
Re: Linear Color ( or not? )
Hmm. It isn't really linear output then right? The outputimage says it is in linear color space. How would I know what gamma to compensate for? Seems like there could be custom gamma curves for each channel in some cases?
I digress, the real issue is that I need an input image that was render 0.5,0.5,0.5 to evaluate to 0.5,0.5,0.5 in a fragment shader. Right now it does not seem that the input image is transformed to linear space.
Appreciate the patience.
On Aug 24, 2012, at 3:16 PM, Darrin Cardani wrote:
> David,
>
> It sounds like you get the basic concept. You are correct that you need to include that value in your properties dictionary to get inputs that are linear and to output your results in linear RGB.
>
> What's not so obvious is that if you output (0.5, 0.5, 0.5, 1.0) in linear RGBA, a couple of things happen. Before displaying your output to the screen or exporting it to a file, we need to convert it from linear to gamma-corrected RGB as a final step. The gamma-corrected value of linear 0.5 will be about 0.72. (That's 0.5 ^ (1.0 / 2.2).) This works as expected, but can be confusing. If you want the gamma-corrected result to be 0.5 (and for it to look like "middle gray") you need to use (0.21, 0.21, 0.21, 1.0) for your RGBA value in linear RGB.
>
> If you've ever heard of "18% gray" being middle gray, that's in linear RGB. As you can see, 0.21 is just a little more than 0.18, so they're pretty close.
>
> Darrin
>
> On Aug 24, 2012, at 12:44 PM, "email@hidden" <email@hidden> wrote:
>
>> Hi all,
>>
>> I apologize if the following has been addressed and I missed it. If so, just slap me and please point me in the appropriate direction.
>>
>> I have just begun updating several of fxplugs from 1.2. Many of them are based on data encoded into the images. I understand that colorspaces are now used and I need to request linear color outputs.
>>
>> In properties I am returning "[NSNumber numberWithInteger:kFxImageColorInfo_RGB_LINEAR], kFxPropertyKey_DesiredProcessingColorInfo," in the dicitonary.
>>
>> When I query the output image for the color space it returns "kFxImageColorInfo_RGB_LINEAR". I understand this to map the image colors from 0.0 to 1.0.
>> (FxImage*)outputImage.colorInfo equals kFxImageColorInfo_RGB_LINEAR
>>
>> The issue occurs when rendering to the output image ( or read from the input image ). The following code outputs a much brighter luminance value than 0.5.
>> glClearColor( 0.5, 0.5, 0.5, 1.0 );
>> glClear( GL_COLOR_BUFFER_BIT );
>>
>> Is there somewhere else I need to request linear color? Am I not understanding linear color correctly?
>>
>> Regards,
>> David Patrick Farmer
>>
>>
>> _______________________________________________
>> Do not post admin requests to the list. They will be ignored.
>> Pro-apps-dev mailing list (email@hidden)
>> Help/Unsubscribe/Update your Subscription:
>>
>> This email sent to email@hidden
>
David Patrick Farmer
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Pro-apps-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden