mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-02-08 03:19:49 +00:00
19 lines
457 B
Plaintext
19 lines
457 B
Plaintext
|
shader_type canvas_item;
|
||
|
|
||
|
uniform float alpha = 0.0;
|
||
|
|
||
|
uniform vec2 screen_resolution = vec2(1280, 720);
|
||
|
uniform vec2 position = vec2(100.0, 100.0);
|
||
|
uniform vec2 size = vec2(100.0, 100.0);
|
||
|
//1280, 720
|
||
|
|
||
|
void fragment(){
|
||
|
|
||
|
if (
|
||
|
UV.x >= (position.x)/(screen_resolution.x) && UV.y >= (position.y)/(screen_resolution.y)
|
||
|
&&
|
||
|
UV.x <= (position.x + size.x)/(screen_resolution.x) && UV.y <= (position.y + size.y)/(screen_resolution.y)
|
||
|
){
|
||
|
COLOR.a = alpha;
|
||
|
}
|
||
|
}
|