//water in map screen
cbuffer cb_object1 : register(b0)
{
  float4x4 u_mvMatrix : packoffset(c0);
  float4x4 u_mvpMatrix : packoffset(c4);
  float4x4 u_mlpMatrix : packoffset(c8);
  float4 u_tex0ScaleOffset : packoffset(c12);
}

cbuffer cb_object2 : register(b1)
{
  float2 u_bumpTranslation0 : packoffset(c0);
  float2 u_bumpScale0 : packoffset(c0.z);
  float2 u_bumpTranslation1 : packoffset(c1);
  float2 u_bumpScale1 : packoffset(c1.z);
  float3 u_eyePosition : packoffset(c2);
  float4 u_refractionColor : packoffset(c3);
  float u_bumpMasterScale : packoffset(c4);
}

cbuffer cb_object3 : register(b2)
{
  float2 u_depthRange : packoffset(c0);
  float3 u_lightPosition : packoffset(c1);
  float4 u_diffuseColor : packoffset(c2);
  float4 u_fogColor : packoffset(c3);
  float u_fogMinDistance : packoffset(c4);
}

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

void main(
  float4 v0 : POSITION0,
  float3 v1 : NORMAL0,
  float2 v2 : TEXCOORD0,
  out float4 o0 : SV_Position0,
  out float3 o1 : COLOR0,
  out float p1 : COLOR3,
  out float3 o2 : COLOR1,
  out float3 o3 : COLOR2,
  out float2 o4 : TEXCOORD0,
  out float2 p4 : TEXCOORD1,
  out float3 o5 : COLOR4,
  out float3 o6 : COLOR6)
{
  float4 r0,r1;
  uint4 bitmask, uiDest;
  float4 fDest;

  r0.z = dot(v0.xyzw, u_mvpMatrix._m02_m12_m22_m32);
  r0.w = dot(v0.xyzw, u_mvpMatrix._m03_m13_m23_m33);
  r0.x = dot(v0.xyzw, u_mvpMatrix._m00_m10_m20_m30);
  r0.y = dot(v0.xyzw, u_mvpMatrix._m01_m11_m21_m31);
  o0.xyzw = r0.xyzw;

float4 r10 = r0;
float4 stereo = StereoParams.Load(0);
r10.x += stereo.x*(r0.w - stereo.y);

  r1.x = dot(r0.xyz, r0.xyz);
  r1.x = sqrt(r1.x);
  r1.x = -8.000000000e+000 + r1.x;
  r1.x = max(r1.x, 0.000000000e+000);
  r1.x = -u_fogColor.w * r1.x;
  p1.x = exp2(r1.x);
  o1.x = dot(r0.xyzw, u_mlpMatrix._m00_m10_m20_m30);
  o1.y = dot(r0.xyzw, u_mlpMatrix._m01_m11_m21_m31);
  o1.z = dot(r0.xyzw, u_mlpMatrix._m02_m12_m22_m32);

 o5.xyz = r10.xyw;

  o2.xyz = float3(0.000000e+000,0.000000e+000,0.000000e+000);
  o3.xyz = float3(0.000000e+000,0.000000e+000,0.000000e+000);
  o4.xy = v0.xy * u_bumpScale0.xy + u_bumpTranslation0.xy;
  p4.xy = v0.xy * u_bumpScale1.xy + u_bumpTranslation1.xy;
  o6.xyz = u_eyePosition.xyz + -v0.xyz;
  return;
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) HLSL Shader Compiler 9.29.952.3111
//
//
// Buffer Definitions: 
//
// cbuffer cb_object1
// {
//
//   float4x4 u_mvMatrix;               // Offset:    0 Size:    64 [unused]
//   float4x4 u_mvpMatrix;              // Offset:   64 Size:    64
//   float4x4 u_mlpMatrix;              // Offset:  128 Size:    64
//   float4 u_tex0ScaleOffset;          // Offset:  192 Size:    16 [unused]
//
// }
//
// cbuffer cb_object2
// {
//
//   float2 u_bumpTranslation0;         // Offset:    0 Size:     8
//   float2 u_bumpScale0;               // Offset:    8 Size:     8
//   float2 u_bumpTranslation1;         // Offset:   16 Size:     8
//   float2 u_bumpScale1;               // Offset:   24 Size:     8
//   float3 u_eyePosition;              // Offset:   32 Size:    12
//   float4 u_refractionColor;          // Offset:   48 Size:    16 [unused]
//   float u_bumpMasterScale;           // Offset:   64 Size:     4 [unused]
//
// }
//
// cbuffer cb_object3
// {
//
//   float2 u_depthRange;               // Offset:    0 Size:     8 [unused]
//   float3 u_lightPosition;            // Offset:   16 Size:    12 [unused]
//   float4 u_diffuseColor;             // Offset:   32 Size:    16 [unused]
//   float4 u_fogColor;                 // Offset:   48 Size:    16
//   float u_fogMinDistance;            // Offset:   64 Size:     4 [unused]
//
// }
//
//
// Resource Bindings:
//
// Name                                 Type  Format         Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// cb_object1                        cbuffer      NA          NA    0        1
// cb_object2                        cbuffer      NA          NA    1        1
// cb_object3                        cbuffer      NA          NA    2        1
//
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// POSITION                 0   xyzw        0     NONE   float   xyzw
// NORMAL                   0   xyz         1     NONE   float       
// TEXCOORD                 0   xy          2     NONE   float       
//
//
// Output signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_Position              0   xyzw        0      POS   float   xyzw
// COLOR                    0   xyz         1     NONE   float   xyz 
// COLOR                    3      w        1     NONE   float      w
// COLOR                    1   xyz         2     NONE   float   xyz 
// COLOR                    2   xyz         3     NONE   float   xyz 
// TEXCOORD                 0   xy          4     NONE   float   xy  
// TEXCOORD                 1     zw        4     NONE   float     zw
// COLOR                    4   xyz         5     NONE   float   xyz 
// COLOR                    6   xyz         6     NONE   float   xyz 
//
vs_4_0
dcl_constantbuffer cb0[11], immediateIndexed
dcl_constantbuffer cb1[3], immediateIndexed
dcl_constantbuffer cb2[4], immediateIndexed
dcl_input v0.xyzw
dcl_output_siv o0.xyzw, position
dcl_output o1.xyz
dcl_output o1.w
dcl_output o2.xyz
dcl_output o3.xyz
dcl_output o4.xy
dcl_output o4.zw
dcl_output o5.xyz
dcl_output o6.xyz
dcl_temps 2
dp4 r0.z, v0.xyzw, cb0[6].xyzw
dp4 r0.w, v0.xyzw, cb0[7].xyzw
dp4 r0.x, v0.xyzw, cb0[4].xyzw
dp4 r0.y, v0.xyzw, cb0[5].xyzw
mov o0.xyzw, r0.xyzw
dp3 r1.x, r0.xyzx, r0.xyzx
sqrt r1.x, r1.x
add r1.x, r1.x, l(-8.000000)
max r1.x, r1.x, l(0.000000)
mul r1.x, r1.x, -cb2[3].w
exp o1.w, r1.x
dp4 o1.x, r0.xyzw, cb0[8].xyzw
dp4 o1.y, r0.xyzw, cb0[9].xyzw
dp4 o1.z, r0.xyzw, cb0[10].xyzw
mov o5.xyz, r0.xywx
mov o2.xyz, l(0,0,0,0)
mov o3.xyz, l(0,0,0,0)
mad o4.xy, v0.xyxx, cb1[0].zwzz, cb1[0].xyxx
mad o4.zw, v0.xxxy, cb1[1].zzzw, cb1[1].xxxy
add o6.xyz, -v0.xyzx, cb1[2].xyzx
ret 
// Approximately 21 instruction slots used

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
