Harbor

branch main
showing the latest snapshot on main
workflow_fragment.msl 524 B · Plain text
shader/tests/golden/workflow_fragment.msl 0644 Raw
#include <metal_stdlib>
using namespace metal;

struct _shade_Input {
	float2 uv [[user(locn0)]];
	float3 normal [[user(locn1)]];
};

struct _shade_Output {
	float4 color [[user(locn0)]];
};

fragment _shade_Output shade(_shade_Input input [[stage_in]],
	texture2d<float> material_tex_tex [[texture(0)]],
	sampler material_tex_samp [[sampler(0)]]) {
	_shade_Output __luma_output;
	float4 albedo = material_tex_tex.sample(material_tex_samp, input.uv);
	__luma_output.color = float4(albedo.rgb, 1.0);
	return __luma_output;
}