mob-sakai / UIEffect

UIEffect is an effect component for uGUI element in Unity. Let's decorate your UI with effects!
https://github.com/mob-sakai/UIEffect
MIT License
5.57k stars 770 forks source link

UIEffect Add only works on Gamma Color Space #237

Open GuillemDomenech opened 3 years ago

GuillemDomenech commented 3 years ago

I'm trying to achieve this effect using the Add option, white color and 0.145 Color Factor:

But it only works on Gamma Color Space, here's how it looks in Linear:

For reference, here's the image without any effect applied:

How could I achieve the effect in the first image but with a Linear color space?

GuillemDomenech commented 3 years ago

@mob-sakai Do you know how I could solve this issue? I've tried adding this "color.a = pow(color.a, 2.2);" before returning the color in your "UIEffect.shader" but if I do the base color without the effect doesn't look good, it doesn't look as if I was in the gamma color space.