Hey everyone,
as you may know, Unity can have issues correctly rendering transparent 2D Sprites/Textures exported from Photoshop or Figma. Reason being that most of these tools operate in Gamma color space while Unity uses Linear color space.
I know that it’s possible to switch to Gamma but for our project at least, that’s not option.
Photoshop can be set up to display in linear color space as well but as we’re using Figma to create our UIs, working around that issue on the Artist side is therefore not possible either.
In Unity there are a few workarounds, the one I find the most elegant is this one by Ming Wai Chan. She adds an extra UI camera and translates the UI to Gamma space.
The problem is, she did that almost 5 years ago in Unity 2019 and URP version 7.2.0+ ![]()
We’re using URP 14.0.11 in Unity 2022.3.34 and no matter what I try, I can’t get it to work. Last try my PC crashed because of memory issues…
Maybe you guys have some Feedback or another, maybe better, approach for the Linera Color Space Texture issue. Appreciate y’all.
UPDATE: Still not solved. Tried the second camera approach in a new, empty project but to no avail. Could be a user error though because I had to adjust some parts of the Render Feature script because it was deprecated. Here’s the current state (no worries, your PC won’t crash anymore hehe): https://pastebin.com/qYkBCFkB
Changed Color Profiles in Figma to Display P3, no change.
Found a setting on the Unity Canvas component called “VertexColorAlwaysInGamma”. Sound promising, right? No change.
And tried all import settings of the texture, even tried setting all pixels to linear in a PostProcessor script.
The only thing I can say for sure is that Unity renders the Texture differently than Figma and Photoshop. Loading the file into Photoshop looks right. Here’s a comparions between Unity and Figma:
And a link to the above source file if somebody wants to try it first-hand: EvilGammaFile.png - Google Drive
