//Brightness censorship. Jotaro.
// ---- Created with 3Dmigoto v1.3.16 on Sun Sep 04 16:14:00 2022

cbuffer perMaterialBuffer : register(b0)
{
  row_major float4x4 transform : packoffset(c0);
  float4 uvCenterAndInvLengthAndInvThreshold : packoffset(c4);
  float4 scale : packoffset(c5);
  float4 colorCenter : packoffset(c6);
  float4 colorInner : packoffset(c7);
  float4 colorOuter : packoffset(c8);
  float4 size : packoffset(c9);
}



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


void main(
  float4 v0 : SV_POSITION0,
  float2 v1 : TEXCOORD0,
  out float4 o0 : SV_Target0)
{
  float4 r0,r1,r2;
  uint4 bitmask, uiDest;
  float4 fDest;
  
  float4 iniparams10 = IniParams.Load(int2(10,0));
  if (iniparams10.z==0) {
    discard;
  }
  
  r0.xy = uvCenterAndInvLengthAndInvThreshold.xy + -v1.xy;
  r0.x = dot(r0.xy, r0.xy);
  r0.x = sqrt(r0.x);
  r0.x = saturate(uvCenterAndInvLengthAndInvThreshold.z * r0.x);
  r0.y = -scale.z + r0.x;
  r0.x = saturate(uvCenterAndInvLengthAndInvThreshold.w * r0.x);
  r0.y = saturate(scale.w * r0.y);
  r1.xyzw = colorInner.xyzw + -colorCenter.xyzw;
  r1.xyzw = r0.xxxx * r1.xyzw + colorCenter.xyzw;
  r2.xyzw = colorOuter.xyzw + -r1.xyzw;
  o0.xyzw = r0.yyyy * r2.xyzw + r1.xyzw;
  return;
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) HLSL Shader Compiler 6.3.9600.16384
//
//   using 3Dmigoto v1.3.16 on Sun Sep 04 16:14:00 2022
//
//
// Buffer Definitions:
//
// cbuffer perMaterialBuffer
// {
//
//   row_major float4x4 transform;      // Offset:    0 Size:    64 [unused]
//   float4 uvCenterAndInvLengthAndInvThreshold;// Offset:   64 Size:    16
//   float4 scale;                      // Offset:   80 Size:    16
//   float4 colorCenter;                // Offset:   96 Size:    16
//   float4 colorInner;                 // Offset:  112 Size:    16
//   float4 colorOuter;                 // Offset:  128 Size:    16
//   float4 size;                       // Offset:  144 Size:    16 [unused]
//
// }
//
//
// Resource Bindings:
//
// Name                                 Type  Format         Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// perMaterialBuffer                 cbuffer      NA          NA    0        1
//
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_POSITION              0   xyzw        0      POS   float
// TEXCOORD                 0   xy          1     NONE   float   xy
//
//
// Output signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_Target                0   xyzw        0   TARGET   float   xyzw
//
ps_4_0
dcl_constantbuffer cb0[9], immediateIndexed
dcl_input_ps linear v1.xy
dcl_output o0.xyzw
dcl_temps 3
add r0.xy, -v1.xyxx, cb0[4].xyxx
dp2 r0.x, r0.xyxx, r0.xyxx
sqrt r0.x, r0.x
mul_sat r0.x, r0.x, cb0[4].z
add r0.y, r0.x, -cb0[5].z
mul_sat r0.x, r0.x, cb0[4].w
mul_sat r0.y, r0.y, cb0[5].w
add r1.xyzw, -cb0[6].xyzw, cb0[7].xyzw
mad r1.xyzw, r0.xxxx, r1.xyzw, cb0[6].xyzw
add r2.xyzw, -r1.xyzw, cb0[8].xyzw
mad o0.xyzw, r0.yyyy, r2.xyzw, r1.xyzw
ret
// Approximately 12 instruction slots used

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