1#include <metal_stdlib> 2#include <simd/simd.h> 3using namespace metal; 4struct Uniforms { 5 float4 sk_RTAdjust; 6}; 7struct Inputs { 8 float4 pos [[attribute(0)]]; 9}; 10struct Outputs { 11 float4 sk_Position [[position]]; 12 float sk_PointSize [[point_size]]; 13}; 14vertex Outputs vertexMain(Inputs _in [[stage_in]], constant Uniforms& _uniforms [[buffer(0)]], uint sk_VertexID [[vertex_id]], uint sk_InstanceID [[instance_id]]) { 15 Outputs _out; 16 (void)_out; 17 _out.sk_Position = _in.pos; 18 _out.sk_Position = float4(_out.sk_Position.xy * _uniforms.sk_RTAdjust.xz + _out.sk_Position.ww * _uniforms.sk_RTAdjust.yw, 0.0, _out.sk_Position.w); 19 return _out; 20} 21