0 votes

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?

in Engine by (29 points)

1 Answer

+1 vote
Best answer
by (29 points)
selected by
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.