//Glass Halo, Water Halo - Disable
//7e07349b3a9f89f0 VS

SamplerState samplerTPC0_s : register(s0);
Texture2D<float4> mapTPC0 : register(t0);

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

void main( 
  float4 v0 : SV_POSITION0,
  float4 v1 : COLOR0,
  float2 v2 : TEXCOORD0,
  out float4 o0 : SV_TARGET0)
{
  float4 r0,r1;
  uint4 bitmask, uiDest;
  float4 fDest;

  r0.xyzw = mapTPC0.Sample(samplerTPC0_s, v2.xy).xyzw;
  
  //float4 stereo = StereoParams.Load(0);
  //r1.x -= stereo.x * (r0.z - stereo.y);
  
  r1.x = max(r0.x, r0.y);
  r1.x = max(r1.x, r0.z);
  r1.x = 1 / r1.x;
  r1.x = saturate(r1.x);
  r0.w = 1;
    
  o0.xyzw = r1.xxxx * r0.xyzw;
   
  o0 = 0;
  
  return;
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) HLSL Shader Compiler 9.27.952.3022
//
//   using 3Dmigoto v1.2.6 on Mon Nov 09 22:58:36 2015
//
//
// Resource Bindings:
//
// Name                                 Type  Format         Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// samplerTPC0                       sampler      NA          NA    0        1
// mapTPC0                           texture  float4          2d    0        1
//
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_POSITION              0   xyzw        0      POS   float       
// COLOR                    0   xyzw        1     NONE   float       
// TEXCOORD                 0   xy          2     NONE   float   xy  
//
//
// Output signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_TARGET                0   xyzw        0   TARGET   float   xyzw
//
ps_4_0
dcl_sampler s0, mode_default
dcl_resource_texture2d (float,float,float,float) t0
dcl_input_ps linear v2.xy
dcl_output o0.xyzw
dcl_temps 2
sample r0.xyzw, v2.xyxx, t0.xyzw, s0
max r1.x, r0.y, r0.x
max r1.x, r0.z, r1.x
div r1.x, l(1.000000, 1.000000, 1.000000, 1.000000), r1.x
mov_sat r1.x, r1.x
mov r0.w, l(1.000000)
mul o0.xyzw, r0.xyzw, r1.xxxx
ret 
// Approximately 8 instruction slots used

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