mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-01-19 09:39:48 +00:00
8 lines
254 B
Plaintext
8 lines
254 B
Plaintext
|
shader_type canvas_item;
|
||
|
|
||
|
void fragment() {
|
||
|
COLOR = texture(SCREEN_TEXTURE, SCREEN_UV);
|
||
|
// formula from "https://stackoverflow.com/a/596241"
|
||
|
float avg = ((0.2126 * COLOR.r) + (0.7152 * COLOR.g) + (0.0722 * COLOR.b));
|
||
|
COLOR.rgb = vec3(avg);
|
||
|
}
|