So I made a simple sprite lit snow shader for my 2d Pixel Art game.
The problem is I made it in my test project.
When I moved it over to my main project it gave me a diffrent output that in my test project.
The shader got the exact same input all the values and textures yet it somehow produced a diffrent output.
I took a closer look at it and even some simple operations like inverting colors give diffrent outputs between projects which shouldnt be the case.
My first suspicion is that maybe the settings on the texture are different between the two projects. Could you check to see if the texture in your first project matches the one in your second project? Specifically, if the first one has an alpha channel, does the other one also have it? And then check the settings in Unity for the texture between the two projects in the Inspector:
Only diffrence I can find between the projects is that in my main project I have a texture asset importer preset but it’s only made to import my textures with the correct PPU and filter mode where as I set those by hand in the test project.
So I don’t think that is the issue, unless unity does something here tham I’m not aware of.
(Edit)
Well just checked and it’s not the importers fault.
Like if you were to open the texture file in Photoshop (or other image editing software) and look at the channels, does one of them have an alpha channel and the other not have it?
Another thing you could do is, in your graph, insert a swizzle node in between the RGBA output of the Sample Texture 2D node and the Invert Colors node, and set the Swizzle node’s mask to XYZ - so it’s just giving you 3 channels instead of four. After doing that, does the Invert Colors node output match, or is it still different?
So I tried the second method and the output of the invert colors node is still diffrent
Also I don’t really think that the textures are the problem here as I made sure they are the same texture by copying the file over from on project to another.
In a nutshell, both Linear and Gamma-Corrected modes assume that 0 is black/empty and 1 is white/full, but they change the emphasis along the way for values in between. This is supposed to be useful for having a good tonal balance on varying hardware, and for how light falloff behaves, but in my experience it just makes for constant surprises like this when different assets or projects have a mismatch.