//Sky texture 2D.
//
// Generated by Microsoft (R) HLSL Shader Compiler 10.0.10011.16384
//
//   using 3Dmigoto v1.3.16 on Mon Jan 24 22:51:42 2022
//
//
// Buffer Definitions:
//
// cbuffer ConstBuf__passData
// {
//
//   struct PassDataClearColor
//   {
//
//       float4x4 projectionToWorld;    // Index:    0
//       float4x4 previousWorldToProjection;// Index:    4
//       float3 clearColor;             // Index:    8
//       bool fogBackground;            // Index:    8.w
//       bool drawEnvMap;               // Index:    9
//       float3 eyePosWS;               // Index:    9.y
//       bool useReflectionPlane;       // Index:   10
//       float3 envmapTint;             // Index:   10.y
//       float envmapIntensity;         // Index:   11
//       float2x2 envmapRotation;       // Index:   12
//       float2 viewportScale;          // Index:   13.z
//       float2 viewportOffset;         // Index:   14
//       float4 reflectionPlaneWS;      // Index:   15
//
//       struct AtmosphericConstants
//       {
//
//           float3 cFogColor;          // Index:   16
//           float cHeightFalloff;      // Index:   16.w
//           float3 cEyePosition;       // Index:   17
//           float cHeightDensity;      // Index:   17.w
//           float cStartDistance;      // Index:   18
//           float cGlobalDensity;      // Index:   18.y
//           float cDepthReprojectScale;// Index:   18.z
//           float cDepthReprojectBias; // Index:   18.w
//           float4x4 cInvProjNoZReproj;// Index:   19
//           float3 cDirectionalFogDirection;// Index:   23
//           float cDirectionalityPower;// Index:   23.w
//           float3 cDirectionalFogColor;// Index:   24
//           float cDensityMapSparseBias;// Index:   24.w
//           float3 cDensityMapInvExtents;// Index:   25
//           float cDensityMapSparseSegmentScale;// Index:   25.w
//           float3 cDensityMapBias;    // Index:   26
//           float cDensityMapSparseCutoff;// Index:   26.w
//           float cVolFogExponentMultiply;// Index:   27
//           float cVolFogDistanceMultiply;// Index:   27.y
//           float cVolFogExponentNormalize;// Index:   27.z
//           float cVolFogDistanceNormalize;// Index:   27.w
//           float cVolFogResolutionScale;// Index:   28
//           int cVolFogWidth;          // Index:   28.y
//           int cVolFogHeight;         // Index:   28.z
//           int cVolFogDepth;          // Index:   28.w
//
//       } atmosphericConstants;        // Index:   16
//       int mipOffset;                 // Index:   29
//       int3 pad;                      // Index:   29.y
//
//   } resourceTables__passData;        // Index:    0-29             Components:   120
                                        // Textures:  t0-t1
//
// }
//
//
// Resource Bindings:
//
// Name                                 Type  Format         Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// resourceTables__passData__envmapSampler    sampler      NA          NA    1        1
// resourceTables__passData.environmentMap    texture  float4        cube    1        1
// ConstBuf__passData                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
// TEXCOORD                 1     zw        1     NONE   float     zw
//
//
// Output signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_Target                0   xyzw        0   TARGET   float   xyzw
// SV_Target                1   xy          1   TARGET   float   xy
//
ps_5_0
dcl_globalFlags refactoringAllowed
dcl_constantbuffer cb0[30], immediateIndexed
dcl_sampler s1, mode_default
dcl_resource_texturecube (float,float,float,float) t1
dcl_input_ps linear v1.zw
dcl_output o0.xyzw
dcl_output o1.xy
dcl_temps 50
dcl_resource_texture2d (float,float,float,float) t125
ld_indexable(texture2d)(float,float,float,float) r40.xyzw, l(0, 0, 0, 0), t125.xyzw
add r0.xy, v1.zwzz, cb0[14].xyxx
mul r1.xy, r0.xyxx, cb0[13].zwzz
mov r1.zw, l(0,0,0.000001,1.000000)

mov r21.xyzw, r1.xyzw

dp4 r0.z, r1.xyzw, cb0[3].xyzw
mad r40.w, r40.y, r0.z, l(-1.0)
mad r21.x, r40.x, r40.w, r21.x

dp4 r22.x, r21.xyzw, cb0[0].xyzw
dp4 r22.y, r21.xyzw, cb0[1].xyzw
dp4 r22.z, r21.xyzw, cb0[2].xyzw
dp4 r20.z, r21.xyzw, cb0[3].xyzw
div r21.xyz, r22.xyzx, r20.zzzz

dp4 r2.x, r1.xyzw, cb0[0].xyzw
dp4 r2.y, r1.xyzw, cb0[1].xyzw
dp4 r2.z, r1.xyzw, cb0[2].xyzw
dp4 r0.z, r1.xyzw, cb0[3].xyzw
div r1.xyz, r2.xyzx, r0.zzzz
mov r1.w, l(1.000000)
dp4 r2.x, r1.xyzw, cb0[4].xyzw
dp4 r2.y, r1.xyzw, cb0[5].xyzw
dp4 r0.z, r1.xyzw, cb0[7].xyzw
lt r0.w, l(1.000000012E-007), |r0.z|
div r2.xy, r2.xyxx, r0.zzzz
mad r0.xy, r0.xyxx, cb0[13].zwzz, -r2.xyxx
and o1.xy, r0.xyxx, r0.wwww
if_nz cb0[9].x
  add r0.xyz, -r21.xyzx, cb0[9].yzwy
  dp3 r0.w, r0.xyzx, r0.xyzx
  rsq r0.w, r0.w
  mul r0.xyz, r0.wwww, r0.xyzx
  dp3 r0.w, -r0.xyzx, cb0[15].xyzx
  add r0.w, r0.w, r0.w
  mad r1.xyz, cb0[15].xyzx, -r0.wwww, -r0.xyzx
  movc r0.xyz, cb0[10].xxxx, r1.xyzx, -r0.xyzx
  mul r1.xy, r0.zzzz, cb0[13].xyxx
  mad r0.xz, cb0[12].xxyx, r0.xxxx, r1.xxyx
  resinfo_indexable(texturecube)(float,float,float,float)_uint r0.w, l(0), t1.xyzw
  iadd r0.w, r0.w, -cb0[29].x
  imax r0.w, r0.w, l(0)
  utof r0.w, r0.w
  sample_l_indexable(texturecube)(float,float,float,float) r0.xyz, r0.xyzx, t1.xyzw, s1, r0.w
  mul r1.xyz, cb0[10].yzwy, cb0[11].xxxx
  mul r0.xyz, r0.xyzx, r1.xyzx
else
  mov r0.xyz, cb0[8].xyzx
endif
mov o0.xyz, r0.xyzx
mov o0.w, l(-1000000.000000)
ret
// Approximately 40 instruction slots used

///////////////////////////////// HLSL Code /////////////////////////////////
// // ---- Created with 3Dmigoto v1.3.16 on Mon Jan 24 22:51:42 2022
//
// cbuffer ConstBuf__passData : register(b0)
// {
//
//   struct
//   {
//     float4x4 projectionToWorld;
//     float4x4 previousWorldToProjection;
//     float3 clearColor;
//     bool fogBackground;
//     bool drawEnvMap;
//     float3 eyePosWS;
//     bool useReflectionPlane;
//     float3 envmapTint;
//     float envmapIntensity;
//     float2x2 envmapRotation;
//     float2 viewportScale;
//     float2 viewportOffset;
//     float4 reflectionPlaneWS;
//
//     struct
//     {
//       float3 cFogColor;
//       float cHeightFalloff;
//       float3 cEyePosition;
//       float cHeightDensity;
//       float cStartDistance;
//       float cGlobalDensity;
//       float cDepthReprojectScale;
//       float cDepthReprojectBias;
//       float4x4 cInvProjNoZReproj;
//       float3 cDirectionalFogDirection;
//       float cDirectionalityPower;
//       float3 cDirectionalFogColor;
//       float cDensityMapSparseBias;
//       float3 cDensityMapInvExtents;
//       float cDensityMapSparseSegmentScale;
//       float3 cDensityMapBias;
//       float cDensityMapSparseCutoff;
//       float cVolFogExponentMultiply;
//       float cVolFogDistanceMultiply;
//       float cVolFogExponentNormalize;
//       float cVolFogDistanceNormalize;
//       float cVolFogResolutionScale;
//       int cVolFogWidth;
//       int cVolFogHeight;
//       int cVolFogDepth;
//     } atmosphericConstants;
//
//     int mipOffset;
//     int3 pad;
//   } resourceTables__passData : packoffset(c0);
//
//
// SamplerState resourceTables__passData__envmapSampler_s : register(s1);
// TextureCube<float4> resourceTables__passData.environmentMap : register(t1);
//
//
// // 3Dmigoto declarations
// #define cmp -
// Texture1D<float4> IniParams : register(t120);
// Texture2D<float4> StereoParams : register(t125);
//
//
// void main(
//   float4 v0 : SV_POSITION0,
//   float2 v1 : TEXCOORD0,
//   float2 w1 : TEXCOORD1,
//   out float4 o0 : SV_Target0,
//   out float2 o1 : SV_Target1)
// {
// }
//////////////////////////////// HLSL Errors ////////////////////////////////
// error X3506: unrecognized compiler target '                                        // Textures:  t0-t1'
/////////////////////////////////////////////////////////////////////////////
