Tasharen Entertainment Forum

Support => Other Packages => Topic started by: GrimmGames on May 30, 2014, 11:28:58 PM

Title: FOW - Flickering in Linear color space
Post by: GrimmGames on May 30, 2014, 11:28:58 PM
Hi Aren,

I switched the unity color space to linear, and now the FOW asset flickers during startup and during reveals.

Title: Re: FOW - Flickering in Linear color space
Post by: ArenMook on May 31, 2014, 01:28:27 PM
Yeah, that's to be expected. Linear lighting has a curve on color intensity. Gamma lighting is linear, but linear lighting is curved (as misleading as it sounds).

You can't blend between fading-out textures that aren't using linear values (read: gamma lighting).

As far as I'm aware, Unity didn't provide any way of bypassing linear lighting sampling on textures created at run-time. Only via texture import settings.
Title: Re: FOW - Flickering in Linear color space
Post by: GrimmGames on May 31, 2014, 02:52:41 PM
As far as I'm aware, Unity didn't provide any way of bypassing linear lighting sampling on textures created at run-time. Only via texture import settings.

My good friend Lea Hayes just pointed out that there is an additional bool in the Texture2D constructor for linear color space, just after the mipmap bool:

Texture2D(int width, int height, TextureFormat format, bool mipmap, bool linear);

Setting this to true enables the FOW system to work properly in linear color space.

Cheers!
Title: Re: FOW - Flickering in Linear color space
Post by: ArenMook on June 01, 2014, 06:32:56 PM
Ah, good to know, thanks.