//2D particles to stereoize. Chapter 12.
// ---- Created with 3Dmigoto v1.3.16 on Fri Oct  8 19:09:34 2021
//
//cbuffer vblock : register(b0)
//{
//  float4 gpuparticle_image_offset : packoffset(c0);
//  float4 gpuparticlerendervsparm0 : packoffset(c1);
//  float4 globalvieworigin : packoffset(c2);
//  float4 gpuparticlerendervsparm2 : packoffset(c3);
//  float4 viewmatrixz : packoffset(c4);
//  float4 gpuparticlerendervsparm4 : packoffset(c5);
//  float4 mvpmatrixx : packoffset(c6);
//  float4 mvpmatrixy : packoffset(c7);
//  float4 mvpmatrixz : packoffset(c8);
//  float4 mvpmatrixw : packoffset(c9);
//  float4 gpuparticlerendervsparm3 : packoffset(c10);
//  float4 gpuparticlecolor1 : packoffset(c11);
//  float4 gpuparticlerendervsparm5 : packoffset(c12);
//  float4 gpuparticlecolor2 : packoffset(c13);
//  float4 vfxdynamicvpparam0 : packoffset(c14);
//  float4 gpuparticlerendervsparm6 : packoffset(c15);
//  float4 gpuparticlerendervsparm7 : packoffset(c16);
//  float4 gpuparticlerendervsparm1 : packoffset(c17);
//  float4 vfxgenericparam9 : packoffset(c18);
//  float4 vfxiblparm : packoffset(c19);
//  float4 iblparmpbr : packoffset(c20);
//  float4 enlightenlightingtype : packoffset(c21);
//  float4 enlpppiparam0 : packoffset(c22);
//  float4 enlpppiparam1 : packoffset(c23);
//  float4 enlpppiparam2 : packoffset(c24);
//  float4 enlboostparm : packoffset(c25);
//  float4 enlightenfactor : packoffset(c26);
//  float4 lightprepassparallelcolor0 : packoffset(c27);
//  float4 lightcolors0 : packoffset(c28);
//  float4 lightpositions0 : packoffset(c29);
//  float4 lightclipboundingvolumeorigin0 : packoffset(c30);
//  float4 lightclipboundingvolumeextent0 : packoffset(c31);
//  float4 lightextentses0 : packoffset(c32);
//  float4 lightcenters0 : packoffset(c33);
//  float4 lightrightdir0 : packoffset(c34);
//  float4 lightspotdir0 : packoffset(c35);
//  float4 lightcolors1 : packoffset(c36);
//  float4 lightpositions1 : packoffset(c37);
//  float4 lightclipboundingvolumeorigin1 : packoffset(c38);
//  float4 lightclipboundingvolumeextent1 : packoffset(c39);
//  float4 lightextentses1 : packoffset(c40);
//  float4 lightcenters1 : packoffset(c41);
//  float4 lightrightdir1 : packoffset(c42);
//  float4 lightspotdir1 : packoffset(c43);
//  float4 lightcolors2 : packoffset(c44);
//  float4 lightpositions2 : packoffset(c45);
//  float4 lightclipboundingvolumeorigin2 : packoffset(c46);
//  float4 lightclipboundingvolumeextent2 : packoffset(c47);
//  float4 lightextentses2 : packoffset(c48);
//  float4 lightcenters2 : packoffset(c49);
//  float4 lightrightdir2 : packoffset(c50);
//  float4 lightspotdir2 : packoffset(c51);
//  float4 lightcolors3 : packoffset(c52);
//  float4 lightpositions3 : packoffset(c53);
//  float4 lightclipboundingvolumeorigin3 : packoffset(c54);
//  float4 lightclipboundingvolumeextent3 : packoffset(c55);
//  float4 lightextentses3 : packoffset(c56);
//  float4 lightcenters3 : packoffset(c57);
//  float4 lightrightdir3 : packoffset(c58);
//  float4 lightspotdir3 : packoffset(c59);
//}
//
//SamplerState envirradiancetex_samp_state_s : register(s4);
//SamplerState enlpppi_indirectionsamplerrgb_samp_state_s : register(s5);
//SamplerState enlpppi_indirectionsampler_samp_state_s : register(s6);
//Texture2D<float4> gpuparticle_position_vertex_buff_samp : register(t0);
//Texture2D<float4> gpuparticle_texcoord0_vertex_buff_samp : register(t1);
//Texture2D<float4> gpuparticle_param0_vertex_buff_samp : register(t2);
//Texture2D<float4> gpuparticle_velocity_vertex_buff_samp : register(t3);
//TextureCube<float4> envirradiancetex_samp : register(t4);
//Texture3D<float4> enlpppi_indirectionsamplerrgb_samp : register(t5);
//Texture3D<float4> enlpppi_indirectionsampler_samp : register(t6);
//
//
//// 3Dmigoto declarations
//#define cmp -
//Texture1D<float4> IniParams : register(t120);
//Texture2D<float4> StereoParams : register(t125);
//
//
//void main(
//  uint v0 : SV_VertexID0,
//  out float4 o0 : TEXCOORD0,
//  out float4 o1 : TEXCOORD1,
//  out float4 o2 : TEXCOORD2,
//  out float4 o3 : TEXCOORD3,
//  out float4 o4 : SV_Position0)
//{
//// Needs manual fix for instruction:
//// unknown dcl_: dcl_input_sgv v0.x, vertex_id
//  float4 r0,r1,r2,r3,r4,r5,r6,r7,r8,r9,r10,r11;
//  uint4 bitmask, uiDest;
//  float4 fDest;
//
//  uiDest.x = (uint)v0.x / 6;
//  r0.x = uiDest.x;
//  r0.y = (uint)gpuparticle_image_offset.x;
//  r0.y = (int)r0.y + (int)r0.x;
//  uiDest.x = (uint)r0.y / 384;
//  r2.x = (uint)r0.y % 384;
//  r1.x = uiDest.x;
//  r2.y = r1.x;
//  r2.zw = float2(0,0);
//  r1.xyzw = gpuparticle_position_vertex_buff_samp.Load(r2.xyw).xyzw;
//  r0.yzw = gpuparticlerendervsparm0.xyz + r1.xyz;
//  r1.xyz = -globalvieworigin.xyz + r0.yzw;
//  r3.x = cmp(gpuparticlerendervsparm2.w != 0.000000);
//  r4.xyz = -r1.xyz;
//  r4.w = 9.99999975e-05 + r4.z;
//  r3.y = dot(r4.xyw, r4.xyw);
//  r3.y = rsqrt(r3.y);
//  r3.yzw = r4.xyw * r3.yyy;
//  r3.yzw = r3.yzw * gpuparticlerendervsparm2.www + r1.xyz;
//  r3.xyz = r3.xxx ? r3.yzw : r1.xyz;
//  r3.w = 1;
//  r1.x = dot(r3.xyzw, viewmatrixz.xyzw);
//  r1.yz = cmp(gpuparticlerendervsparm4.xz >= float2(0,0));
//  r4.xy = cmp(float2(0,0) < gpuparticlerendervsparm4.yw);
//  r1.yz = r1.yz ? r4.xy : 0;
//  r3.w = cmp(gpuparticlerendervsparm4.x >= -r1.x);
//  r4.x = gpuparticlerendervsparm4.x + r1.x;
//  r4.x = r4.x / gpuparticlerendervsparm4.y;
//  r3.w = r3.w ? r4.x : 0;
//  r1.y = r1.y ? r3.w : 0;
//  r3.w = cmp(-r1.x >= gpuparticlerendervsparm4.z);
//  r4.x = -gpuparticlerendervsparm4.z + -r1.x;
//  r4.x = r4.x / gpuparticlerendervsparm4.w;
//  r3.w = r3.w ? r4.x : r1.y;
//  r1.y = saturate(r1.z ? r3.w : r1.y);
//  r1.y = 1 + -r1.y;
//  r1.z = cmp(0 >= r1.y);
//  r3.w = cmp(r1.w == -1.000000);
//  r1.z = (int)r1.z | (int)r3.w;
//  o0.xyzw = float4(0,0,0,0);
//  o1.xyzw = float4(0,0,0,0);
//  o2.xyzw = float4(0,0,0,0);
//  o3.xyzw = float4(0,0,0,0);
//  o4.xyzw = float4(1e+09,1e+09,1e+09,0);
//  if (r1.z != 0) return;
//  r0.x = mad((int)r0.x, -6, (int)v0.x);
//  r4.xyzw = gpuparticle_texcoord0_vertex_buff_samp.Load(r2.xyw).xyzw;
//  r5.xyzw = gpuparticle_param0_vertex_buff_samp.Load(r2.xyw).xyzw;
//  r6.xyzw = cmp((int4)r0.xxxx == int4(0,3,2,4));
//  r0.x = (int)r6.y | (int)r6.x;
//  r6.xyzw = (int4)r6.zwzw | (int4)r0.xxxx;
//  r0.x = r6.z ? 1.000000 : 0;
//  r6.xyzw = r6.xyzw ? float4(1,1,0,0) : float4(-1,-1,1,1);
//  r1.z = cmp(1.5 < r5.w);
//  r3.w = -3 + r5.w;
//  r1.z = r1.z ? r3.w : r5.w;
//  r7.xyz = r4.xyz * r6.xxx + r3.xyz;
//  r7.xyz = r5.xyz * r6.yyy + r7.xyz;
//  r7.w = 1;
//  r6.x = dot(r7.xyzw, mvpmatrixx.xyzw);
//  r6.y = dot(r7.xyzw, mvpmatrixy.xyzw);
//  o4.z = dot(r7.xyzw, mvpmatrixz.xyzw);
//  r3.w = dot(r7.xyzw, mvpmatrixw.xyzw);
//  r5.w = -gpuparticlerendervsparm3.y + r1.w;
//  r5.w = saturate(r5.w / gpuparticlerendervsparm3.z);
//  r7.w = cmp(0 < gpuparticlerendervsparm0.w);
//  r1.w = saturate(r1.w / gpuparticlerendervsparm3.w);
//  r1.w = r7.w ? r1.w : 1;
//  r8.w = gpuparticlecolor1.w * r1.w;
//  r8.xyz = -r1.zzz * gpuparticlerendervsparm5.yyy + gpuparticlecolor1.xyz;
//  r9.xyz = -r1.zzz * gpuparticlerendervsparm5.yyy + gpuparticlecolor2.xyz;
//  r1.z = gpuparticlerendervsparm3.x * r5.w;
//  r9.xyz = r9.xyz + -r8.xyz;
//  r9.w = -gpuparticlecolor1.w * r1.w + gpuparticlecolor2.w;
//  r8.xyzw = r1.zzzz * r9.xyzw + r8.xyzw;
//  r1.z = max(r8.x, r8.y);
//  r1.z = max(r1.z, r8.z);
//  r9.xy = cmp(float2(0,0.899999976) < vfxdynamicvpparam0.yw);
//  r1.w = cmp(vfxdynamicvpparam0.y < 1);
//  r1.w = r1.w ? r9.x : 0;
//  r5.w = cmp(r1.z >= vfxdynamicvpparam0.y);
//  r7.w = 1 + -vfxdynamicvpparam0.y;
//  r7.w = vfxdynamicvpparam0.x / r7.w;
//  r1.z = -vfxdynamicvpparam0.y + r1.z;
//  r1.z = r7.w * r1.z;
//  r1.z = r5.w ? r1.z : 0;
//  r1.z = r1.w ? r1.z : vfxdynamicvpparam0.x;
//  o1.xyz = r8.xyz * r1.zzz;
//  r1.y = r8.w * r1.y;
//  r1.z = cmp(0 >= r1.y);
//  o4.w = r1.z ? 0 : r3.w;
//  r1.z = cmp(0 < r4.w);
//  r1.w = r1.z ? 1 : -1;
//  r0.x = r1.z ? r6.z : r0.x;
//  o1.w = gpuparticlerendervsparm0.w * r1.y;
//  r8.xyzw = cmp(-r1.xxxx >= gpuparticlerendervsparm6.xyzw);
//  r10.xyzw = cmp(gpuparticlerendervsparm6.xyzw >= -r1.xxxx);
//  r1.yz = gpuparticlerendervsparm6.yw + -gpuparticlerendervsparm6.xz;
//  r9.xz = cmp(float2(0,0) < r1.yz);
//  r11.xy = -gpuparticlerendervsparm6.xz + -r1.xx;
//  r1.yz = r11.xy / r1.yz;
//  r1.y = r9.x ? r1.y : 0;
//  r8.xyz = r8.xyz ? r10.yzw : 0;
//  r4.w = cmp(gpuparticlerendervsparm6.z < 0);
//  r4.w = (int)r4.w | (int)r8.y;
//  r5.w = r4.w ? 1.000000 : 0;
//  r1.y = r8.x ? r1.y : r5.w;
//  r4.w = (int)r4.w | (int)r8.x;
//  r1.z = 1 + r1.z;
//  r1.z = r9.z ? r1.z : 1;
//  r8.xy = cmp(gpuparticlerendervsparm7.xy >= -r1.xx);
//  r5.w = r8.x ? r8.w : 0;
//  r6.z = cmp(gpuparticlerendervsparm7.x < 0);
//  r5.w = (int)r5.w | (int)r6.z;
//  r6.z = r5.w ? 2.000000 : 0;
//  r1.z = r8.z ? r1.z : r6.z;
//  r5.w = (int)r5.w | (int)r8.z;
//  r8.xz = cmp(-r1.xx >= gpuparticlerendervsparm7.xy);
//  r6.z = r8.y ? r8.x : 0;
//  r7.w = gpuparticlerendervsparm7.y + -gpuparticlerendervsparm7.x;
//  r8.x = cmp(0 < r7.w);
//  r8.y = -gpuparticlerendervsparm7.x + -r1.x;
//  r7.w = r8.y / r7.w;
//  r7.w = 2 + r7.w;
//  r7.w = r8.x ? r7.w : 2;
//  r1.x = cmp(1e+10 >= -r1.x);
//  r1.x = r1.x ? r8.z : 0;
//  r1.x = r1.x ? 3.000000 : 0;
//  r1.x = r6.z ? r7.w : r1.x;
//  r1.x = r5.w ? r1.z : r1.x;
//  r1.x = r4.w ? r1.y : r1.x;
//  r1.x = r10.x ? 0 : r1.x;
//  r1.y = 1 / gpuparticlerendervsparm1.w;
//  r1.z = floor(r1.x);
//  r0.x = r1.z + r0.x;
//  o0.x = r0.x * r1.y;
//  o2.w = frac(r1.x);
//  if (r9.y != 0) {
//    r2.xyzw = gpuparticle_velocity_vertex_buff_samp.Load(r2.xyz).xyzw;
//    r0.x = dot(r2.xyz, r2.xyz);
//    r0.x = rsqrt(r0.x);
//    r2.xyz = r2.xyz * r0.xxx;
//    r2.xyz = -r2.xyz * r2.www + r7.xyz;
//    r2.w = 1;
//    r7.x = dot(r2.xyzw, mvpmatrixx.xyzw);
//    r7.y = dot(r2.xyzw, mvpmatrixy.xyzw);
//    r0.x = dot(r2.xyzw, mvpmatrixw.xyzw);
//    r1.xz = r6.xy / r3.ww;
//    r2.xy = r1.xz * float2(0.5,0.5) + float2(0.5,0.5);
//    r1.xz = r7.xy / r0.xx;
//    r7.xy = r1.xz * float2(0.5,0.5) + float2(0.5,0.5);
//    r7.z = 1 + -r7.y;
//    r2.z = 1 + -r2.y;
//    r2.xy = -r7.xz + r2.xz;
//    r2.z = 1;
//  } else {
//    r2.xyz = float3(0,0,0);
//  }
//  r0.x = dot(r4.xyz, r4.xyz);
//  r0.x = rsqrt(r0.x);
//  r4.xyz = r4.yzx * r0.xxx;
//  r1.xzw = r4.xyz * r1.www;
//  r0.x = dot(r5.xyz, r5.xyz);
//  r0.x = rsqrt(r0.x);
//  r4.xyz = r5.zxy * r0.xxx;
//  r5.xyz = -r4.xyz * r1.xzw;
//  r1.xzw = -r4.zxy * r1.zwx + -r5.xyz;
//  r0.x = dot(r1.xzw, r1.xzw);
//  r0.x = rsqrt(r0.x);
//  r1.xzw = r1.xzw * r0.xxx;
//  r0.x = dot(-r3.xyz, -r3.xyz);
//  r0.x = rsqrt(r0.x);
//  r3.xyz = -r3.xyz * r0.xxx;
//  r0.x = dot(r1.xzw, r3.xyz);
//  r0.x = cmp(r0.x < 0);
//  r1.xzw = r0.xxx ? -r1.xzw : r1.xzw;
//  r0.x = dot(r1.xzw, r1.xzw);
//  r0.x = rsqrt(r0.x);
//  r1.xzw = r1.xzw * r0.xxx;
//  r0.x = cmp(vfxiblparm.z != 0.000000);
//  r3.xyz = envirradiancetex_samp.SampleLevel(envirradiancetex_samp_state_s, float4(0,0,1,0), 0).xyz;
//  r3.xyz = iblparmpbr.xxx * r3.xyz;
//  r3.xyz = r0.xxx ? r3.xyz : 0;
//  r0.x = cmp(enlightenlightingtype.z != 0.000000);
//  r4.xyz = enlpppiparam1.xyz * r0.yzw;
//  r5.xyz = r0.yzw * enlpppiparam1.xyz + -enlpppiparam0.xyz;
//  r2.w = max(abs(r5.x), abs(r5.y));
//  r2.w = max(r2.w, abs(r5.z));
//  r2.w = 4 * r2.w;
//  r2.w = log2(r2.w);
//  r2.w = max(0, r2.w);
//  r2.w = floor(r2.w);
//  r3.w = exp2(r2.w);
//  r5.xyz = r4.xyz / r3.www;
//  r5.xyz = frac(r5.xyz);
//  r2.w = 0.142857149 * r2.w;
//  r5.w = r5.z * 0.142857149 + r2.w;
//  r7.xyz = float3(1,1,7) * enlpppiparam2.xyz;
//  r5.xyz = r7.xyz * r5.xyw;
//  r5.xyz = floor(r5.xyz);
//  r5.xyz = float3(0.5,0.5,0.5) + r5.xyz;
//  r5.xyz = r5.xyz / r7.xyz;
//  r5.xyzw = enlpppi_indirectionsampler_samp.SampleLevel(enlpppi_indirectionsampler_samp_state_s, r5.xyz, 0).xyzw;
//  r5.xyzw = float4(255,255,255,255) * r5.xyzw;
//  r7.xyz = enlpppiparam2.xyz / r5.www;
//  r4.xyz = r7.xyz * r4.xyz;
//  r4.xyz = frac(r4.xyz);
//  r4.xyz = r4.xyz * float3(0.666666687,0.666666687,0.666666687) + r5.xyz;
//  r4.xyz = float3(0.166666672,0.166666672,0.166666672) + r4.xyz;
//  r4.xyz = enlpppiparam0.www * r4.xyz;
//  r4.w = 0.333333343 * r4.z;
//  r5.xyzw = enlpppi_indirectionsamplerrgb_samp.SampleLevel(enlpppi_indirectionsamplerrgb_samp_state_s, r4.xyw, 0).xyzw;
//  r7.xyz = r4.xyz * float3(1,1,0.333333343) + float3(0,0,0.333333343);
//  r7.xyzw = enlpppi_indirectionsamplerrgb_samp.SampleLevel(enlpppi_indirectionsamplerrgb_samp_state_s, r7.xyz, 0).xyzw;
//  r4.xyz = r4.xyz * float3(1,1,0.333333343) + float3(0,0,0.666666687);
//  r4.xyzw = enlpppi_indirectionsamplerrgb_samp.SampleLevel(enlpppi_indirectionsamplerrgb_samp_state_s, r4.xyz, 0).xyzw;
//  r2.w = dot(r5.yzw, r5.yzw);
//  r3.w = sqrt(r2.w);
//  r6.z = cmp(r3.w != 0.000000);
//  r2.w = rsqrt(r2.w);
//  r5.yzw = r5.yzw * r2.www;
//  r2.w = dot(r1.xzw, r5.yzw);
//  r2.w = r2.w * 0.899999976 + 0.100000001;
//  r3.w = r3.w / r5.x;
//  r5.y = 1 + -r3.w;
//  r5.z = 1 + r3.w;
//  r5.y = r5.y / r5.z;
//  r5.zw = r3.ww * float2(2,2) + float2(1,2);
//  r2.w = max(0, r2.w);
//  r2.w = log2(r2.w);
//  r2.w = r5.z * r2.w;
//  r2.w = exp2(r2.w);
//  r3.w = r5.w * r2.w;
//  r2.w = -r5.w * r2.w + 1;
//  r2.w = r5.y * r2.w + r3.w;
//  r2.w = r5.x * r2.w;
//  r5.x = r6.z ? r2.w : r5.x;
//  r2.w = dot(r7.yzw, r7.yzw);
//  r3.w = sqrt(r2.w);
//  r5.w = cmp(r3.w != 0.000000);
//  r2.w = rsqrt(r2.w);
//  r7.yzw = r7.yzw * r2.www;
//  r2.w = dot(r1.xzw, r7.yzw);
//  r2.w = r2.w * 0.899999976 + 0.100000001;
//  r3.w = r3.w / r7.x;
//  r6.z = 1 + -r3.w;
//  r7.y = 1 + r3.w;
//  r6.z = r6.z / r7.y;
//  r7.yz = r3.ww * float2(2,2) + float2(1,2);
//  r2.w = max(0, r2.w);
//  r2.w = log2(r2.w);
//  r2.w = r7.y * r2.w;
//  r2.w = exp2(r2.w);
//  r3.w = r7.z * r2.w;
//  r2.w = -r7.z * r2.w + 1;
//  r2.w = r6.z * r2.w + r3.w;
//  r2.w = r7.x * r2.w;
//  r5.y = r5.w ? r2.w : r7.x;
//  r2.w = dot(r4.yzw, r4.yzw);
//  r3.w = sqrt(r2.w);
//  r5.w = cmp(r3.w != 0.000000);
//  r2.w = rsqrt(r2.w);
//  r4.yzw = r4.yzw * r2.www;
//  r1.x = dot(r1.xzw, r4.yzw);
//  r1.x = r1.x * 0.899999976 + 0.100000001;
//  r1.z = r3.w / r4.x;
//  r1.w = 1 + -r1.z;
//  r2.w = 1 + r1.z;
//  r1.w = r1.w / r2.w;
//  r4.yz = r1.zz * float2(2,2) + float2(1,2);
//  r1.x = max(0, r1.x);
//  r1.x = log2(r1.x);
//  r1.x = r4.y * r1.x;
//  r1.x = exp2(r1.x);
//  r1.z = r4.z * r1.x;
//  r1.x = -r4.z * r1.x + 1;
//  r1.x = r1.w * r1.x + r1.z;
//  r1.x = r4.x * r1.x;
//  r5.z = r5.w ? r1.x : r4.x;
//  r1.xzw = max(float3(0,0,0), r5.xyz);
//  r2.w = enlightenfactor.z * enlboostparm.y;
//  r2.w = enlightenlightingtype.y * r2.w;
//  r1.xzw = r1.xzw * r2.www + r3.xyz;
//  r1.xzw = r0.xxx ? r1.xzw : r3.xyz;
//  r0.x = cmp(-1 < lightprepassparallelcolor0.w);
//  r3.xyz = lightprepassparallelcolor0.xyz * float3(0.150000006,0.150000006,0.150000006) + r1.xzw;
//  r1.xzw = r0.xxx ? r3.xyz : r1.xzw;
//  r0.x = cmp(-1 < lightcolors0.w);
//  r3.xyz = lightpositions0.xyz + -r0.yzw;
//  r2.w = dot(r3.xyz, r3.xyz);
//  r2.w = rsqrt(r2.w);
//  r3.xyz = r3.xyz * r2.www;
//  r2.w = cmp(0 >= lightrightdir0.w);
//  if (r2.w != 0) {
//    r4.xyz = -lightpositions0.xyz + r0.yzw;
//    r4.xyz = float3(0.5,0.5,0.5) * r4.xyz;
//    r2.w = dot(abs(r4.xyz), abs(r4.xyz));
//    r3.w = 9.99999996e-12 + lightclipboundingvolumeorigin0.w;
//    r2.w = r2.w / r3.w;
//  } else {
//    r3.w = cmp(lightclipboundingvolumeextent0.w != 0.000000);
//    r4.xyz = -lightpositions0.xyz + r0.yzw;
//    r4.x = dot(lightspotdir0.xyz, r4.xyz);
//    r4.y = 9.99999972e-10 + lightcenters0.w;
//    r4.x = saturate(r4.x / r4.y);
//    r4.x = r4.x * r4.x;
//    r4.x = r4.x * r4.x;
//    r2.w = r3.w ? r4.x : 0;
//  }
//  r2.w = -r2.w * r2.w + 1;
//  r2.w = max(0, r2.w);
//  r2.w = r2.w * r2.w;
//  r4.xyz = -lightpositions0.xyz + r0.yzw;
//  r4.xyz = float3(0.0199999996,0.0199999996,0.0199999996) * r4.xyz;
//  r3.w = dot(abs(r4.xyz), abs(r4.xyz));
//  r3.w = lightpositions0.w + r3.w;
//  r3.w = 1 / r3.w;
//  r2.w = r3.w * r2.w;
//  r2.w = 0.0795798153 * r2.w;
//  r3.x = dot(r3.xyz, -lightspotdir0.xyz);
//  r3.x = -lightrightdir0.w + r3.x;
//  r3.x = saturate(lightspotdir0.w * r3.x);
//  r3.x = r3.x * r3.x;
//  r2.w = r3.x * r2.w;
//  r2.w = 0.159154937 * r2.w;
//  r3.xyz = lightcolors0.xyz * r2.www;
//  r3.xyz = r3.xyz * vfxgenericparam9.www + r1.xzw;
//  r1.xzw = r0.xxx ? r3.xyz : r1.xzw;
//  r0.x = cmp(-1 < lightcolors1.w);
//  r2.w = cmp(0 >= lightrightdir1.w);
//  if (r2.w != 0) {
//    r3.xyz = -lightpositions1.xyz + r0.yzw;
//    r3.xyz = float3(0.5,0.5,0.5) * r3.xyz;
//    r2.w = dot(abs(r3.xyz), abs(r3.xyz));
//    r3.x = 9.99999996e-12 + lightclipboundingvolumeorigin1.w;
//    r2.w = r2.w / r3.x;
//  } else {
//    r3.x = cmp(lightclipboundingvolumeextent1.w != 0.000000);
//    r3.yzw = -lightpositions1.xyz + r0.yzw;
//    r3.y = dot(lightspotdir1.xyz, r3.yzw);
//    r3.z = 9.99999972e-10 + lightcenters1.w;
//    r3.y = saturate(r3.y / r3.z);
//    r3.y = r3.y * r3.y;
//    r3.y = r3.y * r3.y;
//    r2.w = r3.x ? r3.y : 0;
//  }
//  r2.w = -r2.w * r2.w + 1;
//  r2.w = max(0, r2.w);
//  r2.w = r2.w * r2.w;
//  r3.xyz = -lightpositions1.xyz + r0.yzw;
//  r3.xyz = float3(0.0199999996,0.0199999996,0.0199999996) * r3.xyz;
//  r3.x = dot(abs(r3.xyz), abs(r3.xyz));
//  r3.x = lightpositions1.w + r3.x;
//  r3.x = 1 / r3.x;
//  r2.w = r3.x * r2.w;
//  r2.w = 0.0126655204 * r2.w;
//  r3.xyz = lightcolors1.xyz * r2.www;
//  r3.xyz = r3.xyz * vfxgenericparam9.www + r1.xzw;
//  r1.xzw = r0.xxx ? r3.xyz : r1.xzw;
//  r0.x = cmp(-1 < lightcolors2.w);
//  r3.xyz = lightpositions2.xyz + -r0.yzw;
//  r2.w = dot(r3.xyz, r3.xyz);
//  r2.w = rsqrt(r2.w);
//  r3.xyz = r3.xyz * r2.www;
//  r4.xyz = -lightclipboundingvolumeorigin2.xyz + r0.yzw;
//  r4.xyz = abs(r4.xyz) / lightclipboundingvolumeextent2.xyz;
//  r2.w = max(r4.x, r4.y);
//  r2.w = max(r2.w, r4.z);
//  r2.w = cmp(r2.w >= 1);
//  r2.w = r2.w ? 0 : 1;
//  r3.w = cmp(lightrightdir2.x == 0.000000);
//  r4.xyz = -lightpositions2.xyz + r0.yzw;
//  r5.xyz = saturate(abs(r4.xyz) / lightextentses2.xyz);
//  r5.xyz = float3(1,1,1) + -r5.xyz;
//  r4.w = r5.x * r5.y;
//  r4.w = r4.w * r5.z;
//  r4.w = log2(r4.w);
//  r4.w = lightpositions2.w * r4.w;
//  r4.w = exp2(r4.w);
//  r4.w = r4.w * r2.w;
//  r5.x = cmp(0 >= lightrightdir2.w);
//  if (r5.x != 0) {
//    r5.xyz = float3(0.5,0.5,0.5) * r4.xyz;
//    r5.x = dot(abs(r5.xyz), abs(r5.xyz));
//    r5.y = 9.99999996e-12 + lightclipboundingvolumeorigin2.w;
//    r5.x = r5.x / r5.y;
//  } else {
//    r5.y = cmp(lightclipboundingvolumeextent2.w != 0.000000);
//    r5.z = dot(lightspotdir2.xyz, r4.xyz);
//    r5.w = 9.99999972e-10 + lightcenters2.w;
//    r5.z = saturate(r5.z / r5.w);
//    r5.z = r5.z * r5.z;
//    r5.z = r5.z * r5.z;
//    r5.x = r5.y ? r5.z : 0;
//  }
//  r5.x = -r5.x * r5.x + 1;
//  r5.x = max(0, r5.x);
//  r5.x = r5.x * r5.x;
//  r4.xyz = float3(0.0199999996,0.0199999996,0.0199999996) * r4.xyz;
//  r4.x = dot(abs(r4.xyz), abs(r4.xyz));
//  r4.x = lightpositions2.w + r4.x;
//  r4.x = 1 / r4.x;
//  r4.x = r4.x * r5.x;
//  r2.w = r4.x * r2.w;
//  r2.w = 0.0795798153 * r2.w;
//  r2.w = r3.w ? r4.w : r2.w;
//  r3.w = cmp(0 < lightrightdir2.w);
//  r3.x = dot(r3.xyz, -lightspotdir2.xyz);
//  r3.x = -lightrightdir2.w + r3.x;
//  r3.x = saturate(lightspotdir2.w * r3.x);
//  r3.x = r3.x * r3.x;
//  r3.x = r3.x * r2.w;
//  r2.w = r3.w ? r3.x : r2.w;
//  r2.w = 0.159154937 * r2.w;
//  r3.xyz = lightcolors2.xyz * r2.www + r1.xzw;
//  r1.xzw = r0.xxx ? r3.xyz : r1.xzw;
//  r0.x = cmp(-1 < lightcolors3.w);
//  r3.xyz = lightpositions3.xyz + -r0.yzw;
//  r2.w = dot(r3.xyz, r3.xyz);
//  r2.w = rsqrt(r2.w);
//  r3.xyz = r3.xyz * r2.www;
//  r4.xyz = -lightclipboundingvolumeorigin3.xyz + r0.yzw;
//  r4.xyz = abs(r4.xyz) / lightclipboundingvolumeextent3.xyz;
//  r2.w = max(r4.x, r4.y);
//  r2.w = max(r2.w, r4.z);
//  r2.w = cmp(r2.w >= 1);
//  r2.w = r2.w ? 0 : 1;
//  r3.w = cmp(lightrightdir3.x == 0.000000);
//  r0.yzw = -lightpositions3.xyz + r0.yzw;
//  r4.xyz = saturate(abs(r0.yzw) / lightextentses3.xyz);
//  r4.xyz = float3(1,1,1) + -r4.xyz;
//  r4.x = r4.x * r4.y;
//  r4.x = r4.x * r4.z;
//  r4.x = log2(r4.x);
//  r4.x = lightpositions3.w * r4.x;
//  r4.x = exp2(r4.x);
//  r4.x = r4.x * r2.w;
//  r4.y = cmp(0 >= lightrightdir3.w);
//  if (r4.y != 0) {
//    r4.yzw = float3(0.5,0.5,0.5) * r0.yzw;
//    r4.y = dot(abs(r4.yzw), abs(r4.yzw));
//    r4.z = 9.99999996e-12 + lightclipboundingvolumeorigin3.w;
//    r4.y = r4.y / r4.z;
//  } else {
//    r4.z = cmp(lightclipboundingvolumeextent3.w != 0.000000);
//    r4.w = dot(lightspotdir3.xyz, r0.yzw);
//    r5.x = 9.99999972e-10 + lightcenters3.w;
//    r4.w = saturate(r4.w / r5.x);
//    r4.w = r4.w * r4.w;
//    r4.w = r4.w * r4.w;
//    r4.y = r4.z ? r4.w : 0;
//  }
//  r4.y = -r4.y * r4.y + 1;
//  r4.y = max(0, r4.y);
//  r4.y = r4.y * r4.y;
//  r0.yzw = float3(0.0199999996,0.0199999996,0.0199999996) * r0.yzw;
//  r0.y = dot(abs(r0.yzw), abs(r0.yzw));
//  r0.y = lightpositions3.w + r0.y;
//  r0.y = 1 / r0.y;
//  r0.y = r0.y * r4.y;
//  r0.y = r0.y * r2.w;
//  r0.y = 0.0795798153 * r0.y;
//  r0.y = r3.w ? r4.x : r0.y;
//  r0.z = cmp(0 < lightrightdir3.w);
//  r0.w = dot(r3.xyz, -lightspotdir3.xyz);
//  r0.w = -lightrightdir3.w + r0.w;
//  r0.w = saturate(lightspotdir3.w * r0.w);
//  r0.w = r0.w * r0.w;
//  r0.w = r0.y * r0.w;
//  r0.y = r0.z ? r0.w : r0.y;
//  r0.y = 0.159154937 * r0.y;
//  r0.yzw = lightcolors3.xyz * r0.yyy + r1.xzw;
//  r0.xyz = r0.xxx ? r0.yzw : r1.xzw;
//  r0.xyz = r0.xyz * vfxgenericparam9.zzz + vfxgenericparam9.xxx;
//  r0.w = max(r0.x, r0.y);
//  r0.w = max(r0.w, r0.z);
//  r0.w = 1 / r0.w;
//  r0.w = saturate(vfxgenericparam9.y * r0.w);
//  o2.xyz = r0.xyz * r0.www;
//  o0.y = r6.w;
//  o0.w = gpuparticlerendervsparm5.x;
//  o0.z = r1.y;
//  o3.xyw = r2.xyz;
//  o3.z = 0;
//  o4.xy = r6.xy;
//  return;
//}
//
///*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) HLSL Shader Compiler 6.3.9600.16384
//
//   using 3Dmigoto v1.3.16 on Fri Oct  8 19:09:34 2021
//
//
// Buffer Definitions:
//
// cbuffer vblock
// {
//
//   float4 gpuparticle_image_offset;   // Offset:    0 Size:    16
//   float4 gpuparticlerendervsparm0;   // Offset:   16 Size:    16
//   float4 globalvieworigin;           // Offset:   32 Size:    16
//   float4 gpuparticlerendervsparm2;   // Offset:   48 Size:    16
//   float4 viewmatrixz;                // Offset:   64 Size:    16
//   float4 gpuparticlerendervsparm4;   // Offset:   80 Size:    16
//   float4 mvpmatrixx;                 // Offset:   96 Size:    16
//   float4 mvpmatrixy;                 // Offset:  112 Size:    16
//   float4 mvpmatrixz;                 // Offset:  128 Size:    16
//   float4 mvpmatrixw;                 // Offset:  144 Size:    16
//   float4 gpuparticlerendervsparm3;   // Offset:  160 Size:    16
//   float4 gpuparticlecolor1;          // Offset:  176 Size:    16
//   float4 gpuparticlerendervsparm5;   // Offset:  192 Size:    16
//   float4 gpuparticlecolor2;          // Offset:  208 Size:    16
//   float4 vfxdynamicvpparam0;         // Offset:  224 Size:    16
//   float4 gpuparticlerendervsparm6;   // Offset:  240 Size:    16
//   float4 gpuparticlerendervsparm7;   // Offset:  256 Size:    16
//   float4 gpuparticlerendervsparm1;   // Offset:  272 Size:    16
//   float4 vfxgenericparam9;           // Offset:  288 Size:    16
//   float4 vfxiblparm;                 // Offset:  304 Size:    16
//   float4 iblparmpbr;                 // Offset:  320 Size:    16
//   float4 enlightenlightingtype;      // Offset:  336 Size:    16
//   float4 enlpppiparam0;              // Offset:  352 Size:    16
//   float4 enlpppiparam1;              // Offset:  368 Size:    16
//   float4 enlpppiparam2;              // Offset:  384 Size:    16
//   float4 enlboostparm;               // Offset:  400 Size:    16
//   float4 enlightenfactor;            // Offset:  416 Size:    16
//   float4 lightprepassparallelcolor0; // Offset:  432 Size:    16
//   float4 lightcolors0;               // Offset:  448 Size:    16
//   float4 lightpositions0;            // Offset:  464 Size:    16
//   float4 lightclipboundingvolumeorigin0;// Offset:  480 Size:    16
//   float4 lightclipboundingvolumeextent0;// Offset:  496 Size:    16
//   float4 lightextentses0;            // Offset:  512 Size:    16 [unused]
//   float4 lightcenters0;              // Offset:  528 Size:    16
//   float4 lightrightdir0;             // Offset:  544 Size:    16
//   float4 lightspotdir0;              // Offset:  560 Size:    16
//   float4 lightcolors1;               // Offset:  576 Size:    16
//   float4 lightpositions1;            // Offset:  592 Size:    16
//   float4 lightclipboundingvolumeorigin1;// Offset:  608 Size:    16
//   float4 lightclipboundingvolumeextent1;// Offset:  624 Size:    16
//   float4 lightextentses1;            // Offset:  640 Size:    16 [unused]
//   float4 lightcenters1;              // Offset:  656 Size:    16
//   float4 lightrightdir1;             // Offset:  672 Size:    16
//   float4 lightspotdir1;              // Offset:  688 Size:    16
//   float4 lightcolors2;               // Offset:  704 Size:    16
//   float4 lightpositions2;            // Offset:  720 Size:    16
//   float4 lightclipboundingvolumeorigin2;// Offset:  736 Size:    16
//   float4 lightclipboundingvolumeextent2;// Offset:  752 Size:    16
//   float4 lightextentses2;            // Offset:  768 Size:    16
//   float4 lightcenters2;              // Offset:  784 Size:    16
//   float4 lightrightdir2;             // Offset:  800 Size:    16
//   float4 lightspotdir2;              // Offset:  816 Size:    16
//   float4 lightcolors3;               // Offset:  832 Size:    16
//   float4 lightpositions3;            // Offset:  848 Size:    16
//   float4 lightclipboundingvolumeorigin3;// Offset:  864 Size:    16
//   float4 lightclipboundingvolumeextent3;// Offset:  880 Size:    16
//   float4 lightextentses3;            // Offset:  896 Size:    16
//   float4 lightcenters3;              // Offset:  912 Size:    16
//   float4 lightrightdir3;             // Offset:  928 Size:    16
//   float4 lightspotdir3;              // Offset:  944 Size:    16
//
// }
//
//
// Resource Bindings:
//
// Name                                 Type  Format         Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// envirradiancetex_samp_state       sampler      NA          NA    4        1
// enlpppi_indirectionsamplerrgb_samp_state    sampler      NA          NA    5        1
// enlpppi_indirectionsampler_samp_state    sampler      NA          NA    6        1
// gpuparticle_position_vertex_buff_samp    texture  float4          2d    0        1
// gpuparticle_texcoord0_vertex_buff_samp    texture  float4          2d    1        1
// gpuparticle_param0_vertex_buff_samp    texture  float4          2d    2        1
// gpuparticle_velocity_vertex_buff_samp    texture  float4          2d    3        1
// envirradiancetex_samp             texture  float4        cube    4        1
// enlpppi_indirectionsamplerrgb_samp    texture  float4          3d    5        1
// enlpppi_indirectionsampler_samp    texture  float4          3d    6        1
// vblock                            cbuffer      NA          NA    0        1
//
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_VertexID              0   x           0   VERTID    uint   x
//
//
// Output signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// TEXCOORD                 0   xyzw        0     NONE   float   xyzw
// TEXCOORD                 1   xyzw        1     NONE   float   xyzw
// TEXCOORD                 2   xyzw        2     NONE   float   xyzw
// TEXCOORD                 3   xyzw        3     NONE   float   xyzw
// SV_Position              0   xyzw        4      POS   float   xyzw
//
vs_5_0
dcl_globalFlags refactoringAllowed
dcl_constantbuffer cb0[60], immediateIndexed
dcl_constantbuffer cb12[1], immediateIndexed
dcl_sampler s4, mode_default
dcl_sampler s5, mode_default
dcl_sampler s6, 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_resource_texturecube (float,float,float,float) t4
dcl_resource_texture3d (float,float,float,float) t5
dcl_resource_texture3d (float,float,float,float) t6
dcl_input_sgv v0.x, vertex_id
dcl_output o0.xyzw
dcl_output o1.xyzw
dcl_output o2.xyzw
dcl_output o3.xyzw
dcl_output_siv o4.xyzw, position
dcl_temps 29
dcl_resource_texture2d (float,float,float,float) t125
ld_indexable(texture2d)(float,float,float,float) r14.xyzw, l(0, 0, 0, 0), t125.xyzw
udiv r0.x, null, v0.x, l(6)
ftou r0.y, cb0[0].x
iadd r0.y, r0.y, r0.x
udiv r1.x, r2.x, r0.y, l(384)
mov r2.y, r1.x
mov r2.zw, l(0,0,0,0)
ld_indexable(texture2d)(float,float,float,float) r1.xyzw, r2.xyww, t0.xyzw
add r0.yzw, r1.xxyz, cb0[1].xxyz
add r1.xyz, r0.yzwy, -cb0[2].xyzx
ne r3.x, cb0[3].w, l(0.000000)
mov r4.xyz, -r1.xyzx
add r4.w, r4.z, l(0.000100)
dp3 r3.y, r4.xywx, r4.xywx
rsq r3.y, r3.y
mul r3.yzw, r3.yyyy, r4.xxyw
mad r3.yzw, r3.yyzw, cb0[3].wwww, r1.xxyz
movc r3.xyz, r3.xxxx, r3.yzwy, r1.xyzx
mov r3.w, l(1.000000)
dp4 r1.x, r3.xyzw, cb0[4].xyzw
ge r1.yz, cb0[5].xxzx, l(0.000000, 0.000000, 0.000000, 0.000000)
lt r4.xy, l(0.000000, 0.000000, 0.000000, 0.000000), cb0[5].ywyy
and r1.yz, r1.yyzy, r4.xxyx
ge r3.w, cb0[5].x, -r1.x
add r4.x, r1.x, cb0[5].x
div r4.x, r4.x, cb0[5].y
and r3.w, r3.w, r4.x
and r1.y, r1.y, r3.w
ge r3.w, -r1.x, cb0[5].z
add r4.x, -r1.x, -cb0[5].z
div r4.x, r4.x, cb0[5].w
movc r3.w, r3.w, r4.x, r1.y
movc_sat r1.y, r1.z, r3.w, r1.y
add r1.y, -r1.y, l(1.000000)
ge r1.z, l(0.000000), r1.y
eq r3.w, r1.w, l(-1.000000)
or r1.z, r1.z, r3.w
mov o0.xyzw, l(0,0,0,0)
mov o1.xyzw, l(0,0,0,0)
mov o2.xyzw, l(0,0,0,0)
mov o3.xyzw, l(0,0,0,0)
mov o4.xyzw, l(1000000000.000000,1000000000.000000,1000000000.000000,0)
retc_nz r1.z
imad r0.x, r0.x, l(-6), v0.x
ld_indexable(texture2d)(float,float,float,float) r4.xyzw, r2.xyww, t1.xyzw
ld_indexable(texture2d)(float,float,float,float) r5.xyzw, r2.xyww, t2.xyzw
ieq r6.xyzw, r0.xxxx, l(0, 3, 2, 4)
or r0.x, r6.y, r6.x
or r6.xyzw, r6.zwzw, r0.xxxx
and r0.x, r6.z, l(0x3f800000)
movc r6.xyzw, r6.xyzw, l(1.000000,1.000000,0,0), l(-1.000000,-1.000000,1.000000,1.000000)
lt r1.z, l(1.500000), r5.w
add r3.w, r5.w, l(-3.000000)
movc r1.z, r1.z, r3.w, r5.w
mad r7.xyz, r4.xyzx, r6.xxxx, r3.xyzx
mad r7.xyz, r5.xyzx, r6.yyyy, r7.xyzx
mov r7.w, l(1.000000)
dp4 r6.x, r7.xyzw, cb0[6].xyzw
dp4 r6.y, r7.xyzw, cb0[7].xyzw
dp4 r24.z, r7.xyzw, cb0[8].xyzw
dp4 r3.w, r7.xyzw, cb0[9].xyzw
add r5.w, r1.w, -cb0[10].y
div_sat r5.w, r5.w, cb0[10].z
lt r7.w, l(0.000000), cb0[1].w
div_sat r1.w, r1.w, cb0[10].w
movc r1.w, r7.w, r1.w, l(1.000000)
mul r8.w, r1.w, cb0[11].w
mad r8.xyz, -r1.zzzz, cb0[12].yyyy, cb0[11].xyzx
mad r9.xyz, -r1.zzzz, cb0[12].yyyy, cb0[13].xyzx
mul r1.z, r5.w, cb0[10].x
add r9.xyz, -r8.xyzx, r9.xyzx
mad r9.w, -cb0[11].w, r1.w, cb0[13].w
mad r8.xyzw, r1.zzzz, r9.xyzw, r8.xyzw
max r1.z, r8.y, r8.x
max r1.z, r8.z, r1.z
lt r9.xy, l(0.000000, 0.900000, 0.000000, 0.000000), cb0[14].ywyy
lt r1.w, cb0[14].y, l(1.000000)
and r1.w, r1.w, r9.x
ge r5.w, r1.z, cb0[14].y
add r7.w, -cb0[14].y, l(1.000000)
div r7.w, cb0[14].x, r7.w
add r1.z, r1.z, -cb0[14].y
mul r1.z, r1.z, r7.w
and r1.z, r1.z, r5.w
movc r1.z, r1.w, r1.z, cb0[14].x
mul o1.xyz, r1.zzzz, r8.xyzx
mul r1.y, r1.y, r8.w
ge r1.z, l(0.000000), r1.y
movc r24.w, r1.z, l(0), r3.w
lt r1.z, l(0.000000), r4.w
movc r1.w, r1.z, l(1.000000), l(-1.000000)
movc r0.x, r1.z, r6.z, r0.x
mul o1.w, r1.y, cb0[1].w
ge r8.xyzw, -r1.xxxx, cb0[15].xyzw
ge r10.xyzw, cb0[15].xyzw, -r1.xxxx
add r1.yz, -cb0[15].xxzx, cb0[15].yywy
lt r9.xz, l(0.000000, 0.000000, 0.000000, 0.000000), r1.yyzy
add r11.xy, -r1.xxxx, -cb0[15].xzxx
div r1.yz, r11.xxyx, r1.yyzy
and r1.y, r1.y, r9.x
and r8.xyz, r8.xyzx, r10.yzwy
lt r4.w, cb0[15].z, l(0.000000)
or r4.w, r4.w, r8.y
and r5.w, r4.w, l(0x3f800000)
movc r1.y, r8.x, r1.y, r5.w
or r4.w, r4.w, r8.x
add r1.z, r1.z, l(1.000000)
movc r1.z, r9.z, r1.z, l(1.000000)
ge r8.xy, cb0[16].xyxx, -r1.xxxx
and r5.w, r8.x, r8.w
lt r6.z, cb0[16].x, l(0.000000)
or r5.w, r5.w, r6.z
and r6.z, r5.w, l(0x40000000)
movc r1.z, r8.z, r1.z, r6.z
or r5.w, r5.w, r8.z
ge r8.xz, -r1.xxxx, cb0[16].xxyx
and r6.z, r8.y, r8.x
add r7.w, -cb0[16].x, cb0[16].y
lt r8.x, l(0.000000), r7.w
add r8.y, -r1.x, -cb0[16].x
div r7.w, r8.y, r7.w
add r7.w, r7.w, l(2.000000)
movc r7.w, r8.x, r7.w, l(2.000000)
ge r1.x, l(10000000000.000000), -r1.x
and r1.x, r1.x, r8.z
and r1.x, r1.x, l(0x40400000)
movc r1.x, r6.z, r7.w, r1.x
movc r1.x, r5.w, r1.z, r1.x
movc r1.x, r4.w, r1.y, r1.x
movc r1.x, r10.x, l(0), r1.x
div r1.y, l(1.000000, 1.000000, 1.000000, 1.000000), cb0[17].w
round_ni r1.z, r1.x
add r0.x, r0.x, r1.z
mul o0.x, r1.y, r0.x
frc o2.w, r1.x
if_nz r9.y
  ld_indexable(texture2d)(float,float,float,float) r2.xyzw, r2.xyzw, t3.xyzw
  dp3 r0.x, r2.xyzx, r2.xyzx
  rsq r0.x, r0.x
  mul r2.xyz, r0.xxxx, r2.xyzx
  mad r2.xyz, -r2.xyzx, r2.wwww, r7.xyzx
  mov r2.w, l(1.000000)
  dp4 r7.x, r2.xyzw, cb0[6].xyzw
  dp4 r7.y, r2.xyzw, cb0[7].xyzw
  dp4 r0.x, r2.xyzw, cb0[9].xyzw
  div r1.xz, r6.xxyx, r3.wwww
  mad r2.xy, r1.xzxx, l(0.500000, 0.500000, 0.000000, 0.000000), l(0.500000, 0.500000, 0.000000, 0.000000)
  div r1.xz, r7.xxyx, r0.xxxx
  mad r7.xy, r1.xzxx, l(0.500000, 0.500000, 0.000000, 0.000000), l(0.500000, 0.500000, 0.000000, 0.000000)
  add r7.z, -r7.y, l(1.000000)
  add r2.z, -r2.y, l(1.000000)
  add r2.xy, r2.xzxx, -r7.xzxx
  mov r2.z, l(1.000000)
else
  mov r2.xyz, l(0,0,0,0)
endif
dp3 r0.x, r4.xyzx, r4.xyzx
rsq r0.x, r0.x
mul r4.xyz, r0.xxxx, r4.yzxy
mul r1.xzw, r1.wwww, r4.xxyz
dp3 r0.x, r5.xyzx, r5.xyzx
rsq r0.x, r0.x
mul r4.xyz, r0.xxxx, r5.zxyz
mul r5.xyz, r1.xzwx, -r4.xyzx
mad r1.xzw, -r4.zzxy, r1.zzwx, -r5.xxyz
dp3 r0.x, r1.xzwx, r1.xzwx
rsq r0.x, r0.x
mul r1.xzw, r0.xxxx, r1.xxzw
dp3 r0.x, -r3.xyzx, -r3.xyzx
rsq r0.x, r0.x
mul r3.xyz, r0.xxxx, -r3.xyzx
dp3 r0.x, r1.xzwx, r3.xyzx
lt r0.x, r0.x, l(0.000000)
movc r1.xzw, r0.xxxx, -r1.xxzw, r1.xxzw
dp3 r0.x, r1.xzwx, r1.xzwx
rsq r0.x, r0.x
mul r1.xzw, r0.xxxx, r1.xxzw
ne r0.x, cb0[19].z, l(0.000000)
sample_l_indexable(texturecube)(float,float,float,float) r3.xyz, l(0.000000, 0.000000, 1.000000, 0.000000), t4.xyzw, s4, l(0.000000)
mul r3.xyz, r3.xyzx, cb0[20].xxxx
and r3.xyz, r0.xxxx, r3.xyzx
ne r0.x, cb0[21].z, l(0.000000)
mul r4.xyz, r0.yzwy, cb0[23].xyzx
mad r5.xyz, r0.yzwy, cb0[23].xyzx, -cb0[22].xyzx
max r2.w, |r5.y|, |r5.x|
max r2.w, |r5.z|, r2.w
mul r2.w, r2.w, l(4.000000)
log r2.w, r2.w
max r2.w, r2.w, l(0.000000)
round_ni r2.w, r2.w
exp r3.w, r2.w
div r5.xyz, r4.xyzx, r3.wwww
frc r5.xyz, r5.xyzx
mul r2.w, r2.w, l(0.142857149)
mad r5.w, r5.z, l(0.142857149), r2.w
mul r7.xyz, cb0[24].xyzx, l(1.000000, 1.000000, 7.000000, 0.000000)
mul r5.xyz, r5.xywx, r7.xyzx
round_ni r5.xyz, r5.xyzx
add r5.xyz, r5.xyzx, l(0.500000, 0.500000, 0.500000, 0.000000)
div r5.xyz, r5.xyzx, r7.xyzx
sample_l_indexable(texture3d)(float,float,float,float) r5.xyzw, r5.xyzx, t6.xyzw, s6, l(0.000000)
mul r5.xyzw, r5.xyzw, l(255.000000, 255.000000, 255.000000, 255.000000)
div r7.xyz, cb0[24].xyzx, r5.wwww
mul r4.xyz, r4.xyzx, r7.xyzx
frc r4.xyz, r4.xyzx
mad r4.xyz, r4.xyzx, l(0.666666687, 0.666666687, 0.666666687, 0.000000), r5.xyzx
add r4.xyz, r4.xyzx, l(0.166666672, 0.166666672, 0.166666672, 0.000000)
mul r4.xyz, r4.xyzx, cb0[22].wwww
mul r4.w, r4.z, l(0.333333343)
sample_l_indexable(texture3d)(float,float,float,float) r5.xyzw, r4.xywx, t5.xyzw, s5, l(0.000000)
mad r7.xyz, r4.xyzx, l(1.000000, 1.000000, 0.333333343, 0.000000), l(0.000000, 0.000000, 0.333333343, 0.000000)
sample_l_indexable(texture3d)(float,float,float,float) r7.xyzw, r7.xyzx, t5.xyzw, s5, l(0.000000)
mad r4.xyz, r4.xyzx, l(1.000000, 1.000000, 0.333333343, 0.000000), l(0.000000, 0.000000, 0.666666687, 0.000000)
sample_l_indexable(texture3d)(float,float,float,float) r4.xyzw, r4.xyzx, t5.xyzw, s5, l(0.000000)
dp3 r2.w, r5.yzwy, r5.yzwy
sqrt r3.w, r2.w
ne r6.z, r3.w, l(0.000000)
rsq r2.w, r2.w
mul r5.yzw, r2.wwww, r5.yyzw
dp3 r2.w, r1.xzwx, r5.yzwy
mad r2.w, r2.w, l(0.900000), l(0.100000)
div r3.w, r3.w, r5.x
add r5.y, -r3.w, l(1.000000)
add r5.z, r3.w, l(1.000000)
div r5.y, r5.y, r5.z
mad r5.zw, r3.wwww, l(0.000000, 0.000000, 2.000000, 2.000000), l(0.000000, 0.000000, 1.000000, 2.000000)
max r2.w, r2.w, l(0.000000)
log r2.w, r2.w
mul r2.w, r2.w, r5.z
exp r2.w, r2.w
mul r3.w, r2.w, r5.w
mad r2.w, -r5.w, r2.w, l(1.000000)
mad r2.w, r5.y, r2.w, r3.w
mul r2.w, r2.w, r5.x
movc r5.x, r6.z, r2.w, r5.x
dp3 r2.w, r7.yzwy, r7.yzwy
sqrt r3.w, r2.w
ne r5.w, r3.w, l(0.000000)
rsq r2.w, r2.w
mul r7.yzw, r2.wwww, r7.yyzw
dp3 r2.w, r1.xzwx, r7.yzwy
mad r2.w, r2.w, l(0.900000), l(0.100000)
div r3.w, r3.w, r7.x
add r6.z, -r3.w, l(1.000000)
add r7.y, r3.w, l(1.000000)
div r6.z, r6.z, r7.y
mad r7.yz, r3.wwww, l(0.000000, 2.000000, 2.000000, 0.000000), l(0.000000, 1.000000, 2.000000, 0.000000)
max r2.w, r2.w, l(0.000000)
log r2.w, r2.w
mul r2.w, r2.w, r7.y
exp r2.w, r2.w
mul r3.w, r2.w, r7.z
mad r2.w, -r7.z, r2.w, l(1.000000)
mad r2.w, r6.z, r2.w, r3.w
mul r2.w, r2.w, r7.x
movc r5.y, r5.w, r2.w, r7.x
dp3 r2.w, r4.yzwy, r4.yzwy
sqrt r3.w, r2.w
ne r5.w, r3.w, l(0.000000)
rsq r2.w, r2.w
mul r4.yzw, r2.wwww, r4.yyzw
dp3 r1.x, r1.xzwx, r4.yzwy
mad r1.x, r1.x, l(0.900000), l(0.100000)
div r1.z, r3.w, r4.x
add r1.w, -r1.z, l(1.000000)
add r2.w, r1.z, l(1.000000)
div r1.w, r1.w, r2.w
mad r4.yz, r1.zzzz, l(0.000000, 2.000000, 2.000000, 0.000000), l(0.000000, 1.000000, 2.000000, 0.000000)
max r1.x, r1.x, l(0.000000)
log r1.x, r1.x
mul r1.x, r1.x, r4.y
exp r1.x, r1.x
mul r1.z, r1.x, r4.z
mad r1.x, -r4.z, r1.x, l(1.000000)
mad r1.x, r1.w, r1.x, r1.z
mul r1.x, r1.x, r4.x
movc r5.z, r5.w, r1.x, r4.x
max r1.xzw, r5.xxyz, l(0.000000, 0.000000, 0.000000, 0.000000)
mul r2.w, cb0[25].y, cb0[26].z
mul r2.w, r2.w, cb0[21].y
mad r1.xzw, r1.xxzw, r2.wwww, r3.xxyz
movc r1.xzw, r0.xxxx, r1.xxzw, r3.xxyz
lt r0.x, l(-1.000000), cb0[27].w
mad r3.xyz, cb0[27].xyzx, l(0.150000, 0.150000, 0.150000, 0.000000), r1.xzwx
movc r1.xzw, r0.xxxx, r3.xxyz, r1.xxzw
lt r0.x, l(-1.000000), cb0[28].w
add r3.xyz, -r0.yzwy, cb0[29].xyzx
dp3 r2.w, r3.xyzx, r3.xyzx
rsq r2.w, r2.w
mul r3.xyz, r2.wwww, r3.xyzx
ge r2.w, l(0.000000), cb0[34].w
if_nz r2.w
  add r4.xyz, r0.yzwy, -cb0[29].xyzx
  mul r4.xyz, r4.xyzx, l(0.500000, 0.500000, 0.500000, 0.000000)
  dp3 r2.w, |r4.xyzx|, |r4.xyzx|
  add r3.w, cb0[30].w, l(9.999999960E-12)
  div r2.w, r2.w, r3.w
