What happened?
When manage_camera(action="screenshot", include_image=true) has to downscale the preview (i.e. max_resolution is lower than the Game View resolution), the returned inline image comes back visibly washed out – dark surfaces are lifted by roughly a gamma step. The PNG written to disk is correct; only the inline copy is affected.
The numbers match a linear→sRGB double-conversion: a UI color of rgb(11,16,21) arrives as ≈rgb(60,72,80), and 1.055 * (11/255)^(1/2.4) - 0.055 ≈ 0.236 → 60. So it looks like the resize path treats already-encoded sRGB bytes as linear (or resizes in linear and never converts back).
This is not cosmetic for agent workflows: an LLM client judging UI colors from the inline preview will "fix" colors that were never broken. In our case the map fog ended up twice as saturated as the design before we caught it.
Reproduction steps
Project: URP, color space = Linear, Game View 1920×1080.
- Display any dark UI (ours is a UI Toolkit screen whose background is
rgb(11,16,21)).
manage_camera(action="screenshot", include_image=true, max_resolution=1920) – inline preview is correct (no resize needed).
manage_camera(action="screenshot", include_image=true, max_resolution=900) – inline preview is washed out, same frame.
- Open either saved PNG and sample the same pixel – both files are correct:
Add-Type -AssemblyName System.Drawing
$bmp = [System.Drawing.Bitmap]::FromFile("Assets/Screenshots/gamma-test-scaled.png")
$bmp.GetPixel([int]($bmp.Width*0.55), [int]($bmp.Height*0.45)) # => R=11 G=16 B=21
Expected
The inline preview should be colorimetrically identical to the saved PNG regardless of max_resolution.
Actual
Downscaled inline previews are lifted by a gamma step; native-resolution previews are fine, and files on disk are always fine.
Notes
Unity version
6000.5.8f1
MCP for Unity package version
10.1.2
Python server version
No response
MCP client
Claude Desktop
Transport
stdio
OS
Windows
Checks
What happened?
When
manage_camera(action="screenshot", include_image=true)has to downscale the preview (i.e.max_resolutionis lower than the Game View resolution), the returned inline image comes back visibly washed out – dark surfaces are lifted by roughly a gamma step. The PNG written to disk is correct; only the inline copy is affected.The numbers match a linear→sRGB double-conversion: a UI color of
rgb(11,16,21)arrives as ≈rgb(60,72,80), and1.055 * (11/255)^(1/2.4) - 0.055 ≈ 0.236→60. So it looks like the resize path treats already-encoded sRGB bytes as linear (or resizes in linear and never converts back).This is not cosmetic for agent workflows: an LLM client judging UI colors from the inline preview will "fix" colors that were never broken. In our case the map fog ended up twice as saturated as the design before we caught it.
Reproduction steps
Project: URP, color space = Linear, Game View 1920×1080.
rgb(11,16,21)).manage_camera(action="screenshot", include_image=true, max_resolution=1920)– inline preview is correct (no resize needed).manage_camera(action="screenshot", include_image=true, max_resolution=900)– inline preview is washed out, same frame.Expected
The inline preview should be colorimetrically identical to the saved PNG regardless of
max_resolution.Actual
Downscaled inline previews are lifted by a gamma step; native-resolution previews are fine, and files on disk are always fine.
Notes
Imagedata being reinterpreted rather than converted before re-encoding).ScreenCapture.CaptureScreenshotAsTexturereturning brighter data in linear projects – https://discussions.unity.com/t/screencapture-capturescreenshotastexture-produces-a-much-whiter-texture/848823 – but here the on-disk output is already correct, so the difference appears to be introduced after capture.Unity version
6000.5.8f1
MCP for Unity package version
10.1.2
Python server version
No response
MCP client
Claude Desktop
Transport
stdio
OS
Windows
Checks