Var transparent mode (#444)

* allowed and enabled per_pixel_transparency

* Added a Transparency menu

* Added an Alternate screen for transparency

* Added transparency methods

Added the transparency methods plus modified fullscreen such that it resets transparency on toggling hence, Removing the issue of blackness

* Modified the shader to allow transparency

* Added a material to ViewportContainer

Fixed the bug that darkens image when decreasing opacity

* Update Global.gd

* Update Main.gd

* Update TopMenuContainer.gd
This commit is contained in:
Variable 2021-02-02 15:29:19 +00:00 committed by GitHub
parent 40f6a24fdc
commit dc469dd4b5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 85 additions and 2 deletions

View file

@ -2,6 +2,7 @@ shader_type canvas_item;
render_mode unshaded;
uniform float size = 10.0;
uniform float alpha = 1.0;
uniform vec4 color1 : hint_color = vec4(0.7, 0.7, 0.7, 1.0);
uniform vec4 color2 : hint_color = vec4(1.0);
uniform vec2 offset = vec2(0.0);
@ -26,5 +27,5 @@ void fragment() {
bool c2 = any(greaterThanEqual(pos, vec2(size)));
float c = c1 && c2 ? 1.0: 0.0;
COLOR = mix(color1, color2, c);
COLOR.a = 1.0;
COLOR.a = alpha;
}