godot引擎學(xué)習(xí)之shader小課3-圖片灰度特效

?
00:19
?我根據(jù)上節(jié)學(xué)的,也寫(xiě)了個(gè)透明
shader_type canvas_item;
void fragment()
{
vec4 transparent = vec4(0.0);
vec4 img = texture(TEXTURE, UV);
float t = abs(sin(TIME));
vec4 c = mix(img, transparent, t);
COLOR = c;
}
標(biāo)簽: