mirror of
https://github.com/thegatesbrowser/thegates.git
synced 2025-09-05 11:25:45 -04:00
ext_texture_format and first_frame_drawn for swapchaing copying
This commit is contained in:
parent
644a8bb969
commit
78ad658f06
7 changed files with 151 additions and 49 deletions
14
app/shaders/render_result.gdshader
Normal file
14
app/shaders/render_result.gdshader
Normal 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);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue