blob: 310cef2db24a8afdfee06da7ccd35d2278f9a51f (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
#include <metal_stdlib>
#pragma clang diagnostic ignored "-Wparentheses-equality"
using namespace metal;
struct xlatMtlShaderInput {
float4 _inVertex [[attribute(0)]];
half3 _inNormal [[attribute(1)]];
float2 _uv0 [[attribute(2)]];
half4 _color [[attribute(3)]];
};
struct xlatMtlShaderOutput {
float4 gl_Position [[position]];
half2 xlv_TEXCOORD0;
half4 xlv_COLOR;
};
struct xlatMtlShaderUniform {
float4x4 mvp;
};
vertex xlatMtlShaderOutput xlatMtlMain (xlatMtlShaderInput _mtl_i [[stage_in]], constant xlatMtlShaderUniform& _mtl_u [[buffer(0)]])
{
xlatMtlShaderOutput _mtl_o;
half2 tmpvar_1;
half4 tmpvar_2;
tmpvar_2.w = _mtl_i._color.w;
tmpvar_2.xyz = (_mtl_i._color.xyz + _mtl_i._inNormal);
tmpvar_1 = half2(_mtl_i._uv0);
_mtl_o.gl_Position = (_mtl_u.mvp * _mtl_i._inVertex);
_mtl_o.xlv_TEXCOORD0 = tmpvar_1;
_mtl_o.xlv_COLOR = tmpvar_2;
return _mtl_o;
}
// stats: 2 alu 0 tex 0 flow
// inputs: 4
// #0: _inVertex (high float) 4x1 [-1] loc 0
// #1: _inNormal (medium float) 3x1 [-1] loc 1
// #2: _uv0 (high float) 2x1 [-1] loc 2
// #3: _color (low float) 4x1 [-1] loc 3
// uniforms: 1 (total size: 64)
// #0: mvp (high float) 4x4 [-1] loc 0
|