Godot 黑白 shader

shader_type canvas_item;

void vertex() {
	// Called for every vertex the material is visible on.
}

void fragment() {
	COLOR = texture(TEXTURE,UV);
	float a = (COLOR.r + COLOR.g + COLOR.b)/4.0;
	float b = step(0.3,a);
	COLOR.rgb = vec3(b);
	
	
	// Called for every pixel the material is visible on.
}
posted @ 2024-10-30 18:08  eva1024  阅读(16)  评论(0)    收藏  举报