Skip to content

Fix sRGB exponent in Metal rendering#2846

Merged
jstone-lucasfilm merged 1 commit intoAcademySoftwareFoundation:mainfrom
exavi:hotfix/meta-display-transform-use-spec-compliant-sRGB-gamma-exponent
Apr 8, 2026
Merged

Fix sRGB exponent in Metal rendering#2846
jstone-lucasfilm merged 1 commit intoAcademySoftwareFoundation:mainfrom
exavi:hotfix/meta-display-transform-use-spec-compliant-sRGB-gamma-exponent

Conversation

@exavi
Copy link
Copy Markdown
Contributor

@exavi exavi commented Apr 1, 2026

This tiny change should 'fix' the sRGB encoding used on the metal backend.

I noticed this while using the MaterialXViewer in a CI setup when generating images where no single pixel matched against reference values (not even the background color :D)

@linux-foundation-easycla
Copy link
Copy Markdown

linux-foundation-easycla bot commented Apr 1, 2026

CLA Signed
The committers listed above are authorized under a signed CLA.

  • ✅ login: exavi / name: exavi (e56a0c0)

@jstone-lucasfilm
Copy link
Copy Markdown
Member

Thanks for this PR, @exavi, and since this code goes all the way back to the original integration of Metal support in 2023, I'm CC'ing @Morteeza, @lkerley, and @dgovil for their domain expertise.

@doug-walker
Copy link
Copy Markdown

The proposed change seems correct, the exponent for the sRGB formula should use 2.4 rather than 2.2.

@dgovil
Copy link
Copy Markdown
Contributor

dgovil commented Apr 2, 2026

I agree this looks like the change is correct, as far as I understand gamma approximations anyway. I will ask Lee to check me on that but I think its a good catch

@ld-kerley
Copy link
Copy Markdown
Contributor

Looks good to me too - I trust Doug for color stuff more than myself :).

I am a little surprised we're not just handling this conversion natively in Metal, but thats a possible improvement for the future.

@jstone-lucasfilm
Copy link
Copy Markdown
Member

Great, thanks to all of our reviewers!

@exavi Before we can merge this work, we'll need you to address the EasyCLA errors, which you can do by following the steps listed here:

#2846 (comment)

@jstone-lucasfilm jstone-lucasfilm changed the title use spec-compliant exponent in sRGB Metal encoding for display transform Fix sRGB exponent in Metal rendering Apr 3, 2026
@exavi
Copy link
Copy Markdown
Contributor Author

exavi commented Apr 3, 2026

Awesome! I’ll sort it out when I get back to the office!

@exavi exavi force-pushed the hotfix/meta-display-transform-use-spec-compliant-sRGB-gamma-exponent branch from 8a9d1e2 to e56a0c0 Compare April 7, 2026 17:59
@jstone-lucasfilm jstone-lucasfilm merged commit b05f0b3 into AcademySoftwareFoundation:main Apr 8, 2026
36 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants