[prev in list] [next in list] [prev in thread] [next in thread] 

List:       flightgear-devel
Subject:    Re: [Flightgear-devel] Where does Linear->sRGB conversion take place?
From:       James Hogan <james () albanarts ! com>
Date:       2022-02-15 18:46:58
Message-ID: CAAG0J99MR8BHx8cvN+fDQG4q0Ky2ioW7NZzyaSoM55YeSk5Yew () mail ! gmail ! com
[Download RAW message or body]

On Thu, 20 Jan 2022 at 15:48, James Turner <james@flightgear.org> wrote:
> On 20 Jan 2022, at 15:13, James Hogan <james@albanarts.com> wrote:
> 
> does the way that PNG files can encode sRGB & gamma values help? obviously doesn't \
> help distinguish bumps/normals, and perhaps current lack of consistency would break \
> compatibility. 
> 
> Yes, PNG allows encoding all this, but other formats don't : we have quite a few \
> .rgb textures still, although this might be a good reason to finally convert them \
> all. 
> 
> i suppose linear textures would need storing at 16bits per channel too, to avoid \
> banding when gamma corrected. 
> 
> I've missed that requirement, indeed almost none of our current textures are more \
> than 8-bit per channel, indeed I don't think the loader even supports higher bit \
> depths, but maybe it actually does?

Given image formats are normally encoded non-linear sRGB, and linear
textures would need gamma correcting to something similar before
display, is there any reason not to just continue using non-linear
srgb textures?

I've recently had a play with making a new aircraft and hit the issue
of a part textured model, where the colour in the (non-linear SRGB)
texture matches the diffuse colour of a neighbouring material in
blender, but the untextured material is much darker than the texture
in flightgear. It appears to be because the diffuse colour is a linear
colour value, so technically flightgear should gamma correct it to
match the textures (if the texture had an SRGB format opengl would
convert to linear, then both texture and material could be gamma
corrected together by GL_FRAMEBUFFER_SRGB).

Cheers
-- 
James Hogan


_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic