I’m developing a 90’s style game running on 640x480 resolution fullscreen. I’m trying to disable multisamples to get a crispy, sharp look, which isn’t really achievable with antialiasing. In window it seems to work fine, but when switching to fullscreen, the screen looks washed-out. My suspicion is that an extra sRGB conversion takes place.
This issue can be reproduced by using the Roaming Ralph demo. First I set the following variables to config:
The result seems perfectly fine in windowed mode. Ralph model is not being antialiased:
Then I set fullscreen on (fullscreen #t), and what I get is this:
I’ve tried to fiddle with textures-srgb and framebuffer-srgb config parameters, but nothing seems to yield the correct result in fullscreen. Any ideas? I’m running pre-built Panda3D 1.9.4 on Windows 7 64bit.
Using a value of 0.6 seems to bring it roughly back to the right brightness. That’s odd, it would be reasonable to expect that multisamples wouldn’t have an impact on gamma. But I’ll take this as a workaround, thanks for the help!
Actually now that you say it, 0.45 might be closer than 0.6. It’s a bit difficult to measure the correct values since gamma fix is not applied to screenshots, so I’m just eyeballing it.
Here’s the graphics card info. My drivers were a bit outdated, but I updated and checked that the same issue persists with the latest ones, just to be sure. If it helps, I’m running a fullHD dual-monitor setup with DVI connectors.
Oh, and one more thing. Each time I launch a Panda3D application, Windows Aero gets disabled during the execution time. This happened also with some older editions of Blender. No idea if this has anything to do with this issue though.
Ah, it disables Windows Aero? Could it be that Windows is running it in compatibility mode for some reason? Try rightclicking python.exe (or ppython.exe - whichever one you launch) in the “python” subfolder of the Panda3D installation folder, and going to Compatibility, to make sure all compatibility settings are off.
Furthermore, try adding “notify-level-wgldisplay debug” to Config.prc. This will tell us about the pixel format that it’s selecting (including whether it grabbed an sRGB pixel format for some reason).
No compatibility modes seem to be active. Aero gets disabled during the creation of Panda3D window, not when the Python interpreter starts, so I think it’s safe to rule out compatibility mode as a cause.
This seems to be exactly what is going on with Panda, judging by the output you posted:
PFD cColorBits: 64 R: 16 G: 16 B: 16
Does it work when you set the precise following settings in Config.prc?
color-bits 8 8 8
alpha-bits 8
Panda does give priority to pixel formats that match the requested number of bits precisely, but it may not be enough to cause it to win out over the 64-bit format.
We’ll need to do something similar to what Blender does: down-prioritise pixel formats higher than 32 bits per pixel.
Yes, it seems to fix the issue, gamma seems absolutely fine in both fullscreen and windowed, and no need for the previous compensation workaround. Awesome, thanks!