Ok got it!
This is what I ended up using! Thank you both!
float3 outColor;
float2 uv;
};
void drawSomething(thread Context *context) {
float d = length(context->uv);
context->outColor *= d;
}
fragment float4 pointer(VertexOut input[[stage_in]]) {
float2 uv = input.textureCoordinate;
Context context;
context.outColor = float3(0.5, 0.5, 0.0);
context.uv = uv;
drawSomething(&context);
return float4(context.outColor.x, context.outColor.y, 0, 1);
}
Topic:
Graphics & Games
SubTopic:
General
Tags: