Draft
Conversation
68053ac to
f7b647f
Compare
Collaborator
Author
|
to test: download exe, dll, shaders, etc from and replace files in the 1.7.0 install (likely you'll use celestia-windows-x64-qt6gui) |
2e8ebdf to
90b44ae
Compare
Merged
levinli303
added a commit
that referenced
this pull request
Apr 13, 2026
Taken from #2483 no behavior change yet Fix a bug that iOS ES2 has OES_depth24 extension and will try to call this. GL_DEPTH_COMPONENT24 is not valid for ES2. ``` glTexImage2D(GL_TEXTURE_2D, 0, GL_DEPTH_COMPONENT24, m_width, m_height, 0, GL_DEPTH_COMPONENT, GL_UNSIGNED_INT, nullptr); ``` I've tested viewport effects with: iOS (ES2, ES3) and macOS (desktop GL), with MSAA on/off (ES2 FBO's MSAA is always off), with float or non-float storage.
8adbeb9 to
9e98360
Compare
| PixelFormat format = PixelFormat::RGB; | ||
| // JPEG color images are always sRGB-encoded; grayscale channels are | ||
| // treated as linear (they're typically used as height/alpha data). | ||
| PixelFormat format = PixelFormat::sRGB; |
Contributor
There was a problem hiding this comment.
Some grayscale textures (like the asteroid maps in CelestiaContent) are intended to be used as sRGB, so if possible, this should be limited to bump maps and alpha channels.
7b2a2a6 to
9ce194c
Compare
Render in linear light with a final post-process sRGB conversion instead of relying on hardware GL_FRAMEBUFFER_SRGB. - Add SRGBViewportEffect as the final viewport effect for linear→sRGB conversion, with a GL_RGBA16F source FBO - Pre-linearize input colours (HUD, labels, stars, galaxies, atmospheres) for correct blending in linear space - Detect sRGB PNG/JPEG textures and use sRGB internal formats - On GLES, expand sRGB luminance formats to GL_SRGB8_ALPHA8 at upload time since GL_SLUMINANCE is unavailable (ANGLE/Metal) Remove gamma tone-mapping hack from light source normalization Now that the rendering pipeline uses float color textures with sRGB output, the old gamma compensation (γ≈0.602) for making dim secondary light sources visible in 8-bit framebuffers is no longer needed. Light irradiance is now simply normalized linearly by the total. Support sRGB on GLES2 too Better support GLES
9ce194c to
b633caa
Compare
9db6d9c to
fee0584
Compare
Add a config-file option (SRGBRendering, default false) that controls whether the linear-light rendering pipeline is active. When off, the renderer behaves as before the sRGB branch: no color linearization, no sRGB texture formats, no gamma-related code changes, and no sRGB post-process viewport effect. On GLES, enabling the setting requires GL_EXT_sRGB; if the extension is missing the setting is silently forced off. Also add sRGB-aware image loading: - DDS: support DX10 extended header with DXGI sRGB format variants - AVIF: detect sRGB vs linear from CICP transfer characteristics
fee0584 to
b06e1f4
Compare
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Render in linear light with a final post-process sRGB conversion instead of relying on hardware GL_FRAMEBUFFER_SRGB.