The Godot Q&A is currently undergoing maintenance!

Your ability to ask and answer questions is temporarily disabled. You can browse existing threads in read-only mode.

We are working on bringing this community platform back to its full functionality, stay tuned for updates. | Twitter

0 votes

The following shader works in the editor, but when running the scene it doesn't work

shader_type canvas_item;

uniform bool active_color = true;
uniform vec4 color_to_replace : source_color;
uniform vec4 color_replacement : source_color;

void fragment() {
    vec4 texture_color = texture(TEXTURE, UV);

    if (texture_color == color_to_replace) {
        texture_color = color_replacement;

    COLOR = texture_color;

As you can see in the image it works fine in the editor, but when I run the scene the changes don't appear
enter image description here

El shader no se muestra al ejecutar la escena

El siguiente shader funciona en el editor, pero al ejecutar la escena no funciona

Como se puede ver en la imagen funciona bien en el editor, pero cuando ejecuto la escena no aparecen los cambios

Godot version 4.1
in Engine by (22 points)

Please log in or register to answer this question.

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.