macOS build fixes

This commit is contained in:
Jack Andersen 2018-10-18 14:57:16 -10:00
parent 3698199403
commit 561bdac1c4
2 changed files with 34 additions and 1 deletions

2
hecl/extern/boo vendored

@ -1 +1 @@
Subproject commit 9d91cd459ed9cf302e4e4ce2a43485d3b9b2733a
Subproject commit a8325044567a0e629fb4a04b8d23ff57225f84a9

View File

@ -58,3 +58,36 @@ float4 main(in VertToFrag vtf) : SV_Target0
{
return texs.Sample(samp, vtf.out_uv);
}
#vertex metal
struct VertData
{
float3 in_pos [[ attribute(0) ]];
float3 in_norm [[ attribute(1) ]];
float2 in_uv [[ attribute(2) ]];
};
struct VertToFrag
{
float4 position [[ position ]];
float2 out_uv;
};
vertex VertToFrag vmain(VertData v [[ stage_in ]])
{
VertToFrag ret;
ret.position = float4(v.in_pos, 1.0);
ret.out_uv = v.in_uv;
return ret;
}
#fragment metal
struct VertToFrag
{
float4 position [[ position ]];
float2 out_uv;
};
fragment float4 fmain(VertToFrag vtf [[ stage_in ]],
sampler samp [[ sampler(0) ]],
texture2d<float> tex [[ texture(0) ]])
{
return tex.sample(samp, vtf.out_uv);
}