Page 1 of 1

Skybox bit depth.

Posted: 2012-03-24, 01:36
by HWGuy
Right now my skyboxes look pretty bad because of the low bit depth, they're 24-bit pngs but the game looks to turn them down to 16-bit which makes them pretty ugly.

Anyone know a fix for this?

In the future HDR skyboxes would be nice, although they use a fair amount of vram.

Re: Skybox bit depth.

Posted: 2012-03-24, 10:57
by Carsten
HWGuy wrote:Right now my skyboxes look pretty bad because of the low bit depth, they're 24-bit pngs but the game looks to turn them down to 16-bit which makes them pretty ugly.
Is this the same with the sky textures that ship with the DeathMatch demo? (they're 24-bit png's as well)

All graphics output is reduced to 16 BPP if you set a 16 BPP video mode in the game menu (Options, Video Settings). Please check this setting, the Cafu engine does not do this on purpose.

Re: Skybox bit depth.

Posted: 2012-03-24, 11:55
by HWGuy
Ya bit depth is correct.
http://i.imgur.com/TsRpW.jpg
Here's on the tech demo map, very obvious banding on the gradient background, the original PNGs are just fine.
I'm guessing it's because the engine converts it down too much, gotta change that so the renderer has a better image to display.

Re: Skybox bit depth.

Posted: 2012-03-24, 13:05
by Carsten
Ah, I see. Texture compression is the problem.
Please add noCompression to the cubeMap spec in the material definition, e.g.:

Code: Select all

Textures/SkyDomes/PK_BrightDay2
{
    AmbientShader A_SkyDome
    LightShader   none      // == noDynLight

    // The '#' in the next line is auto-replaced with the relevant suffixes (_px, _ny, ...).
    cubeMap Textures/SkyDomes/PK_BrightDay2#.png, wrapS clampToEdge, wrapT clampToEdge, noCompression

    // [...]
}

Re: Skybox bit depth.

Posted: 2012-03-24, 23:48
by HWGuy
Ahh, there we go, looks perfect now.

You might as well svn that change, even midrange 2003 graphics cards have enough vram to fit a big uncompressed skybox.
Segway - When Cafu stable comes out, will you then have two svn branches? Stable and testing would be good since experimental patches can be played with and ensured to work perfectly before committing to stable.

Re: Skybox bit depth.

Posted: 2012-03-25, 11:28
by Carsten
HWGuy wrote:You might as well svn that change, even midrange 2003 graphics cards have enough vram to fit a big uncompressed skybox.
Well, I'm somewhat reluctant doing that:
The OpenGL API provides no way to learn the used amount of physical video RAM, and at the same time our "other" textures, which are all loaded to video RAM at the same time, require a big amount as well.

The proper solution would be to provide a "Video Quality" setting in the game options menu, but currently I have no spare time to implement it myself.
Segway - When Cafu stable comes out, will you then have two svn branches? Stable and testing would be good since experimental patches can be played with and ensured to work perfectly before committing to stable.
The plan is to just tag one of the current revisions in trunk as "stable", then proceed development normally.

However, we're planning to switch from Subversion to Git in the future, which will make both branching as well as local development (that is, development separately from the official Cafu Subversion repository) much easier: See the recently updated FAQ How do I locally clone the Cafu source code repository? for some details.
:up:

Re: Skybox bit depth.

Posted: 2012-03-25, 14:40
by HWGuy
Good to hear you're moving to Git, much better than Svn.

Could have a little patch so noCompression flag is simply ignored when graphics are set to medium/low... I'll bother someone to look into it when they have the time.