Unusual color ramping on ShaderMaterial textures? Help!

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By hedgehog90

enter image description here

On the left is a simple ShaderMaterial:

shader_type spatial;
uniform sampler2D tex;
void fragment(){
	ALBEDO = texture(tex, UV).rgb;

On the right is a SpatialMaterial with an albedo texture, flipped to show the contrast between the 2 materials.

They both refer to the same texture, but they display very differently.
For some reason the ShaderMaterial ramps up the colors, the SpatialMaterial displays the texture as it is.

If I square each color component in the ShaderMaterial it almost resembles the SpatialMaterial, but not quite.

I’ve tried all sorts of settings in the import texture with no luck, and tried twiddling all the material settings and shader render_modes. Nothing works!

It seems like a bug because it makes no sense.
Why does it do this, and how can I fix it?

:bust_in_silhouette: Reply From: hedgehog90

This fixes it:

uniform sampler2D tex : hint_albedo;