Harbor

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

struct _shade_Input {
	float value [[user(locn0)]];
};

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

fragment _shade_Output shade(_shade_Input input [[stage_in]]) {
	_shade_Output __luma_output;
	float3 zero3 = float3(0.0, 0.0, 0.0);
	float4 one4 = float4(1.0, 1.0, 1.0, 1.0);
	float2 half2 = float2(0.5, 0.5);
	float3 full = float3(1.0, 2.0, 3.0);
	float x = input.value;
	float4 splatted = float4(x, x, x, x);
	__luma_output._value = float4(((((zero3.x + one4.x) + half2.x) + full.x) + splatted.x), 0.0, 0.0, 1.0);
	return __luma_output;
}