gamma 2.2 color in ISL

Come here for help & support.
Post Reply
2 posts • Page 1 of 1
Eneen
Posts: 169
Joined: Thu Jan 21, 2016 9:32 am

gamma 2.2 color in ISL

Post by Eneen » Sat Aug 27, 2016 4:03 am

Hi,

I've got this code:

Code: Select all

def eval(vec3 pos) vec3 :
                  lerp(
                    vec3(0.386999313344, 0.429999237049, 0.214984359503),
                vec3(0.386999313344, 0.429999237049, 0.214984359503),
                    maxCosTheta()
                   )
As I can see values entered should in linear space. Is it possible change this to be able to enter 2.2 values directly?

Best regs.

User avatar
CTZn
Posts: 7240
Joined: Thu Nov 16, 2006 4:34 pm
Location: Paris, France

Re: gamma 2.2 color in ISL

Post by CTZn » Thu Sep 01, 2016 8:07 am

Not sure whether that'd be correct but I'd use the pow function. Try powers of 2.2 else 0.454545 depending on what gives.
pow(lerp(...), 0.4545)
obsolete asset

Post Reply
2 posts • Page 1 of 1

Who is online

Users browsing this forum: No registered users and 23 guests