Skip to content

Fix sRGB luminance texture conversion - #25538

Open
issam3105 wants to merge 1 commit into
bevyengine:mainfrom
issam3105:Fix_sRGB_luminance_texture_conversion
Open

Fix sRGB luminance texture conversion#25538
issam3105 wants to merge 1 commit into
bevyengine:mainfrom
issam3105:Fix_sRGB_luminance_texture_conversion

Conversation

@issam3105

@issam3105 issam3105 commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Objective

Fix a regression introduced by 0539e4daf.

That commit started preserving grayscale images as R8Unorm. For sRGB textures, this loses sRGB decoding and sampling the texture as RGB returns the luminance only in the red channel.

Solution

Expand Luma8 and LumaA8 images to RGBA when they are loaded as sRGB

Showcase

CompareVolume and CompareTransmission use a grayscale JPEG as an emissive texture. TransmissionOrderTest uses a grayscale PNG as a base color texture. In both cases, grayscale areas were rendered in red instead of grayscale.

CompareTransmission CompareVolume TransmissionOrderTest

Testing

  • Reviewers can render CompareVolume.glb, CompareTransmission.glb, and TransmissionOrderTest.glb and check that their grayscale textures are no longer red.

@issam3105
issam3105 marked this pull request as ready for review August 24, 2026 15:38
@stuartparmenter stuartparmenter added C-Bug An unexpected or incorrect behavior A-Rendering Drawing game state to the screen D-Straightforward Simple bug fixes and API improvements, docs, test and examples S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Aug 24, 2026
@github-project-automation github-project-automation Bot moved this to Needs SME Triage in Rendering Aug 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-Rendering Drawing game state to the screen C-Bug An unexpected or incorrect behavior D-Straightforward Simple bug fixes and API improvements, docs, test and examples S-Needs-Review Needs reviewer attention (from anyone!) to move forward

Projects

Status: Needs SME Triage

Development

Successfully merging this pull request may close these issues.

2 participants