Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics

Gamma to Linear issue

A topic by hoops doggit created Jul 11, 2018 Views: 63 Replies: 2
Viewing posts 1 to 3

Using linear lighting setting is the best for lighting sprites using the shadowed shader but when you change the setting it also reinterprets the canvas colours, making them appear darker than they really are. Is there any way that could be fixed? Imagine it could be a pretty involved issue.

I'm just switching back to gamma when i need to make heaps of stuff then switching back to linear to see how things look ingame

(1 edit)

I looked into this and I'm confused by your problem,

The shadowed sprite shader is affected by lighting and ambient light, so switching color space will affect the final rendered color (this also happens with regular geometry using the standard unity material). The shadowed shader is basically just the old default Lambert-shaded standard shader, with a shadow pass.

Linear space isn't reinterpreting the canvas colour. What you're seeing as darker colours is just the lighting from your scene affecting the sprite, however you have it set up. The colors look different when you switch color space because the colors and intensities of the lights in your scene remain the same and should be adjusted so the scene looks the way you want it to in the color space you'll use.

If you don't want the colors of the sprites you drew to be affected at all, you can use an unlit shadow-casting shader (not included in doodle studio but lmk if you need one).

Worth noting is, the UI of doodle studio seems to change in linear vs gamma space (which seems to be a unity bug), but the colors in the texture you're drawing remain the same. So you shouldn't need to switch spaces to draw. You should be able to stick to one color space.

Color spaces are confusing! Let me know if this clear things up

Hey yeah what you described in the second to last paragraph was what I was experiencing. It was getting in the way of colour picking at the time but not actually changing the colours in the files. The workaround I've used is just to switch back to gamma when I do a bunch of art assets then go back to linear when I want to see it under desired lighting conditions