Comments on: DDS and Gamma https:/2011/07/dds-and-gamma/ Developer resources for the X-Plane flight simulator Sun, 31 Jul 2011 14:30:22 +0000 hourly 1 https://wordpress.org/?v=6.6.1 By: Ben Supnik https:/2011/07/dds-and-gamma/#comment-2508 Sun, 31 Jul 2011 14:30:22 +0000 http://www.x-plane.com/blog/?p=3591#comment-2508 In reply to Chris.

The flag is standard – like the enumerant it is a piece of DX spec that has no direct meaning for an OpenGL app and interpreting it mean something in particular.

What we have running now (and this will probably be the shipping impl) is:
– The “complex” surface flag indicate a gamma of 1.8.
– When it is missing, we us a gamma of 2.2.
Why this works:
– The complex flag should never have been set, in hindsight.
– The gamma never should have been 1.8.
So the flag acts as a signal that the file was built using the old version of DDSTool, which is the only tool out there that sets the gamma weirdly, I think.

]]>
By: Chris https:/2011/07/dds-and-gamma/#comment-2498 Thu, 28 Jul 2011 18:49:33 +0000 http://www.x-plane.com/blog/?p=3591#comment-2498 In reply to Ben Supnik.

The value in the DDS file is only for information. It is not passed as enumerant to OpenGL (how?). You can, of course, take this information and use the equivalent OpenGL internal formats (that would be GL_COMPRESSED_SRGB_S3TC_DXT1 et al). But that’s not what I was saying. I was saying, before introducing non-standard flags for x-plane into the DDS files, why not stick with the signaling that already exists, to a maximum extent.

]]>
By: Ben Supnik https:/2011/07/dds-and-gamma/#comment-2494 Thu, 28 Jul 2011 01:47:21 +0000 http://www.x-plane.com/blog/?p=3591#comment-2494 In reply to Chris.

Hrm – those formats probably don’t do what we’re doing – I think they’re like OpenGL – they tell the texture sampler to convert to linear color space on texel fetch. We’re just changing the gamma. We could use those enums…but it might make the toolset we can use even thinner since most Windows encoders will write out DXT5 with a gamma of 2.2 by default.

]]>
By: Chris https:/2011/07/dds-and-gamma/#comment-2489 Wed, 27 Jul 2011 16:20:23 +0000 http://www.x-plane.com/blog/?p=3591#comment-2489 I would urge you to take a second look into the DDS specification.

There are pixel formats explicitly reserved for sRGB encoding, but you need to support the DirectX10 variant of DDS to encode them.

For instance there is DXGI_FORMAT_BC1_UNORM and there is DXGI_FORMAT_BC1_UNORM_SRGB, to specifically denote sRGB color space.

That said, there is a lack of tools do deal with DDS on the mac platform.

]]>
By: Ben Supnik https:/2011/07/dds-and-gamma/#comment-2460 Wed, 20 Jul 2011 17:05:13 +0000 http://www.x-plane.com/blog/?p=3591#comment-2460 In reply to carrotroot.

I thought the change was 10.6, but the old 1.8 gamma goes back a long time, that’s where X-Plane picked it up.

]]>
By: carrotroot https:/2011/07/dds-and-gamma/#comment-2458 Wed, 20 Jul 2011 05:52:20 +0000 http://www.x-plane.com/blog/?p=3591#comment-2458 I thought apple switched to using 2.2 gamma since OS X10.5?

]]>
By: Ben Supnik https:/2011/07/dds-and-gamma/#comment-2457 Wed, 20 Jul 2011 02:24:21 +0000 http://www.x-plane.com/blog/?p=3591#comment-2457 In reply to James.

It’ll probably work – we’ll see soon. If not, we’ll patch it.

]]>
By: Ben Supnik https:/2011/07/dds-and-gamma/#comment-2456 Wed, 20 Jul 2011 02:24:00 +0000 http://www.x-plane.com/blog/?p=3591#comment-2456 In reply to Cormac.

It’s not that simple. Sometimes a big issue (next-gen road system) is the sum of a huge number of small issues.

]]>
By: James https:/2011/07/dds-and-gamma/#comment-2455 Wed, 20 Jul 2011 01:56:34 +0000 http://www.x-plane.com/blog/?p=3591#comment-2455 Sorry for the off-topic, but I haven’t heard anything about compatibility between X-Plane 9.70 and Lion. Maybe now that Apple has made public that the product is arriving tomorrow, you could share any specifics? Is there any issue we should be aware of?

]]>
By: Cormac https:/2011/07/dds-and-gamma/#comment-2454 Tue, 19 Jul 2011 23:45:52 +0000 http://www.x-plane.com/blog/?p=3591#comment-2454 “I’m going to try to fix as many of these small issues as possible so we can have a functional beta, then we can talk about it.”

If we’re truly into the ‘fixing the small issues’ development phase, then I am happy enough. I just won’t ask how long the ‘small issues’ list is!

]]>