// map
// ---- Created with 3Dmigoto v1.3.16 on Fri Oct 04 11:30:21 2019
Texture2D<float4> t3 : register(t3);

Texture2D<float4> t2 : register(t2);

Texture2D<float4> t1 : register(t1);

Texture2D<float4> t0 : register(t0);

SamplerState s3_s : register(s3);

SamplerState s2_s : register(s2);

SamplerState s1_s : register(s1);

SamplerState s0_s : register(s0);

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

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

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




// 3Dmigoto declarations
#define cmp -
Texture1D<float4> IniParams : register(t120);
Texture2D<float4> StereoParams : register(t125);


void main(
  float4 v0 : SV_POSITION0,
  float4 v1 : COLOR0,
  float4 v2 : ORIGINAL_POSITION0,
  float4 v3 : TEXCOORD0,
  float4 v4 : TEXCOORD1,
  out float4 o0 : SV_Target0)
{
  float4 r0,r1,r2,r3;
  uint4 bitmask, uiDest;
  float4 fDest;

  r0.xy = v4.xy * v4.zw;
  r0.zw = cb1[127].zz * float2(0.200000003,0.200000003) + r0.xy;
  r0.z = t2.Sample(s2_s, r0.zw).x;
  r0.zw = r0.zz * float2(0.0799999982,0.0799999982) + r0.xy;
  r0.z = t1.Sample(s1_s, r0.zw).x;
  r1.xy = float2(0.0799999982,0.0199999996) * cb1[127].zz;
  r1.xy = r0.xy * float2(0.5,0.5) + r1.xy;
  r0.w = t1.Sample(s1_s, r1.xy).x;
  r0.w = 0.5 * r0.w;
  r0.z = r0.z * r0.w;
  r0.z = cb2[2].x * r0.z;
  r1.xyz = t0.Sample(s0_s, r0.xy).xyz;
  r2.w = t3.Sample(s3_s, r0.xy).x;
  r2.w = saturate(r2.w);
  r0.xyz = r0.zzz * float3(0.0416666716,0.0375435688,0.0376777202) + -r1.xyz;
  r0.w = dot(r1.xyz, r1.xyz);
  r0.w = sqrt(r0.w);
  r0.w = -r0.w * 10 + 1;
  r0.w = max(0, r0.w);
  r0.xyz = r0.www * r0.xyz + r1.xyz;
  r0.xyz = cb2[1].xyz + r0.xyz;
  r2.xyz = max(float3(0,0,0), r0.xyz);
  r0.xyzw = v1.xyzw * r2.xyzw;
  r1.xyz = log2(r0.xyz);
  r1.xyz = cb0[2].xxx * r1.xyz;
  r2.xyz = float3(0.416666657,0.416666657,0.416666657) * r1.xyz;
  r1.xyz = exp2(r1.xyz);
  r2.xyz = exp2(r2.xyz);
  r2.xyz = r2.xyz * float3(1.05499995,1.05499995,1.05499995) + float3(-0.0549999997,-0.0549999997,-0.0549999997);
  r3.xyz = float3(12.9200001,12.9200001,12.9200001) * r1.xyz;
  r1.xyz = cmp(r1.xyz >= float3(0.00313066994,0.00313066994,0.00313066994));
  r1.xyz = r1.xyz ? r2.xyz : r3.xyz;
  r1.w = cmp(cb0[2].y != 1.000000);
  o0.xyz = r1.www ? r1.xyz : r0.xyz;
  o0.w = r0.w;
  return;
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) D3D Shader Disassembler
//
//   using 3Dmigoto v1.3.16 on Fri Oct 04 11:30:21 2019
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_POSITION              0   xyzw        0      POS   float
// COLOR                    0   xyzw        1     NONE   float   xyzw
// ORIGINAL_POSITION        0   xyzw        2     NONE   float
// TEXCOORD                 0   xy          3     NONE   float
// TEXCOORD                 1   xyzw        4     NONE   float   xyzw
//
//
// Output signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_Target                0   xyzw        0   TARGET   float   xyzw
//
ps_5_0
dcl_globalFlags refactoringAllowed
dcl_constantbuffer cb0[3], immediateIndexed
dcl_constantbuffer cb1[128], immediateIndexed
dcl_constantbuffer cb2[3], immediateIndexed
dcl_sampler s0, mode_default
dcl_sampler s1, mode_default
dcl_sampler s2, mode_default
dcl_sampler s3, mode_default
dcl_resource_texture2d (float,float,float,float) t0
dcl_resource_texture2d (float,float,float,float) t1
dcl_resource_texture2d (float,float,float,float) t2
dcl_resource_texture2d (float,float,float,float) t3
dcl_input_ps linear v1.xyzw
dcl_input_ps linear v4.xyzw
dcl_output o0.xyzw
dcl_temps 4
mul r0.xy, v4.zwzz, v4.xyxx
mad r0.zw, cb1[127].zzzz, l(0.000000, 0.000000, 0.200000, 0.200000), r0.xxxy
sample_indexable(texture2d)(float,float,float,float) r0.z, r0.zwzz, t2.yzxw, s2
mad r0.zw, r0.zzzz, l(0.000000, 0.000000, 0.080000, 0.080000), r0.xxxy
sample_indexable(texture2d)(float,float,float,float) r0.z, r0.zwzz, t1.yzxw, s1
mul r1.xy, cb1[127].zzzz, l(0.080000, 0.020000, 0.000000, 0.000000)
mad r1.xy, r0.xyxx, l(0.500000, 0.500000, 0.000000, 0.000000), r1.xyxx
sample_indexable(texture2d)(float,float,float,float) r0.w, r1.xyxx, t1.yzwx, s1
mul r0.w, r0.w, l(0.500000)
mul r0.z, r0.w, r0.z
mul r0.z, r0.z, cb2[2].x
sample_indexable(texture2d)(float,float,float,float) r1.xyz, r0.xyxx, t0.xyzw, s0
sample_indexable(texture2d)(float,float,float,float) r2.w, r0.xyxx, t3.yzwx, s3
mov_sat r2.w, r2.w
mad r0.xyz, r0.zzzz, l(0.0416666716, 0.0375435688, 0.0376777202, 0.000000), -r1.xyzx
dp3 r0.w, r1.xyzx, r1.xyzx
sqrt r0.w, r0.w
mad r0.w, -r0.w, l(10.000000), l(1.000000)
max r0.w, r0.w, l(0.000000)
mad r0.xyz, r0.wwww, r0.xyzx, r1.xyzx
add r0.xyz, r0.xyzx, cb2[1].xyzx
max r2.xyz, r0.xyzx, l(0.000000, 0.000000, 0.000000, 0.000000)
mul r0.xyzw, r2.xyzw, v1.xyzw
log r1.xyz, r0.xyzx
mul r1.xyz, r1.xyzx, cb0[2].xxxx
mul r2.xyz, r1.xyzx, l(0.416666657, 0.416666657, 0.416666657, 0.000000)
exp r1.xyz, r1.xyzx
exp r2.xyz, r2.xyzx
mad r2.xyz, r2.xyzx, l(1.055000, 1.055000, 1.055000, 0.000000), l(-0.055000, -0.055000, -0.055000, 0.000000)
mul r3.xyz, r1.xyzx, l(12.920000, 12.920000, 12.920000, 0.000000)
ge r1.xyz, r1.xyzx, l(0.00313066994, 0.00313066994, 0.00313066994, 0.000000)
movc r1.xyz, r1.xyzx, r2.xyzx, r3.xyzx
ne r1.w, cb0[2].y, l(1.000000)
movc o0.xyz, r1.wwww, r1.xyzx, r0.xyzx
mov o0.w, r0.w
ret
// Approximately 0 instruction slots used

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