Godot 灰度shader

shader_type canvas_item;

void fragment() {
    vec4 color = texture(TEXTURE, UV);
    float gray = dot(color.rgb, vec3(0.299, 0.587, 0.114));
    COLOR = vec4(vec3(gray), color.a);
}
posted @ 2024-11-09 16:30  eva1024  阅读(2)  评论(0编辑  收藏  举报