else
  ne r3.w, cb0[31].w, l(0.000000)
  add r4.xyz, r0.yzwy, -cb0[29].xyzx
  dp3 r4.x, cb0[35].xyzx, r4.xyzx
  add r4.y, cb0[33].w, l(9.999999717E-10)
  div_sat r4.x, r4.x, r4.y
  mul r4.x, r4.x, r4.x
  mul r4.x, r4.x, r4.x
  and r2.w, r3.w, r4.x
endif
mad r2.w, -r2.w, r2.w, l(1.000000)
max r2.w, r2.w, l(0.000000)
mul r2.w, r2.w, r2.w
add r4.xyz, r0.yzwy, -cb0[29].xyzx
mul r4.xyz, r4.xyzx, l(0.020000, 0.020000, 0.020000, 0.000000)
dp3 r3.w, |r4.xyzx|, |r4.xyzx|
add r3.w, r3.w, cb0[29].w
div r3.w, l(1.000000, 1.000000, 1.000000, 1.000000), r3.w
mul r2.w, r2.w, r3.w
mul r2.w, r2.w, l(0.0795798153)
dp3 r3.x, r3.xyzx, -cb0[35].xyzx
add r3.x, r3.x, -cb0[34].w
mul_sat r3.x, r3.x, cb0[35].w
mul r3.x, r3.x, r3.x
mul r2.w, r2.w, r3.x
mul r2.w, r2.w, l(0.159154937)
mul r3.xyz, r2.wwww, cb0[28].xyzx
mad r3.xyz, r3.xyzx, cb0[18].wwww, r1.xzwx
movc r1.xzw, r0.xxxx, r3.xxyz, r1.xxzw
lt r0.x, l(-1.000000), cb0[36].w
ge r2.w, l(0.000000), cb0[42].w
if_nz r2.w
  add r3.xyz, r0.yzwy, -cb0[37].xyzx
  mul r3.xyz, r3.xyzx, l(0.500000, 0.500000, 0.500000, 0.000000)
  dp3 r2.w, |r3.xyzx|, |r3.xyzx|
  add r3.x, cb0[38].w, l(9.999999960E-12)
  div r2.w, r2.w, r3.x
else
  ne r3.x, cb0[39].w, l(0.000000)
  add r3.yzw, r0.yyzw, -cb0[37].xxyz
  dp3 r3.y, cb0[43].xyzx, r3.yzwy
  add r3.z, cb0[41].w, l(9.999999717E-10)
  div_sat r3.y, r3.y, r3.z
  mul r3.y, r3.y, r3.y
  mul r3.y, r3.y, r3.y
  and r2.w, r3.y, r3.x
endif
mad r2.w, -r2.w, r2.w, l(1.000000)
max r2.w, r2.w, l(0.000000)
mul r2.w, r2.w, r2.w
add r3.xyz, r0.yzwy, -cb0[37].xyzx
mul r3.xyz, r3.xyzx, l(0.020000, 0.020000, 0.020000, 0.000000)
dp3 r3.x, |r3.xyzx|, |r3.xyzx|
add r3.x, r3.x, cb0[37].w
div r3.x, l(1.000000, 1.000000, 1.000000, 1.000000), r3.x
mul r2.w, r2.w, r3.x
mul r2.w, r2.w, l(0.0126655204)
mul r3.xyz, r2.wwww, cb0[36].xyzx
mad r3.xyz, r3.xyzx, cb0[18].wwww, r1.xzwx
movc r1.xzw, r0.xxxx, r3.xxyz, r1.xxzw
lt r0.x, l(-1.000000), cb0[44].w
add r3.xyz, -r0.yzwy, cb0[45].xyzx
dp3 r2.w, r3.xyzx, r3.xyzx
rsq r2.w, r2.w
mul r3.xyz, r2.wwww, r3.xyzx
add r4.xyz, r0.yzwy, -cb0[46].xyzx
div r4.xyz, |r4.xyzx|, cb0[47].xyzx
max r2.w, r4.y, r4.x
max r2.w, r4.z, r2.w
ge r2.w, r2.w, l(1.000000)
movc r2.w, r2.w, l(0), l(1.000000)
eq r3.w, cb0[50].x, l(0.000000)
add r4.xyz, r0.yzwy, -cb0[45].xyzx
div_sat r5.xyz, |r4.xyzx|, cb0[48].xyzx
add r5.xyz, -r5.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
mul r4.w, r5.y, r5.x
mul r4.w, r5.z, r4.w
log r4.w, r4.w
mul r4.w, r4.w, cb0[45].w
exp r4.w, r4.w
mul r4.w, r2.w, r4.w
ge r5.x, l(0.000000), cb0[50].w
if_nz r5.x
  mul r5.xyz, r4.xyzx, l(0.500000, 0.500000, 0.500000, 0.000000)
  dp3 r5.x, |r5.xyzx|, |r5.xyzx|
  add r5.y, cb0[46].w, l(9.999999960E-12)
  div r5.x, r5.x, r5.y
else
  ne r5.y, cb0[47].w, l(0.000000)
  dp3 r5.z, cb0[51].xyzx, r4.xyzx
  add r5.w, cb0[49].w, l(9.999999717E-10)
  div_sat r5.z, r5.z, r5.w
  mul r5.z, r5.z, r5.z
  mul r5.z, r5.z, r5.z
  and r5.x, r5.z, r5.y
endif
mad r5.x, -r5.x, r5.x, l(1.000000)
max r5.x, r5.x, l(0.000000)
mul r5.x, r5.x, r5.x
mul r4.xyz, r4.xyzx, l(0.020000, 0.020000, 0.020000, 0.000000)
dp3 r4.x, |r4.xyzx|, |r4.xyzx|
add r4.x, r4.x, cb0[45].w
div r4.x, l(1.000000, 1.000000, 1.000000, 1.000000), r4.x
mul r4.x, r5.x, r4.x
mul r2.w, r2.w, r4.x
mul r2.w, r2.w, l(0.0795798153)
movc r2.w, r3.w, r4.w, r2.w
lt r3.w, l(0.000000), cb0[50].w
dp3 r3.x, r3.xyzx, -cb0[51].xyzx
add r3.x, r3.x, -cb0[50].w
mul_sat r3.x, r3.x, cb0[51].w
mul r3.x, r3.x, r3.x
mul r3.x, r2.w, r3.x
movc r2.w, r3.w, r3.x, r2.w
mul r2.w, r2.w, l(0.159154937)
mad r3.xyz, cb0[44].xyzx, r2.wwww, r1.xzwx
movc r1.xzw, r0.xxxx, r3.xxyz, r1.xxzw
lt r0.x, l(-1.000000), cb0[52].w
add r3.xyz, -r0.yzwy, cb0[53].xyzx
dp3 r2.w, r3.xyzx, r3.xyzx
rsq r2.w, r2.w
mul r3.xyz, r2.wwww, r3.xyzx
add r4.xyz, r0.yzwy, -cb0[54].xyzx
div r4.xyz, |r4.xyzx|, cb0[55].xyzx
max r2.w, r4.y, r4.x
max r2.w, r4.z, r2.w
ge r2.w, r2.w, l(1.000000)
movc r2.w, r2.w, l(0), l(1.000000)
eq r3.w, cb0[58].x, l(0.000000)
add r0.yzw, r0.yyzw, -cb0[53].xxyz
div_sat r4.xyz, |r0.yzwy|, cb0[56].xyzx
add r4.xyz, -r4.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
mul r4.x, r4.y, r4.x
mul r4.x, r4.z, r4.x
log r4.x, r4.x
mul r4.x, r4.x, cb0[53].w
exp r4.x, r4.x
mul r4.x, r2.w, r4.x
ge r4.y, l(0.000000), cb0[58].w
if_nz r4.y
  mul r4.yzw, r0.yyzw, l(0.000000, 0.500000, 0.500000, 0.500000)
  dp3 r4.y, |r4.yzwy|, |r4.yzwy|
  add r4.z, cb0[54].w, l(9.999999960E-12)
  div r4.y, r4.y, r4.z
else
  ne r4.z, cb0[55].w, l(0.000000)
  dp3 r4.w, cb0[59].xyzx, r0.yzwy
  add r5.x, cb0[57].w, l(9.999999717E-10)
  div_sat r4.w, r4.w, r5.x
  mul r4.w, r4.w, r4.w
  mul r4.w, r4.w, r4.w
  and r4.y, r4.w, r4.z
endif
mad r4.y, -r4.y, r4.y, l(1.000000)
max r4.y, r4.y, l(0.000000)
mul r4.y, r4.y, r4.y
mul r0.yzw, r0.yyzw, l(0.000000, 0.020000, 0.020000, 0.020000)
dp3 r0.y, |r0.yzwy|, |r0.yzwy|
add r0.y, r0.y, cb0[53].w
div r0.y, l(1.000000, 1.000000, 1.000000, 1.000000), r0.y
mul r0.y, r4.y, r0.y
mul r0.y, r2.w, r0.y
mul r0.y, r0.y, l(0.0795798153)
movc r0.y, r3.w, r4.x, r0.y
lt r0.z, l(0.000000), cb0[58].w
dp3 r0.w, r3.xyzx, -cb0[59].xyzx
add r0.w, r0.w, -cb0[58].w
mul_sat r0.w, r0.w, cb0[59].w
mul r0.w, r0.w, r0.w
mul r0.w, r0.w, r0.y
movc r0.y, r0.z, r0.w, r0.y
mul r0.y, r0.y, l(0.159154937)
mad r0.yzw, cb0[52].xxyz, r0.yyyy, r1.xxzw
movc r0.xyz, r0.xxxx, r0.yzwy, r1.xzwx
mad r0.xyz, r0.xyzx, cb0[18].zzzz, cb0[18].xxxx
max r0.w, r0.y, r0.x
max r0.w, r0.z, r0.w
div r0.w, l(1.000000, 1.000000, 1.000000, 1.000000), r0.w
mul_sat r0.w, r0.w, cb0[18].y
mul o2.xyz, r0.wwww, r0.xyzx
mov o0.y, r6.w
mov o0.w, cb0[12].x
mov o0.z, r1.y
mov o3.xyw, r2.xyxz
mov o3.z, l(0)
mov r24.xy, r6.xyxx

add r14.w, r24.w, -r14.y
mad r24.x, r14.x, r14.w, r24.x

mov o4.xyzw, r24.xyzw
ret
// Approximately 483 instruction slots used
