Linear * 2.0 - 1.0

Hey,

I have a matcap shader that works in gamma space but not in linear space.
The problem is that doing mainTex + ((matCapTexture * 2.0) - 1.0); doesn’t give the right result in linear space. Only values greater than 0.5 shows.

I tried doing a saturate and a pow(matCapTexure,2.2) but it still isn’t the right result.

What can I do?

gamma to linear is pow(rgb, 1/2.2) =)

yes I also tried that, but it’s not working gives me the same result

Ah. Try fiddling with the bypass sRGB sampling option in the texture importer (under advanced?). If it’s not this or the pow, the problem should be somewhere else.

ahhh yes that’s it!
thanks! :smile: