2019-06-05 17:35:46 -04:00
|
|
|
// Automatically generated from files in pathfinder/shaders/. Do not edit!
|
2019-06-05 20:20:12 -04:00
|
|
|
#include <metal_stdlib>
|
|
|
|
#include <simd/simd.h>
|
|
|
|
|
|
|
|
using namespace metal;
|
|
|
|
|
2019-06-05 17:35:46 -04:00
|
|
|
struct spvDescriptorSetBuffer0
|
|
|
|
{
|
|
|
|
constant float4* uGridlineColor [[id(0)]];
|
|
|
|
constant float4* uGroundColor [[id(1)]];
|
|
|
|
};
|
|
|
|
|
2019-06-05 20:20:12 -04:00
|
|
|
struct main0_out
|
|
|
|
{
|
|
|
|
float4 oFragColor [[color(0)]];
|
|
|
|
};
|
|
|
|
|
|
|
|
struct main0_in
|
|
|
|
{
|
|
|
|
float2 vTexCoord [[user(locn0)]];
|
|
|
|
};
|
|
|
|
|
2019-06-05 17:35:46 -04:00
|
|
|
fragment main0_out main0(main0_in in [[stage_in]], constant spvDescriptorSetBuffer0& spvDescriptorSet0 [[buffer(0)]])
|
2019-06-05 20:20:12 -04:00
|
|
|
{
|
|
|
|
main0_out out = {};
|
|
|
|
float2 texCoordPx = fract(in.vTexCoord) / fwidth(in.vTexCoord);
|
2020-02-20 17:22:07 -05:00
|
|
|
out.oFragColor = select((*spvDescriptorSet0.uGroundColor), (*spvDescriptorSet0.uGridlineColor), bool4(any(texCoordPx <= float2(1.0))));
|
2019-06-05 20:20:12 -04:00
|
|
|
return out;
|
|
|
|
}
|
|
|
|
|