Harbor

branch main
showing the latest snapshot on main
discard_select.glsl 347 B · Plain text
gpu/shader/tests/golden/discard_select.glsl 0644 Raw
#version 450

layout(set = 0, binding = 0) uniform sampler2D albedo_tex;

layout(location = 0) in vec2 in_uv;
layout(location = 0) out vec4 out__value;

void main() {
	vec4 color = texture(albedo_tex, in_uv);
	if ((color.a < 0.1)) {
		discard;
	}
	float bright = ((color.r > 0.5) ? 1.0 : 0.0);
	out__value = vec4((color.rgb * bright), color.a);
}