summaryrefslogtreecommitdiffstatshomepage
path: root/3rdparty/bgfx/3rdparty/glsl-optimizer/tests/vertex/loops-forvarious-outES3Metal.txt
blob: a87dcb7854b447f3be6e1c98ac321db8f7d29e70 (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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#include <metal_stdlib>
#pragma clang diagnostic ignored "-Wparentheses-equality"
using namespace metal;
struct xlatMtlShaderInput {
  float4 _inVertex [[attribute(0)]];
};
struct xlatMtlShaderOutput {
  float4 gl_Position [[position]];
  half4 xlv_TEXCOORD0;
};
struct xlatMtlShaderUniform {
  float4x4 UNITY_MATRIX_MVP;
  float4 unity_LightAtten[4];
  float4 unity_LightColor[4];
};
vertex xlatMtlShaderOutput xlatMtlMain (xlatMtlShaderInput _mtl_i [[stage_in]], constant xlatMtlShaderUniform& _mtl_u [[buffer(0)]])
{
  xlatMtlShaderOutput _mtl_o;
  float4 l_1_1;
  float4 l_2;
  half4 tmpvar_3;
  half4 tmpvar_4;
  tmpvar_3 = half4((_mtl_u.UNITY_MATRIX_MVP * _mtl_i._inVertex));
  tmpvar_4 = half4(_mtl_u.unity_LightColor[0]);
  tmpvar_4 = half4(((float4)tmpvar_4 + _mtl_u.unity_LightColor[1]));
  tmpvar_4 = half4(((float4)tmpvar_4 + _mtl_u.unity_LightColor[0]));
  tmpvar_4 = half4(((float4)tmpvar_4 + _mtl_u.unity_LightColor[1]));
  tmpvar_4 = half4(((float4)tmpvar_4 + _mtl_u.unity_LightColor[2]));
  tmpvar_4 = half4(((float4)tmpvar_4 + _mtl_u.unity_LightColor[3]));
  tmpvar_4 = half4(((float4)tmpvar_4 + _mtl_u.unity_LightColor[3]));
  tmpvar_4 = half4(((float4)tmpvar_4 + _mtl_u.unity_LightColor[2]));
  tmpvar_4 = half4(((float4)tmpvar_4 + _mtl_u.unity_LightColor[1]));
  tmpvar_4 = half4(((float4)tmpvar_4 + _mtl_u.unity_LightColor[0]));
  l_2 = (_mtl_u.unity_LightColor[0] * _mtl_u.unity_LightAtten[0].x);
  tmpvar_4 = half4(((float4)tmpvar_4 + l_2));
  l_2 = (_mtl_u.unity_LightColor[1] * _mtl_u.unity_LightAtten[1].x);
  tmpvar_4 = half4(((float4)tmpvar_4 + l_2));
  l_1_1 = (_mtl_u.unity_LightColor[0] * _mtl_u.unity_LightAtten[0].z);
  tmpvar_4 = half4(((float4)tmpvar_4 + l_1_1));
  l_1_1 = (_mtl_u.unity_LightColor[1] * _mtl_u.unity_LightAtten[1].z);
  tmpvar_4 = half4(((float4)tmpvar_4 + l_1_1));
  tmpvar_4 = half4(((float4)tmpvar_4 + _mtl_u.unity_LightColor[1].x));
  tmpvar_4 = half4(((float4)tmpvar_4 + _mtl_u.unity_LightColor[2].x));
  _mtl_o.gl_Position = float4(tmpvar_3);
  _mtl_o.xlv_TEXCOORD0 = tmpvar_4;
  return _mtl_o;
}


// stats: 20 alu 0 tex 0 flow
// inputs: 1
//  #0: _inVertex (high float) 4x1 [-1] loc 0
// uniforms: 3 (total size: 192)
//  #0: UNITY_MATRIX_MVP (high float) 4x4 [-1] loc 0
//  #1: unity_LightAtten (high float) 4x1 [4] loc 64
//  #2: unity_LightColor (high float) 4x1 [4] loc 128