mirror of
https://github.com/GayPizzaSpecifications/voxelotl-engine.git
synced 2025-08-03 05:10:57 +00:00
25 lines
486 B
Metal
25 lines
486 B
Metal
#include "shadertypes.h"
|
|
|
|
#include <metal_stdlib>
|
|
|
|
using namespace metal;
|
|
|
|
struct FragmentInput {
|
|
float4 position [[position]];
|
|
float4 color;
|
|
};
|
|
|
|
vertex FragmentInput vertexMain(
|
|
uint vertexID [[vertex_id]],
|
|
device const ShaderVertex* vtx [[buffer(ShaderInputIdxVertices)]]
|
|
) {
|
|
FragmentInput out;
|
|
out.position = vtx[vertexID].position;
|
|
out.color = vtx[vertexID].color;
|
|
return out;
|
|
}
|
|
|
|
fragment float4 fragmentMain(FragmentInput in [[stage_in]]) {
|
|
return in.color;
|
|
}
|