TheJalfireKnight
TheJalfireKnight

Reputation: 103

Godot Texture Not The Same As SubViewport

I am making a mirror, but there's a problem. The color is far different in the texture than in the subviewport I used in the texture. enter image description here On the bottom in Refl Tx, is what the subviewport looks like. But at the top is what it looks like as a texture. I have messed around with many settings but couldn't find a solution. This is the shader code:

shader_type spatial;
render_mode unshaded;

uniform sampler2D refl_tx;
void fragment(){
    ALBEDO = texture(refl_tx, vec2(1.0 - SCREEN_UV.x, SCREEN_UV.y)).rgb;
}

Upvotes: 0

Views: 709

Answers (1)

Danielryb
Danielryb

Reputation: 21

Add a source_color hint after your texture declaration.

uniform sampler2D refl_tx : source color;

https://docs.godotengine.org/en/stable/tutorials/shaders/shader_reference/shading_language.html#uniforms

Upvotes: 2

Related Questions