Strange shader lighting, differs from StandardMaterial3D

Godot Version

4.3.6 on wayland with nvidia

Question

I have:

  • A material created by a simple shader (left)
  • The same texture in a simple StandardMaterial3D (right)

Both are applied on a MeshInstance3D with a PlaneMesh.

Why do they differ? Shader code below:

shader_type spatial;

uniform sampler2D tex_frg_3;

void fragment() {
	vec4 n_out3p0 = texture(tex_frg_3, UV);
	ALBEDO = vec3(n_out3p0.xyz);
}

It takes an image, and outputs albedo. Not much going on here.

As for the StandardMaterial3D, it is also just the default one with only Albedo applied with exactly the same texture.

Why are they so different from eachother?

Try adding the hing source_color to the sampler2D uniform. More info here Shading language — Godot Engine (stable) documentation in English

Ah, nice. Sorry for noobness and thanks!