ext_texture_format and first_frame_drawn for swapchaing copying

This commit is contained in:
Nordup 2024-07-13 06:14:03 +04:00
parent 644a8bb969
commit 78ad658f06
7 changed files with 151 additions and 49 deletions

View file

@ -0,0 +1,14 @@
shader_type canvas_item;
uniform bool ext_texture_is_bgra;
uniform bool fill_alpha;
void fragment() {
if (ext_texture_is_bgra) {
COLOR = COLOR.bgra; // Swizzle BGRA to RGBA
}
if (fill_alpha) {
COLOR = vec4(COLOR.r, COLOR.g, COLOR.b, 1);
}
}