src/math/Color.cpp
// Convert from RGBE to float as outlined in Gregory Ward's Real Pixels article, Graphics Gems II, page 80.
Convert from RGBE to float as outlined in Gregory Ward's Real Pixels article, Graphics Gems II, page 80.
Convert from RGBE to float as outlined in Gregory Ward ' s Real Pixels article Graphics Gems II page 80 .
FLinearColor FColor::FromRGBE() const
	{
		if (a == 0)
			return FLinearColor::Black;
		else
		{
			const float Scale = FMath::Ldexp(1 / 255.0f, a - 128);
			return FLinearColor(r * Scale, g * Scale, b * Scale, 1.0f);
		}
	}
FLinearColor FColor :: FromRGBE ( ) const { if ( a == 0 ) return FLinearColor :: Black ; else { const float Scale = FMath :: Ldexp ( 1 / 255.0f , a - 128 ) ; return FLinearColor ( r * Scale , g * Scale , b * Scale , 1.0f ) ; } }
Convert from RGBE to float as outlined in Gregory Ward's Real Pixels article, Graphics Gems II, page 80.
Convert from RGBE to float as outlined in Gregory Ward ' s Real Pixels article Graphics Gems II page 80 .