shaders!
This commit is contained in:
1 parent
a57003ec24
commit
f0fec8bfc7
9 files changed
+224
-9
No files matched your search
@@ -0,0 +1,17 @@
|
||||
shader_type canvas_item;
|
||||
|
||||
void vertex() {
|
||||
// Called for every vertex the material is visible on.
|
||||
}
|
||||
|
||||
void fragment() {
|
||||
vec4 existing_color = texture(TEXTURE, UV);
|
||||
vec3 grayscale_color = vec3((existing_color.r + existing_color.g + existing_color.b)/3.0);
|
||||
COLOR.rgb = grayscale_color;
|
||||
COLOR.a = existing_color.a;
|
||||
}
|
||||
|
||||
//void light() {
|
||||
// // Called for every pixel for every light affecting the CanvasItem.
|
||||
// // Uncomment to replace the default light processing function with this one.
|
||||
//}
|
||||
Reference in new issue
Block a user