Harbor

branch main
showing the latest snapshot on main
discard_select.hlsl 568 B · Plain text
gpu/shader/tests/golden/discard_select.hlsl 0644 Raw
Texture2D albedo_tex_tex : register(t0, space0);
SamplerState albedo_tex_samp : register(s1, space0);

struct _fs_main_Input {
	float4 _sv_position : SV_Position;
	float2 uv : TEXCOORD0;
};

struct _fs_main_Output {
	float4 _value : SV_Target0;
};

_fs_main_Output fs_main(_fs_main_Input input) {
	_fs_main_Output __luma_output;
	float4 color = albedo_tex_tex.Sample(albedo_tex_samp, input.uv);
	if ((color.a < 0.1)) {
		discard;
	}
	float bright = ((color.r > 0.5) ? 1.0 : 0.0);
	__luma_output._value = float4((color.rgb * bright), color.a);
	return __luma_output;
}