mirror of
https://github.com/thegatesbrowser/thegates.git
synced 2025-08-29 17:16:57 -04:00
switch mobile, fix shader
This commit is contained in:
parent
6d009d0fc1
commit
d4190fbd9e
7 changed files with 21 additions and 14 deletions
|
@ -1,14 +1,18 @@
|
|||
shader_type canvas_item;
|
||||
|
||||
uniform bool ext_texture_is_bgra;
|
||||
uniform bool fill_alpha;
|
||||
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
|
||||
}
|
||||
|
||||
if (fill_alpha) {
|
||||
COLOR = vec4(COLOR.r, COLOR.g, COLOR.b, 1);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue