-
-
Save Zorro666/ea02690a1320e4d47084ca008dc4668d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; shader debug name: 11a262b34df116ff6758bf554518973c.pdb | |
; shader hash: 11a262b34df116ff6758bf554518973c | |
; Pixel Shader, compiled under SM6.2 | |
_dx.types.Handle = type { int8* } | |
_dx.types.ResRet.f32 = type { float, float, float, float, int } | |
_dx.types.CBufRet.f32 = type { float, float, float, float } | |
_dx.types.CBufRet.i32 = type { int, int, int, int } | |
_dx.types.ResRet.i32 = type { int, int, int, int, int } | |
_"hostlayout.class.StructuredBuffer<LightData>" = type { _hostlayout.struct.LightData } | |
_hostlayout.struct.LightData = type { float3, float, float3, int, float3, float2, float4[4] } | |
_"class.Texture2DArray<float>" = type { float, _"class.Texture2DArray<float>::mips_type" } | |
_"class.Texture2DArray<float>::mips_type" = type { int } | |
_struct.ByteAddressBuffer = type { int } | |
_"class.Texture2D<vector<float, 3> >" = type { float3, _"class.Texture2D<vector<float, 3> >::mips_type" } | |
_"class.Texture2D<vector<float, 3> >::mips_type" = type { int } | |
_"class.Texture2D<float>" = type { float, _"class.Texture2D<float>::mips_type" } | |
_"class.Texture2D<float>::mips_type" = type { int } | |
_PSConstants = type { float3, float3, float3, float4, float4, int4, int4, int } | |
_struct.SamplerState = type { int } | |
_struct.SamplerComparisonState = type { int } | |
Inputs | |
float4 SV_Position; | |
float3 WorldPos; | |
float2 TexCoord0; | |
float3 TexCoord1; | |
float3 TexCoord2; | |
float3 Normal; | |
float3 Tangent; | |
float3 Bitangent; | |
Outputs | |
float3 SV_Target0; | |
float3 SV_Target1; | |
StructuredBuffer<struct.LightData> lightBuffer : register(t14, space0); | |
Texture2DArray<float> lightShadowArrayTex : register(t15, space0); | |
ByteAddressBuffer<int> lightGrid : register(t16, space0); | |
Texture2D<float3> texDiffuse : register(t0, space0); | |
Texture2D<float3> texSpecular : register(t1, space0); | |
Texture2D<float3> texNormal : register(t3, space0); | |
Texture2D<float> texSSAO : register(t12, space0); | |
Texture2D<float> texShadow : register(t13, space0); | |
cbuffer PSConstants : register(b0, space0) | |
{ | |
float3 SunDirection; | |
float3 SunColor; | |
float3 AmbientColor; | |
float4 ShadowTexelSize; | |
float4 InvTileDim; | |
int4 TileCount; | |
int4 FirstLightIndex; | |
int FrameIndexMod2; | |
}; | |
SamplerState defaultSampler : register(s10, space0); | |
SamplerComparisonState shadowSampler : register(s11, space0); | |
void @main() | |
{ | |
_dx.types.Handle _texShadow_texture_2d = texShadow; // index = 13 | |
_dx.types.Handle _texSSAO_texture_2d = texSSAO; // index = 12 | |
_dx.types.Handle _texNormal_texture_2d = texNormal; // index = 3 | |
_dx.types.Handle _texSpecular_texture_2d = texSpecular; // index = 1 | |
_dx.types.Handle _texDiffuse_texture_2d = texDiffuse; // index = 0 | |
_dx.types.Handle _lightGrid_texture_rawbuf = lightGrid; // index = 16 | |
_dx.types.Handle _lightShadowArrayTex_texture_2darray = lightShadowArrayTex; // index = 15 | |
_dx.types.Handle _lightBuffer_texture_structbuf = lightBuffer; // index = 14 | |
_dx.types.Handle _shadowSampler_sampler = shadowSampler; // index = 11 | |
_dx.types.Handle _defaultSampler_sampler = defaultSampler; // index = 10 | |
_dx.types.Handle _PSConstants_cbuffer = PSConstants; | |
float _1 = <IN>.Bitangent.x; | |
float _2 = <IN>.Bitangent.y; | |
float _3 = <IN>.Bitangent.z; | |
float _4 = <IN>.Tangent.x; | |
float _5 = <IN>.Tangent.y; | |
float _6 = <IN>.Tangent.z; | |
float _7 = <IN>.Normal.x; | |
float _8 = <IN>.Normal.y; | |
float _9 = <IN>.Normal.z; | |
float _10 = <IN>.TexCoord2.x; | |
float _11 = <IN>.TexCoord2.y; | |
float _12 = <IN>.TexCoord2.z; | |
float _13 = <IN>.TexCoord1.x; | |
float _14 = <IN>.TexCoord1.y; | |
float _15 = <IN>.TexCoord1.z; | |
float _16 = <IN>.TexCoord0.x; | |
float _17 = <IN>.TexCoord0.y; | |
float _18 = <IN>.WorldPos.x; | |
float _19 = <IN>.WorldPos.y; | |
float _20 = <IN>.WorldPos.z; | |
float _21 = <IN>.SV_Position.x; | |
float _22 = <IN>.SV_Position.y; | |
int _23 = (int)(_21); // unsigned | |
int _24 = (int)(_22); // unsigned | |
_dx.types.ResRet.f32 _25 = texDiffuse.Sample(defaultSampler, _16, _17, Offset = {0, 0}); | |
float _26 = extractvalue _25, 0; | |
float _27 = extractvalue _25, 1; | |
float _28 = extractvalue _25, 2; | |
_dx.types.ResRet.f32 _TextureLoad = texSSAO.Load(_23, _24); | |
float _29 = extractvalue _TextureLoad, 0; | |
_dx.types.CBufRet.f32 _30 = {PSConstants.AmbientColor.x, PSConstants.AmbientColor.y, PSConstants.AmbientColor.z, <padding>}; // cbuffer = PSConstants, byte_offset = 32 | |
float _31 = extractvalue _30, 0; | |
float _32 = extractvalue _30, 1; | |
float _33 = extractvalue _30, 2; | |
float _.i0 = _29 * _26; | |
float _.i1 = _29 * _27; | |
float _.i2 = _29 * _28; | |
float _.i099 = _.i0 * _31; | |
float _.i1100 = _.i1 * _32; | |
float _.i2101 = _.i2 * _33; | |
_dx.types.ResRet.f32 _34 = texNormal.Sample(defaultSampler, _16, _17, Offset = {0, 0}); | |
float _35 = extractvalue _34, 0; | |
float _36 = extractvalue _34, 1; | |
float _37 = extractvalue _34, 2; | |
float _.i0102 = _35 * 2.00000; | |
float _.i1103 = _36 * 2.00000; | |
float _.i2104 = _37 * 2.00000; | |
float _.i0105 = _.i0102 + -1.00000; | |
float _.i1106 = _.i1103 + -1.00000; | |
float _.i2107 = _.i2104 + -1.00000; | |
float _38 = dot({_.i0105, _.i1106, _.i2107}, {_.i0105, _.i1106, _.i2107}); | |
float _Rsqrt24 = rsqrt(_38); | |
float _.i0108 = _.i0105 * _Rsqrt24; | |
float _.i1109 = _.i1106 * _Rsqrt24; | |
float _.i2110 = _.i2107 * _Rsqrt24; | |
float _39 = _Rsqrt24 * _38; | |
float _DerivCoarseX = ddx_coarse(_39); | |
float _FAbs23 = abs(_DerivCoarseX); | |
float _40 = 1.00000 - _FAbs23; | |
float _DerivCoarseY = ddy_coarse(_39); | |
float _FAbs = abs(_DerivCoarseY); | |
float _41 = _40 - _FAbs; | |
float _Saturate22 = sat(_41); | |
float _42 = _Saturate22 * 7.00000; | |
float _Exp = exp(_42); | |
float _43 = dot({_4, _5, _6}, {_4, _5, _6}); | |
float _Rsqrt15 = rsqrt(_43); | |
float _44 = dot({_1, _2, _3}, {_1, _2, _3}); | |
float _Rsqrt16 = rsqrt(_44); | |
float _.i0114 = _Rsqrt16 * _1; | |
float _.i1115 = _Rsqrt16 * _2; | |
float _.i2116 = _Rsqrt16 * _3; | |
float _45 = dot({_7, _8, _9}, {_7, _8, _9}); | |
float _Rsqrt17 = rsqrt(_45); | |
float _.i0117 = _Rsqrt17 * _7; | |
float _.i1118 = _Rsqrt17 * _8; | |
float _.i2119 = _Rsqrt17 * _9; | |
float _.i0111 = _.i0108 * _4; | |
float _46 = _.i0111 * _Rsqrt15; | |
float _FMad58 = mad(_.i1109, _.i0114, _46); | |
float _FMad57 = mad(_.i2110, _.i0117, _FMad58); | |
float _.i1112 = _.i0108 * _5; | |
float _47 = _.i1112 * _Rsqrt15; | |
float _FMad56 = mad(_.i1109, _.i1115, _47); | |
float _FMad55 = mad(_.i2110, _.i1118, _FMad56); | |
float _.i2113 = _.i0108 * _6; | |
float _48 = _.i2113 * _Rsqrt15; | |
float _FMad54 = mad(_.i1109, _.i2116, _48); | |
float _FMad53 = mad(_.i2110, _.i2119, _FMad54); | |
float _49 = dot({_FMad57, _FMad55, _FMad53}, {_FMad57, _FMad55, _FMad53}); | |
float _Rsqrt18 = rsqrt(_49); | |
float _.i0120 = _Rsqrt18 * _FMad57; | |
float _.i1121 = _Rsqrt18 * _FMad55; | |
float _.i2122 = _Rsqrt18 * _FMad53; | |
_dx.types.ResRet.f32 _50 = texSpecular.Sample(defaultSampler, _16, _17, Offset = {0, 0}); | |
float _51 = extractvalue _50, 1; | |
float _52 = dot({_13, _14, _15}, {_13, _14, _15}); | |
float _Rsqrt19 = rsqrt(_52); | |
float _.i0123 = _Rsqrt19 * _13; | |
float _.i1124 = _Rsqrt19 * _14; | |
float _.i2125 = _Rsqrt19 * _15; | |
_dx.types.CBufRet.f32 _53 = {PSConstants.SunColor.x, PSConstants.SunColor.y, PSConstants.SunColor.z, <padding>}; // cbuffer = PSConstants, byte_offset = 16 | |
float _54 = extractvalue _53, 0; | |
float _55 = extractvalue _53, 1; | |
float _56 = extractvalue _53, 2; | |
_dx.types.CBufRet.f32 _57 = {PSConstants.SunDirection.x, PSConstants.SunDirection.y, PSConstants.SunDirection.z, <padding>}; // cbuffer = PSConstants, byte_offset = 0 | |
float _58 = extractvalue _57, 0; | |
float _59 = extractvalue _57, 1; | |
float _60 = extractvalue _57, 2; | |
_dx.types.CBufRet.f32 _61 = {PSConstants.ShadowTexelSize.x, PSConstants.ShadowTexelSize.y, PSConstants.ShadowTexelSize.z, PSConstants.ShadowTexelSize.w}; // cbuffer = PSConstants, byte_offset = 48 | |
float _62 = extractvalue _61, 0; | |
float _63 = _62 * 0.250000; | |
float _64 = _62 * 1.75000; | |
float _65 = _62 * 1.25000; | |
float _66 = _62 * 0.750000; | |
_dx.types.ResRet.f32 _67 = texShadow.SampleCmpLevelZero(shadowSampler, _10, _11, Offset = {0, 0}, /*compareValue*/ _12); | |
float _68 = extractvalue _67, 0; | |
float _69 = _68 * 2.00000; | |
float _.i0126 = _10 - _64; | |
float _.i1127 = _63 + _11; | |
_dx.types.ResRet.f32 _70 = texShadow.SampleCmpLevelZero(shadowSampler, _.i0126, _.i1127, Offset = {0, 0}, /*compareValue*/ _12); | |
float _71 = extractvalue _70, 0; | |
float _72 = _71 + _69; | |
float _.i0128 = _10 - _63; | |
float _.i1129 = _11 - _64; | |
_dx.types.ResRet.f32 _73 = texShadow.SampleCmpLevelZero(shadowSampler, _.i0128, _.i1129, Offset = {0, 0}, /*compareValue*/ _12); | |
float _74 = extractvalue _73, 0; | |
float _75 = _72 + _74; | |
float _.i0130 = _64 + _10; | |
float _.i1131 = _11 - _63; | |
_dx.types.ResRet.f32 _76 = texShadow.SampleCmpLevelZero(shadowSampler, _.i0130, _.i1131, Offset = {0, 0}, /*compareValue*/ _12); | |
float _77 = extractvalue _76, 0; | |
float _78 = _75 + _77; | |
float _.i0132 = _63 + _10; | |
float _.i1133 = _64 + _11; | |
_dx.types.ResRet.f32 _79 = texShadow.SampleCmpLevelZero(shadowSampler, _.i0132, _.i1133, Offset = {0, 0}, /*compareValue*/ _12); | |
float _80 = extractvalue _79, 0; | |
float _81 = _78 + _80; | |
float _.i0134 = _10 - _66; | |
float _.i1135 = _65 + _11; | |
_dx.types.ResRet.f32 _82 = texShadow.SampleCmpLevelZero(shadowSampler, _.i0134, _.i1135, Offset = {0, 0}, /*compareValue*/ _12); | |
float _83 = extractvalue _82, 0; | |
float _84 = _81 + _83; | |
float _.i0136 = _10 - _65; | |
float _.i1137 = _11 - _66; | |
_dx.types.ResRet.f32 _85 = texShadow.SampleCmpLevelZero(shadowSampler, _.i0136, _.i1137, Offset = {0, 0}, /*compareValue*/ _12); | |
float _86 = extractvalue _85, 0; | |
float _87 = _84 + _86; | |
float _.i0138 = _66 + _10; | |
float _.i1139 = _11 - _65; | |
_dx.types.ResRet.f32 _88 = texShadow.SampleCmpLevelZero(shadowSampler, _.i0138, _.i1139, Offset = {0, 0}, /*compareValue*/ _12); | |
float _89 = extractvalue _88, 0; | |
float _90 = _87 + _89; | |
float _.i0140 = _65 + _10; | |
float _.i1141 = _66 + _11; | |
_dx.types.ResRet.f32 _91 = texShadow.SampleCmpLevelZero(shadowSampler, _.i0140, _.i1141, Offset = {0, 0}, /*compareValue*/ _12); | |
float _92 = extractvalue _91, 0; | |
float _93 = _90 + _92; | |
float _94 = _93 * 0.100000; | |
float _95 = _94 * _94; | |
float _.i0142 = _58 - _.i0123; | |
float _.i1143 = _59 - _.i1124; | |
float _.i2144 = _60 - _.i2125; | |
float _96 = dot({_.i0142, _.i1143, _.i2144}, {_.i0142, _.i1143, _.i2144}); | |
float _Rsqrt = rsqrt(_96); | |
float _.i0145 = _Rsqrt * _.i0142; | |
float _.i1146 = _Rsqrt * _.i1143; | |
float _.i2147 = _Rsqrt * _.i2144; | |
float _97 = dot({_.i0145, _.i1146, _.i2147}, {_.i0120, _.i1121, _.i2122}); | |
float _Saturate21 = sat(_97); | |
float _98 = dot({_58, _59, _60}, {_.i0145, _.i1146, _.i2147}); | |
float _Saturate20 = sat(_98); | |
float _99 = 1.00000 - _Saturate20; | |
float _Log61 = log(_99); | |
float _100 = _Log61 * 5.00000; | |
float _Exp62 = exp(_100); | |
float _.i0148 = 1.00000 - _26; | |
float _.i1149 = 1.00000 - _27; | |
float _.i2150 = 1.00000 - _28; | |
float _.i0151 = _Exp62 * _.i0148; | |
float _.i1152 = _Exp62 * _.i1149; | |
float _.i2153 = _Exp62 * _.i2150; | |
float _.i0154 = _.i0151 + _26; | |
float _.i1155 = _.i1152 + _27; | |
float _.i2156 = _.i2153 + _28; | |
float _.i0157 = _Exp62 * 0.560000; | |
float _.i0160406 = 0.560000 - _.i0157; | |
float _Log59 = log(_Saturate21); | |
float _101 = _Log59 * _Exp; | |
float _Exp60 = exp(_101); | |
float _102 = _Exp + 2.00000; | |
float _103 = _102 * 0.125000; | |
float _104 = _103 * _51; | |
float _105 = _104 * _Exp60; | |
float _106 = dot({_.i0120, _.i1121, _.i2122}, {_58, _59, _60}); | |
float _Saturate = sat(_106); | |
float _.i0166 = _105 * _.i0160406; | |
float _.i0169 = _.i0154 + _.i0166; | |
float _.i1170 = _.i1155 + _.i0166; | |
float _.i2171 = _.i2156 + _.i0166; | |
float _.i0163 = _95 * _54; | |
float _.i0172 = _.i0163 * _Saturate; | |
float _.i0175 = _.i0172 * _.i0169; | |
float _.i1164 = _95 * _55; | |
float _.i1173 = _.i1164 * _Saturate; | |
float _.i1176 = _.i1173 * _.i1170; | |
float _.i2165 = _95 * _56; | |
float _.i2174 = _.i2165 * _Saturate; | |
float _.i2177 = _.i2174 * _.i2171; | |
float _.i0178 = _.i0175 + _.i099; | |
float _.i1179 = _.i1176 + _.i1100; | |
float _.i2180 = _.i2177 + _.i2101; | |
_dx.types.CBufRet.f32 _107 = {PSConstants.InvTileDim.x, PSConstants.InvTileDim.y, PSConstants.InvTileDim.z, PSConstants.InvTileDim.w}; // cbuffer = PSConstants, byte_offset = 64 | |
float _108 = extractvalue _107, 0; | |
float _109 = extractvalue _107, 1; | |
float _.i0181 = (float)(_23); // unsigned | |
float _.i1182 = (float)(_24); // unsigned | |
float _.i0183 = _108 * _.i0181; | |
float _.i1184 = _109 * _.i1182; | |
int _.i0185 = (int)(_.i0183); // unsigned | |
int _.i1186 = (int)(_.i1184); // unsigned | |
_dx.types.CBufRet.i32 _110 = {PSConstants.TileCount.x, PSConstants.TileCount.y, PSConstants.TileCount.z, PSConstants.TileCount.w}; // cbuffer = PSConstants, byte_offset = 80 | |
int _111 = extractvalue _110, 0; | |
int _112 = _.i1186 * _111; | |
int _113 = _112 + _.i0185; | |
int _114 = _113 * 516; | |
_dx.types.ResRet.i32 _RawBufferLoad79 = lightGrid[_114]; | |
int _115 = extractvalue _RawBufferLoad79, 0; | |
int _116 = _115 & 255; | |
int _117 = _115 >> 8; // logical | |
int _118 = _117 & 255; | |
int _119 = _115 >> 16; // logical | |
int _120 = _119 & 255; | |
int _121 = _114 + 4; | |
bool _122 = (_116 == 0); | |
if (_122) goto _label_._crit_edge.114; else goto _label_.lr.ph10.preheader1; | |
_label_.lr.ph10.preheader1: | |
int _123 = _115 & 255; | |
int _124 = _123 << 2; | |
int _125 = _114 + _124; | |
goto _label_.lr.ph102; | |
_label_.lr.ph102: // preceeded by _label_.lr.ph102, _label_.lr.ph10.preheader1 | |
int _tileLightLoadOffset.i.0 = phi int [ _147, _label_.lr.ph102 ], [ _121, _label_.lr.ph10.preheader1 ]; | |
int _n.i.0 = phi int [ _146, _label_.lr.ph102 ], [ 0, _label_.lr.ph10.preheader1 ]; | |
float _colorSum.0.i0 = phi float [ _.i0187, _label_.lr.ph102 ], [ _.i0178, _label_.lr.ph10.preheader1 ]; | |
float _colorSum.0.i1 = phi float [ _.i1188, _label_.lr.ph102 ], [ _.i1179, _label_.lr.ph10.preheader1 ]; | |
float _colorSum.0.i2 = phi float [ _.i2189, _label_.lr.ph102 ], [ _.i2180, _label_.lr.ph10.preheader1 ]; | |
_dx.types.ResRet.i32 _RawBufferLoad = lightGrid[_tileLightLoadOffset.i.0]; | |
int _126 = extractvalue _RawBufferLoad, 0; | |
_dx.types.ResRet.f32 _RawBufferLoad82 = lightBuffer[_126]; | |
float _127 = extractvalue _RawBufferLoad82, 0; | |
float _128 = extractvalue _RawBufferLoad82, 1; | |
float _129 = extractvalue _RawBufferLoad82, 2; | |
_dx.types.ResRet.f32 _RawBufferLoad81 = *(&lightBuffer[_126] + 12 bytes); | |
float _130 = extractvalue _RawBufferLoad81, 0; | |
_dx.types.ResRet.f32 _RawBufferLoad80 = *(&lightBuffer[_126] + 16 bytes); | |
float _131 = extractvalue _RawBufferLoad80, 0; | |
float _132 = extractvalue _RawBufferLoad80, 1; | |
float _133 = extractvalue _RawBufferLoad80, 2; | |
float _.i0190 = _127 - _18; | |
float _.i1191 = _128 - _19; | |
float _.i2192 = _129 - _20; | |
float _134 = dot({_.i0190, _.i1191, _.i2192}, {_.i0190, _.i1191, _.i2192}); | |
float _Rsqrt29 = rsqrt(_134); | |
float _.i0193 = _Rsqrt29 * _.i0190; | |
float _.i1194 = _Rsqrt29 * _.i1191; | |
float _.i2195 = _Rsqrt29 * _.i2192; | |
float _135 = _Rsqrt29 * _Rsqrt29; | |
float _136 = _135 * _130; | |
float _Rsqrt28 = rsqrt(_136); | |
float _137 = _136 - _Rsqrt28; | |
float _FMax = max(0.000000, _137); | |
float _.i0196 = _.i0193 - _.i0123; | |
float _.i1197 = _.i1194 - _.i1124; | |
float _.i2198 = _.i2195 - _.i2125; | |
float _138 = dot({_.i0196, _.i1197, _.i2198}, {_.i0196, _.i1197, _.i2198}); | |
float _Rsqrt12 = rsqrt(_138); | |
float _.i0199 = _Rsqrt12 * _.i0196; | |
float _.i1200 = _Rsqrt12 * _.i1197; | |
float _.i2201 = _Rsqrt12 * _.i2198; | |
float _139 = dot({_.i0199, _.i1200, _.i2201}, {_.i0120, _.i1121, _.i2122}); | |
float _Saturate27 = sat(_139); | |
float _140 = dot({_.i0193, _.i1194, _.i2195}, {_.i0199, _.i1200, _.i2201}); | |
float _Saturate26 = sat(_140); | |
float _141 = 1.00000 - _Saturate26; | |
float _Log65 = log(_141); | |
float _142 = _Log65 * 5.00000; | |
float _Exp66 = exp(_142); | |
float _.i0205 = _Exp66 * _.i0148; | |
float _.i1206 = _Exp66 * _.i1149; | |
float _.i2207 = _Exp66 * _.i2150; | |
float _.i0208 = _.i0205 + _26; | |
float _.i1209 = _.i1206 + _27; | |
float _.i2210 = _.i2207 + _28; | |
float _.i0211 = _Exp66 * 0.560000; | |
float _.i0214409 = 0.560000 - _.i0211; | |
float _Log63 = log(_Saturate27); | |
float _143 = _Log63 * _Exp; | |
float _Exp64 = exp(_143); | |
float _144 = _104 * _Exp64; | |
float _145 = dot({_.i0120, _.i1121, _.i2122}, {_.i0193, _.i1194, _.i2195}); | |
float _Saturate25 = sat(_145); | |
float _.i0220 = _144 * _.i0214409; | |
float _.i0223 = _.i0208 + _.i0220; | |
float _.i1224 = _.i1209 + _.i0220; | |
float _.i2225 = _.i2210 + _.i0220; | |
float _.i0217 = _FMax * _131; | |
float _.i0226 = _.i0217 * _Saturate25; | |
float _.i0229 = _.i0226 * _.i0223; | |
float _.i1218 = _FMax * _132; | |
float _.i1227 = _.i1218 * _Saturate25; | |
float _.i1230 = _.i1227 * _.i1224; | |
float _.i2219 = _FMax * _133; | |
float _.i2228 = _.i2219 * _Saturate25; | |
float _.i2231 = _.i2228 * _.i2225; | |
float _.i0187 = _.i0229 + _colorSum.0.i0; | |
float _.i1188 = _.i1230 + _colorSum.0.i1; | |
float _.i2189 = _.i2231 + _colorSum.0.i2; | |
int _146 = _n.i.0 + 1; | |
int _147 = _tileLightLoadOffset.i.0 + 4; | |
bool _exitcond421 = (_146 == _123); | |
if (_exitcond421) goto _label_._crit_edge.11.loopexit3; else goto _label_.lr.ph102; | |
_label_._crit_edge.11.loopexit3: // preceeded by _label_.lr.ph102 | |
int _148 = _125 + 4; | |
goto _label_._crit_edge.114; | |
_label_._crit_edge.114: // preceeded by _label_._crit_edge.11.loopexit3 | |
int _tileLightLoadOffset.i.1 = phi int [ _121, _label0 ], [ _148, _label_._crit_edge.11.loopexit3 ]; | |
float _colorSum.1.i0 = phi float [ _.i0178, _label0 ], [ _.i0187, _label_._crit_edge.11.loopexit3 ]; | |
float _colorSum.1.i1 = phi float [ _.i1179, _label0 ], [ _.i1188, _label_._crit_edge.11.loopexit3 ]; | |
float _colorSum.1.i2 = phi float [ _.i2180, _label0 ], [ _.i2189, _label_._crit_edge.11.loopexit3 ]; | |
bool _149 = (_118 == 0); | |
if (_149) goto _label_._crit_edge8; else goto _label_.lr.ph8.preheader5; | |
_label_.lr.ph8.preheader5: // preceeded by _label_._crit_edge.114 | |
int _150 = _117 & 255; | |
int _151 = _150 << 2; | |
goto _label_.lr.ph86; | |
_label_.lr.ph86: // preceeded by _label_.lr.ph86, _label_.lr.ph8.preheader5 | |
int _tileLightLoadOffset.i.2 = phi int [ _182, _label_.lr.ph86 ], [ _tileLightLoadOffset.i.1, _label_.lr.ph8.preheader5 ]; | |
int _n.i.1 = phi int [ _181, _label_.lr.ph86 ], [ 0, _label_.lr.ph8.preheader5 ]; | |
float _colorSum.2.i0 = phi float [ _.i0235, _label_.lr.ph86 ], [ _colorSum.1.i0, _label_.lr.ph8.preheader5 ]; | |
float _colorSum.2.i1 = phi float [ _.i1236, _label_.lr.ph86 ], [ _colorSum.1.i1, _label_.lr.ph8.preheader5 ]; | |
float _colorSum.2.i2 = phi float [ _.i2237, _label_.lr.ph86 ], [ _colorSum.1.i2, _label_.lr.ph8.preheader5 ]; | |
_dx.types.ResRet.i32 _RawBufferLoad77 = lightGrid[_tileLightLoadOffset.i.2]; | |
int _152 = extractvalue _RawBufferLoad77, 0; | |
_dx.types.ResRet.f32 _RawBufferLoad87 = lightBuffer[_152]; | |
float _153 = extractvalue _RawBufferLoad87, 0; | |
float _154 = extractvalue _RawBufferLoad87, 1; | |
float _155 = extractvalue _RawBufferLoad87, 2; | |
_dx.types.ResRet.f32 _RawBufferLoad86 = *(&lightBuffer[_152] + 12 bytes); | |
float _156 = extractvalue _RawBufferLoad86, 0; | |
_dx.types.ResRet.f32 _RawBufferLoad85 = *(&lightBuffer[_152] + 16 bytes); | |
float _157 = extractvalue _RawBufferLoad85, 0; | |
float _158 = extractvalue _RawBufferLoad85, 1; | |
float _159 = extractvalue _RawBufferLoad85, 2; | |
_dx.types.ResRet.f32 _RawBufferLoad84 = *(&lightBuffer[_152] + 32 bytes); | |
float _160 = extractvalue _RawBufferLoad84, 0; | |
float _161 = extractvalue _RawBufferLoad84, 1; | |
float _162 = extractvalue _RawBufferLoad84, 2; | |
_dx.types.ResRet.f32 _RawBufferLoad83 = *(&lightBuffer[_152] + 44 bytes); | |
float _163 = extractvalue _RawBufferLoad83, 0; | |
float _164 = extractvalue _RawBufferLoad83, 1; | |
float _.i0238 = _153 - _18; | |
float _.i1239 = _154 - _19; | |
float _.i2240 = _155 - _20; | |
float _165 = dot({_.i0238, _.i1239, _.i2240}, {_.i0238, _.i1239, _.i2240}); | |
float _Rsqrt35 = rsqrt(_165); | |
float _.i0241 = _Rsqrt35 * _.i0238; | |
float _.i1242 = _Rsqrt35 * _.i1239; | |
float _.i2243 = _Rsqrt35 * _.i2240; | |
float _166 = _Rsqrt35 * _Rsqrt35; | |
float _167 = _166 * _156; | |
float _Rsqrt34 = rsqrt(_167); | |
float _168 = _167 - _Rsqrt34; | |
float _FMax71 = max(0.000000, _168); | |
float _.i0244 = -0.000000 - _.i0241; | |
float _.i1245 = -0.000000 - _.i1242; | |
float _.i2246 = -0.000000 - _.i2243; | |
float _169 = dot({_.i0244, _.i1245, _.i2246}, {_160, _161, _162}); | |
float _170 = _169 - _164; | |
float _171 = _170 * _163; | |
float _Saturate33 = sat(_171); | |
float _172 = _Saturate33 * _FMax71; | |
float _.i0247 = _.i0241 - _.i0123; | |
float _.i1248 = _.i1242 - _.i1124; | |
float _.i2249 = _.i2243 - _.i2125; | |
float _173 = dot({_.i0247, _.i1248, _.i2249}, {_.i0247, _.i1248, _.i2249}); | |
float _Rsqrt13 = rsqrt(_173); | |
float _.i0250 = _Rsqrt13 * _.i0247; | |
float _.i1251 = _Rsqrt13 * _.i1248; | |
float _.i2252 = _Rsqrt13 * _.i2249; | |
float _174 = dot({_.i0250, _.i1251, _.i2252}, {_.i0120, _.i1121, _.i2122}); | |
float _Saturate32 = sat(_174); | |
float _175 = dot({_.i0241, _.i1242, _.i2243}, {_.i0250, _.i1251, _.i2252}); | |
float _Saturate31 = sat(_175); | |
float _176 = 1.00000 - _Saturate31; | |
float _Log69 = log(_176); | |
float _177 = _Log69 * 5.00000; | |
float _Exp70 = exp(_177); | |
float _.i0256 = _Exp70 * _.i0148; | |
float _.i1257 = _Exp70 * _.i1149; | |
float _.i2258 = _Exp70 * _.i2150; | |
float _.i0259 = _.i0256 + _26; | |
float _.i1260 = _.i1257 + _27; | |
float _.i2261 = _.i2258 + _28; | |
float _.i0262 = _Exp70 * 0.560000; | |
float _.i0265412 = 0.560000 - _.i0262; | |
float _Log67 = log(_Saturate32); | |
float _178 = _Log67 * _Exp; | |
float _Exp68 = exp(_178); | |
float _179 = _104 * _Exp68; | |
float _180 = dot({_.i0120, _.i1121, _.i2122}, {_.i0241, _.i1242, _.i2243}); | |
float _Saturate30 = sat(_180); | |
float _.i0271 = _179 * _.i0265412; | |
float _.i0274 = _.i0259 + _.i0271; | |
float _.i1275 = _.i1260 + _.i0271; | |
float _.i2276 = _.i2261 + _.i0271; | |
float _.i0268 = _172 * _157; | |
float _.i0277 = _.i0268 * _Saturate30; | |
float _.i0280 = _.i0277 * _.i0274; | |
float _.i1269 = _172 * _158; | |
float _.i1278 = _.i1269 * _Saturate30; | |
float _.i1281 = _.i1278 * _.i1275; | |
float _.i2270 = _172 * _159; | |
float _.i2279 = _.i2270 * _Saturate30; | |
float _.i2282 = _.i2279 * _.i2276; | |
float _.i0235 = _.i0280 + _colorSum.2.i0; | |
float _.i1236 = _.i1281 + _colorSum.2.i1; | |
float _.i2237 = _.i2282 + _colorSum.2.i2; | |
int _181 = _n.i.1 + 1; | |
int _182 = _tileLightLoadOffset.i.2 + 4; | |
bool _exitcond420 = (_181 == _150); | |
if (_exitcond420) goto _label_._crit_edge.loopexit7; else goto _label_.lr.ph86; | |
_label_._crit_edge.loopexit7: // preceeded by _label_.lr.ph86 | |
int _183 = _tileLightLoadOffset.i.1 + _151; | |
goto _label_._crit_edge8; | |
_label_._crit_edge8: // preceeded by _label_._crit_edge.loopexit7, _label_._crit_edge.114 | |
int _tileLightLoadOffset.i.3 = phi int [ _tileLightLoadOffset.i.1, _label_._crit_edge.114 ], [ _183, _label_._crit_edge.loopexit7 ]; | |
float _colorSum.3.i0 = phi float [ _colorSum.1.i0, _label_._crit_edge.114 ], [ _.i0235, _label_._crit_edge.loopexit7 ]; | |
float _colorSum.3.i1 = phi float [ _colorSum.1.i1, _label_._crit_edge.114 ], [ _.i1236, _label_._crit_edge.loopexit7 ]; | |
float _colorSum.3.i2 = phi float [ _colorSum.1.i2, _label_._crit_edge.114 ], [ _.i2237, _label_._crit_edge.loopexit7 ]; | |
bool _184 = (_120 == 0); | |
if (_184) goto _label_ShadeLights12; else goto _label_.lr.ph.preheader9; | |
_label_.lr.ph.preheader9: // preceeded by _label_._crit_edge8 | |
int _185 = _119 & 255; | |
goto _label_.lr.ph10; | |
_label_.lr.ph10: // preceeded by _label_.lr.ph10, _label_.lr.ph.preheader9 | |
int _tileLightLoadOffset.i.4 = phi int [ _245, _label_.lr.ph10 ], [ _tileLightLoadOffset.i.3, _label_.lr.ph.preheader9 ]; | |
int _n.i.2 = phi int [ _244, _label_.lr.ph10 ], [ 0, _label_.lr.ph.preheader9 ]; | |
float _colorSum.4.i0 = phi float [ _.i0286, _label_.lr.ph10 ], [ _colorSum.3.i0, _label_.lr.ph.preheader9 ]; | |
float _colorSum.4.i1 = phi float [ _.i1287, _label_.lr.ph10 ], [ _colorSum.3.i1, _label_.lr.ph.preheader9 ]; | |
float _colorSum.4.i2 = phi float [ _.i2288, _label_.lr.ph10 ], [ _colorSum.3.i2, _label_.lr.ph.preheader9 ]; | |
_dx.types.ResRet.i32 _RawBufferLoad78 = lightGrid[_tileLightLoadOffset.i.4]; | |
int _186 = extractvalue _RawBufferLoad78, 0; | |
_dx.types.ResRet.f32 _RawBufferLoad96 = lightBuffer[_186]; | |
float _187 = extractvalue _RawBufferLoad96, 0; | |
float _188 = extractvalue _RawBufferLoad96, 1; | |
float _189 = extractvalue _RawBufferLoad96, 2; | |
_dx.types.ResRet.f32 _RawBufferLoad95 = *(&lightBuffer[_186] + 12 bytes); | |
float _190 = extractvalue _RawBufferLoad95, 0; | |
_dx.types.ResRet.f32 _RawBufferLoad94 = *(&lightBuffer[_186] + 16 bytes); | |
float _191 = extractvalue _RawBufferLoad94, 0; | |
float _192 = extractvalue _RawBufferLoad94, 1; | |
float _193 = extractvalue _RawBufferLoad94, 2; | |
_dx.types.ResRet.f32 _RawBufferLoad93 = *(&lightBuffer[_186] + 32 bytes); | |
float _194 = extractvalue _RawBufferLoad93, 0; | |
float _195 = extractvalue _RawBufferLoad93, 1; | |
float _196 = extractvalue _RawBufferLoad93, 2; | |
_dx.types.ResRet.f32 _RawBufferLoad92 = *(&lightBuffer[_186] + 44 bytes); | |
float _197 = extractvalue _RawBufferLoad92, 0; | |
float _198 = extractvalue _RawBufferLoad92, 1; | |
_dx.types.ResRet.f32 _RawBufferLoad88 = *(&lightBuffer[_186] + 52 bytes); | |
float _199 = extractvalue _RawBufferLoad88, 0; | |
float _200 = extractvalue _RawBufferLoad88, 1; | |
float _201 = extractvalue _RawBufferLoad88, 2; | |
float _202 = extractvalue _RawBufferLoad88, 3; | |
_dx.types.ResRet.f32 _RawBufferLoad89 = *(&lightBuffer[_186] + 68 bytes); | |
float _203 = extractvalue _RawBufferLoad89, 0; | |
float _204 = extractvalue _RawBufferLoad89, 1; | |
float _205 = extractvalue _RawBufferLoad89, 2; | |
float _206 = extractvalue _RawBufferLoad89, 3; | |
_dx.types.ResRet.f32 _RawBufferLoad90 = *(&lightBuffer[_186] + 84 bytes); | |
float _207 = extractvalue _RawBufferLoad90, 0; | |
float _208 = extractvalue _RawBufferLoad90, 1; | |
float _209 = extractvalue _RawBufferLoad90, 2; | |
float _210 = extractvalue _RawBufferLoad90, 3; | |
_dx.types.ResRet.f32 _RawBufferLoad91 = *(&lightBuffer[_186] + 100 bytes); | |
float _211 = extractvalue _RawBufferLoad91, 0; | |
float _212 = extractvalue _RawBufferLoad91, 1; | |
float _213 = extractvalue _RawBufferLoad91, 2; | |
float _214 = extractvalue _RawBufferLoad91, 3; | |
float _215 = _199 * _18; | |
float _FMad52 = mad(_203, _19, _215); | |
float _FMad51 = mad(_207, _20, _FMad52); | |
float _216 = _FMad51 + _211; | |
float _217 = _200 * _18; | |
float _FMad49 = mad(_204, _19, _217); | |
float _FMad48 = mad(_208, _20, _FMad49); | |
float _218 = _FMad48 + _212; | |
float _219 = _201 * _18; | |
float _FMad46 = mad(_205, _19, _219); | |
float _FMad45 = mad(_209, _20, _FMad46); | |
float _220 = _FMad45 + _213; | |
float _221 = _202 * _18; | |
float _FMad43 = mad(_206, _19, _221); | |
float _FMad42 = mad(_210, _20, _FMad43); | |
float _222 = _FMad42 + _214; | |
float _223 = 1.00000 / _222; | |
float _.i0289 = _223 * _216; | |
float _.i1290 = _223 * _218; | |
float _.i2291 = _223 * _220; | |
float _224 = (float)(_186); // unsigned | |
_dx.types.ResRet.f32 _225 = lightShadowArrayTex.SampleCmpLevelZero(shadowSampler, _.i0289, _.i1290, _224, Offset = {0, 0}, /*compareValue*/ _.i2291); | |
float _226 = extractvalue _225, 0; | |
float _227 = _226 * _226; | |
float _.i0292 = _187 - _18; | |
float _.i1293 = _188 - _19; | |
float _.i2294 = _189 - _20; | |
float _228 = dot({_.i0292, _.i1293, _.i2294}, {_.i0292, _.i1293, _.i2294}); | |
float _Rsqrt41 = rsqrt(_228); | |
float _.i0295 = _Rsqrt41 * _.i0292; | |
float _.i1296 = _Rsqrt41 * _.i1293; | |
float _.i2297 = _Rsqrt41 * _.i2294; | |
float _229 = _Rsqrt41 * _Rsqrt41; | |
float _230 = _229 * _190; | |
float _Rsqrt40 = rsqrt(_230); | |
float _231 = _230 - _Rsqrt40; | |
float _FMax76 = max(0.000000, _231); | |
float _.i0298 = -0.000000 - _.i0295; | |
float _.i1299 = -0.000000 - _.i1296; | |
float _.i2300 = -0.000000 - _.i2297; | |
float _232 = dot({_.i0298, _.i1299, _.i2300}, {_194, _195, _196}); | |
float _233 = _232 - _198; | |
float _234 = _233 * _197; | |
float _Saturate39 = sat(_234); | |
float _235 = _Saturate39 * _FMax76; | |
float _.i0301 = _.i0295 - _.i0123; | |
float _.i1302 = _.i1296 - _.i1124; | |
float _.i2303 = _.i2297 - _.i2125; | |
float _236 = dot({_.i0301, _.i1302, _.i2303}, {_.i0301, _.i1302, _.i2303}); | |
float _Rsqrt14 = rsqrt(_236); | |
float _.i0304 = _Rsqrt14 * _.i0301; | |
float _.i1305 = _Rsqrt14 * _.i1302; | |
float _.i2306 = _Rsqrt14 * _.i2303; | |
float _237 = dot({_.i0304, _.i1305, _.i2306}, {_.i0120, _.i1121, _.i2122}); | |
float _Saturate38 = sat(_237); | |
float _238 = dot({_.i0295, _.i1296, _.i2297}, {_.i0304, _.i1305, _.i2306}); | |
float _Saturate37 = sat(_238); | |
float _239 = 1.00000 - _Saturate37; | |
float _Log74 = log(_239); | |
float _240 = _Log74 * 5.00000; | |
float _Exp75 = exp(_240); | |
float _.i0310 = _Exp75 * _.i0148; | |
float _.i1311 = _Exp75 * _.i1149; | |
float _.i2312 = _Exp75 * _.i2150; | |
float _.i0313 = _.i0310 + _26; | |
float _.i1314 = _.i1311 + _27; | |
float _.i2315 = _.i2312 + _28; | |
float _.i0316 = _Exp75 * 0.560000; | |
float _.i0319415 = 0.560000 - _.i0316; | |
float _Log72 = log(_Saturate38); | |
float _241 = _Log72 * _Exp; | |
float _Exp73 = exp(_241); | |
float _242 = _104 * _Exp73; | |
float _243 = dot({_.i0120, _.i1121, _.i2122}, {_.i0295, _.i1296, _.i2297}); | |
float _Saturate36 = sat(_243); | |
float _.i0325 = _242 * _.i0319415; | |
float _.i0328 = _.i0313 + _.i0325; | |
float _.i1329 = _.i1314 + _.i0325; | |
float _.i2330 = _.i2315 + _.i0325; | |
float _.i0322 = _227 * _191; | |
float _.i0331 = _.i0322 * _235; | |
float _.i0334 = _.i0331 * _Saturate36; | |
float _.i0337 = _.i0334 * _.i0328; | |
float _.i1323 = _227 * _192; | |
float _.i1332 = _.i1323 * _235; | |
float _.i1335 = _.i1332 * _Saturate36; | |
float _.i1338 = _.i1335 * _.i1329; | |
float _.i2324 = _227 * _193; | |
float _.i2333 = _.i2324 * _235; | |
float _.i2336 = _.i2333 * _Saturate36; | |
float _.i2339 = _.i2336 * _.i2330; | |
float _.i0286 = _.i0337 + _colorSum.4.i0; | |
float _.i1287 = _.i1338 + _colorSum.4.i1; | |
float _.i2288 = _.i2339 + _colorSum.4.i2; | |
int _244 = _n.i.2 + 1; | |
int _245 = _tileLightLoadOffset.i.4 + 4; | |
bool _exitcond = (_244 == _185); | |
if (_exitcond) goto _label_ShadeLights11; else goto _label_.lr.ph10; | |
_label_ShadeLights11: // preceeded by _label_.lr.ph10 | |
goto _label_ShadeLights12; | |
_label_ShadeLights12: // preceeded by _label_ShadeLights11, _label_._crit_edge8 | |
float _colorSum.5.i0 = phi float [ _colorSum.3.i0, _label_._crit_edge8 ], [ _.i0286, _label_ShadeLights11 ]; | |
float _colorSum.5.i1 = phi float [ _colorSum.3.i1, _label_._crit_edge8 ], [ _.i1287, _label_ShadeLights11 ]; | |
float _colorSum.5.i2 = phi float [ _colorSum.3.i2, _label_._crit_edge8 ], [ _.i2288, _label_ShadeLights11 ]; | |
<OUT>.SV_Target1.x = _.i0120; | |
<OUT>.SV_Target1.y = _.i1121; | |
<OUT>.SV_Target1.z = _.i2122; | |
<OUT>.SV_Target0.x = _colorSum.5.i0; | |
<OUT>.SV_Target0.y = _colorSum.5.i1; | |
<OUT>.SV_Target0.z = _colorSum.5.i2; | |
return; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment