Why is the material being lit up?
Asked Answered
T

3

0

Hi guys, I have created a simple scene with a MeshInstance3D containing a PlaneMesh.

The material assigned to the PlaneMesh is a simple shaderMaterial.

Shader code:

shader_type spatial;
render_mode unshaded;

uniform sampler2D base_texture;

void fragment() {
	ALBEDO = texture(base_texture, UV).rgb;
}

There are no lights in the scene, and the render_mode of the shaderMaterial is set to unshaded. However, the shaderMaterial appears to be lit up, resulting in washed-out colors.

Here is the texture used as the base_texture:

I expect the shaderMaterial to display the colors of the original texture as intended. How can I achieve that?

Thx !

Thermoelectrometer answered 26/5, 2023 at 14:2 Comment(0)
N
0

Thermoelectrometer render_mode unshaded;

That would do it. Also, you haven't given the input texture the hint that would make sure it's color managed.

try uniform sampler2D base_texture : source_color;

Nidia answered 26/5, 2023 at 14:13 Comment(0)
T
0

Thermoelectrometer answered 26/5, 2023 at 14:8 Comment(0)
N
0

Thermoelectrometer render_mode unshaded;

That would do it. Also, you haven't given the input texture the hint that would make sure it's color managed.

try uniform sampler2D base_texture : source_color;

Nidia answered 26/5, 2023 at 14:13 Comment(0)
T
0

Nidia It's working! Thx!

Thermoelectrometer answered 26/5, 2023 at 14:22 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.