cbuffer cb2 : register(b2)
{
  float4 cb2[19];
}

cbuffer cb1 : register(b1)
{
  float4 cb1[45];
}

cbuffer cb0 : register(b0)
{
  float4 cb0[16];
}


Texture2D<float4> StereoParams : register(t125);
Texture1D<float4> IniParams : register(t120);

void main( 
  float4 v0 : POSITION0,
  float4 v1 : TANGENT0,
  float3 v2 : NORMAL0,
  float4 v3 : TEXCOORD0,
  float4 v4 : TEXCOORD1,
  float4 v5 : TEXCOORD2,
  float4 v6 : TEXCOORD3,
  float4 v7 : COLOR0,
  out float4 o0 : SV_POSITION0,
  out float4 o1 : TEXCOORD0,
  out float4 o2 : TEXCOORD1,
  out float4 o3 : TEXCOORD2,
  out float4 o4 : TEXCOORD3,
  out float3 o5 : TEXCOORD4,
  out float p5 : TEXCOORD6)
{
  float4 r0,r1,r2,r3;
  uint4 bitmask, uiDest;
  float4 fDest;

  r0.xyzw = cb2[1].xyzw * v0.yyyy;
  r0.xyzw = cb2[0].xyzw * v0.xxxx + r0.xyzw;
  r0.xyzw = cb2[2].xyzw * v0.zzzz + r0.xyzw;
  r0.xyzw = cb2[3].xyzw * v0.wwww + r0.xyzw;
  o0.xyzw = r0.xyzw; //---------------
float4 stereo = StereoParams.Load(0);
r0.x += stereo.x*(r0.w - stereo.y);
  p5.x = r0.z;
  o1.xy = v3.xy * cb0[14].xy + cb0[14].zw;
  o1.zw = v3.xy * cb0[15].xy + cb0[15].zw;
  r0.xyz = cb2[13].xyz * v0.yyy;
  r0.xyz = cb2[12].xyz * v0.xxx + r0.xyz;
  r0.xyz = cb2[14].xyz * v0.zzz + r0.xyz;
  r0.xyz = cb2[15].xyz * v0.www + r0.xyz;
  o2.w = r0.x;
  r1.xyz = cb2[13].yzx * v1.yyy;
  r1.xyz = cb2[12].yzx * v1.xxx + r1.xyz;
  r1.xyz = cb2[14].yzx * v1.zzz + r1.xyz;
  r0.x = dot(r1.xyz, r1.xyz);
  r0.x = rsqrt(r0.x);
  r1.xyz = r1.xyz * r0.xxx;
  r2.x = cb2[16].x * v2.x;
  r2.y = cb2[17].x * v2.x;
  r2.z = cb2[18].x * v2.x;
  r3.x = cb2[16].y * v2.y;
  r3.y = cb2[17].y * v2.y;
  r3.z = cb2[18].y * v2.y;
  r2.xyz = r3.xyz + r2.xyz;
  r3.x = cb2[16].z * v2.z;
  r3.y = cb2[17].z * v2.z;
  r3.z = cb2[18].z * v2.z;
  r2.xyz = r3.xyz + r2.xyz;
  r0.x = dot(r2.xyz, r2.xyz);
  r0.x = rsqrt(r0.x);
  r2.xyz = r2.xyz * r0.xxx;
  r3.xyz = r2.zxy * r1.xyz;
  r3.xyz = r2.yzx * r1.yzx + -r3.xyz;
  r3.xyz = v1.www * r3.xyz;
  o2.y = r3.x;
  o2.x = r1.z;
  o2.z = r2.x;
  o3.x = r1.x;
  o4.x = r1.y;
  o3.w = r0.y;
  o4.w = r0.z;
  o3.z = r2.y;
  o3.y = r3.y;
  o4.y = r3.z;
  o4.z = r2.z;
  r0.x = r2.y * r2.y;
  r0.x = r2.x * r2.x + -r0.x;
  r1.xyzw = r2.xyzz * r2.yzzx;
  r3.x = dot(cb1[41].xyzw, r1.xyzw);
  r3.y = dot(cb1[42].xyzw, r1.xyzw);
  r3.z = dot(cb1[43].xyzw, r1.xyzw);
  r0.xyz = cb1[44].xyz * r0.xxx + r3.xyz;
  r2.w = 1;
  r1.x = dot(cb1[38].xyzw, r2.xyzw);
  r1.y = dot(cb1[39].xyzw, r2.xyzw);
  r1.z = dot(cb1[40].xyzw, r2.xyzw);
  o5.xyz = r1.xyz + r0.xyz;
  return;
}