Hi all,
I just came across the problem where my OSL material shader alpha didn't have the value I expected it to have. It seems that to get the correct value with transparent you need to multiply with with the square root of the intended value.
This will get you an alpha of 0.5.
However this will give you an alpha of 0.75 (1 - 0.5 * 0.5).
Is this doubling unintentional or something I've missed?
Thanks!
I just came across the problem where my OSL material shader alpha didn't have the value I expected it to have. It seems that to get the correct value with transparent you need to multiply with with the square root of the intended value.
This will get you an alpha of 0.5.
Code:
surface testalpha ( ) { Ci = transparent() * sqrt(0.5); }
Code:
surface testalpha ( ) { Ci = transparent() * 0.5; }
Thanks!