thegates/app/shaders/render_result.gdshader
2024-10-26 08:43:06 +04:00

18 lines
292 B
Text

shader_type canvas_item;
uniform bool ext_texture_is_bgra;
uniform bool show_render;
const vec4 zero = vec4(0);
void fragment() {
if (show_render) {
COLOR = vec4(COLOR.rgb, 1);
} else {
COLOR = zero;
}
if (ext_texture_is_bgra) {
COLOR = COLOR.bgra; // Swizzle BGRA to RGBA
}
}