mirror of
https://github.com/tonytins/CozyPixelStudio.git
synced 2025-06-25 17:24:44 -04:00
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:
parent
40f6a24fdc
commit
dc469dd4b5
7 changed files with 85 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue