#define saturate_color #define nopacked #define floatinterpolation #define depth_compare #pragma warning(disable : 3205) typedef bool4 SLT_BOOL4; typedef float2 SLT_FLOAT2; typedef float4 SLT_FLOAT4; typedef float2 SLT_POINT2; typedef float4 SLT_POINT4; typedef half SLT_COLOR; typedef half SLT_COLOR1; typedef half3 SLT_COLOR3; typedef half4 SLT_COLOR4; typedef half2 SLT_TEXCOORD2; typedef float SLT_SHADOWMAP1; typedef float3 SLT_SHADOWMAP3; typedef float4 SLT_SHADOWMAP4; typedef sampler2D SLT_SAMPLER_2D; typedef float4 SLT_PARAM_FLOAT4; SLT_COLOR4 slcGetTexMultiplier() { return half4( 1.0, 1.0, 1.0, 1.0 ); } void slCompositVertexMainLightTerm_unfolded0001(inout SLT_COLOR3 _clSubLight, SLT_COLOR3 _clMainLight, half _pipe_fShadow) { _clSubLight = _pipe_fShadow * _clMainLight + _clSubLight; } void slCompositVertexMainLightTerm_unfolded0000(inout SLT_COLOR3 _clSubLight, SLT_COLOR3 _clMainLight, half _pipe_fShadow) { _clSubLight = _pipe_fShadow * _clMainLight + _clSubLight; } void slApplyMainLightColor_unfolded0002(inout SLT_COLOR3 _color, half4 _pipe_cPattern) { _color *= _pipe_cPattern.rgb; } void slApplyMainLightColor_unfolded0003(inout SLT_COLOR3 _color, half4 _pipe_cPattern) { _color *= _pipe_cPattern.rgb; } void slCompositVertexMainLightingResultDefault_unfolded0000(inout half3 _pipe_clMainDiffuse, inout half4 _pipe_clDiffuse, inout half3 _pipe_clMainSpecular, inout half3 _pipe_clSpecular, half4 _pipe_cPattern, half _pipe_fShadow) { { SLT_COLOR3 _clMainDiffuse = ( half3 )_pipe_clMainDiffuse.rgb; slApplyMainLightColor_unfolded0002( _clMainDiffuse, _pipe_cPattern ); slCompositVertexMainLightTerm_unfolded0000( _pipe_clDiffuse.xyz, _clMainDiffuse, _pipe_fShadow ); } { SLT_COLOR3 _clMainSpecular = ( half3 )_pipe_clMainSpecular.rgb; slApplyMainLightColor_unfolded0003( _clMainSpecular, _pipe_cPattern ); slCompositVertexMainLightTerm_unfolded0001( _pipe_clSpecular, _clMainSpecular, _pipe_fShadow ); } } SLT_COLOR3 slClampLightColor(SLT_COLOR3 _color) { { return _color; } } SLT_POINT4 slGetWorldPosition_unfolded0002(float4 _pipe_vWorldPos) { return _pipe_vWorldPos; } typedef SLT_SAMPLER_2D SLT_PATTERNMAP_SAMPLER; SLT_PATTERNMAP_SAMPLER sLit : register(s1) < >; void slSetUpPatternMapPixel_unfolded0000(half2 _pipe_vPatternPos, out half4 _pipe_cPattern) { { SLT_COLOR4 _clPatternMap; _clPatternMap = tex2D( sLit, ( half2 )_pipe_vPatternPos ); _pipe_cPattern = _clPatternMap; } } void slOutputSSSPixel_unfolded0000(inout SLT_COLOR4 _color0) { return; } void slSetUpAccessoryPixel_unfolded0000(half2 _pipe_vPatternPos, out half4 _pipe_cPattern) { slSetUpPatternMapPixel_unfolded0000( _pipe_vPatternPos, _pipe_cPattern ); } void slCompositVertexMainLightingResult_unfolded0000(inout half3 _pipe_clMainDiffuse, inout half4 _pipe_clDiffuse, inout half3 _pipe_clMainSpecular, inout half3 _pipe_clSpecular, half4 _pipe_cPattern, half _pipe_fShadow) { slCompositVertexMainLightingResultDefault_unfolded0000( _pipe_clMainDiffuse, _pipe_clDiffuse, _pipe_clMainSpecular, _pipe_clSpecular, _pipe_cPattern, _pipe_fShadow ); } void slApplyAccessoryPixelLighting_unfolded0000(inout half3 _pipe_clMainDiffuse, inout half4 _pipe_clDiffuse, inout half3 _pipe_clMainSpecular, inout half3 _pipe_clSpecular, half4 _pipe_cPattern, out half _pipe_fShadow, SLT_COLOR _fShadow) { _pipe_fShadow = _fShadow; slCompositVertexMainLightingResult_unfolded0000( _pipe_clMainDiffuse, _pipe_clDiffuse, _pipe_clMainSpecular, _pipe_clSpecular, _pipe_cPattern, _pipe_fShadow ); } SLT_COLOR4 slGetTerrainBlendedColor_unfolded0001(half4 _pipe_clBlendTexture) { return _pipe_clBlendTexture; } void slApplyTerrainSpecularMap_unfolded0000(inout half3 _pipe_clSpecular, half _pipe_fTerrainSpMap1st) { _pipe_clSpecular = slClampLightColor( _pipe_clSpecular ); _pipe_clSpecular *= _pipe_fTerrainSpMap1st; } void slApplyTextureStages_unfolded0000(inout half4 _pipe_clDiffuse, inout half3 _pipe_clSpecular, half4 _pipe_clBlendTexture, half _pipe_fTerrainSpMap1st) { _pipe_clDiffuse.rgb = slClampLightColor( _pipe_clDiffuse.rgb ); _pipe_clDiffuse.rgb *= slGetTerrainBlendedColor_unfolded0001( _pipe_clBlendTexture ).rgb; slApplyTerrainSpecularMap_unfolded0000( _pipe_clSpecular, _pipe_fTerrainSpMap1st ); _pipe_clDiffuse *= slcGetTexMultiplier(); } void slApplyAccessoryTextureStages_unfolded0000(inout half4 _pipe_clDiffuse, inout half3 _pipe_clSpecular, half4 _pipe_clBlendTexture, half _pipe_fTerrainSpMap1st) { slApplyTextureStages_unfolded0000( _pipe_clDiffuse, _pipe_clSpecular, _pipe_clBlendTexture, _pipe_fTerrainSpMap1st ); } SLT_COLOR4 slGetAccessoryComposedColor_unfolded0000(half4 _pipe_clDiffuse, half3 _pipe_clSpecular) { SLT_COLOR4 _clOut = _pipe_clDiffuse; _clOut.rgb += _pipe_clSpecular; return _clOut; } void slApplyAccessoryTextures_unfolded0000(out SLT_COLOR4 _clOut, inout half4 _pipe_clDiffuse, inout half3 _pipe_clSpecular, half4 _pipe_clBlendTexture, half _pipe_fTerrainSpMap1st) { slApplyAccessoryTextureStages_unfolded0000( _pipe_clDiffuse, _pipe_clSpecular, _pipe_clBlendTexture, _pipe_fTerrainSpMap1st ); _clOut = slGetAccessoryComposedColor_unfolded0000( _pipe_clDiffuse, _pipe_clSpecular ); } void slOutputAccessoryPixel_unfolded0000(inout SLT_COLOR4 _color0) { slOutputSSSPixel_unfolded0000( _color0 ); } SLT_PARAM_FLOAT4 scSM:register(c3); typedef SLT_SAMPLER_2D SLT_SAMPLER_SHADOWMAP; SLT_SAMPLER_SHADOWMAP sShadow : register(s0) < >; SLT_COLOR4 slGetShadowValue(SLT_FLOAT4 _vShadowMapValue, SLT_FLOAT4 _vDepth) { SLT_BOOL4 bShadowed; { bShadowed = ( _vShadowMapValue < _vDepth ); } { return bShadowed.x && bShadowed.y && bShadowed.z && bShadowed.w ? half4(0.0, 0.0, 0.0, 0.0 ) : half4(1.0, 1.0, 1.0, 1.0 ); } } SLT_SHADOWMAP4 _slGetShadowMap2D_unfolded0003(SLT_TEXCOORD2 _vTex) { return tex2Dlod( sShadow, half4(_vTex, 0.0, 0.0 ) ); } SLT_SHADOWMAP4 _slGetShadowMap2D_unfolded0002(SLT_TEXCOORD2 _vTex) { return tex2Dlod( sShadow, half4(_vTex, 0.0, 0.0 ) ); } SLT_SHADOWMAP4 _slGetShadowMap2D_unfolded0001(SLT_TEXCOORD2 _vTex) { return tex2Dlod( sShadow, half4(_vTex, 0.0, 0.0 ) ); } SLT_SHADOWMAP4 _slGetShadowMap2D_unfolded0000(SLT_TEXCOORD2 _vTex) { return tex2Dlod( sShadow, half4(_vTex, 0.0, 0.0 ) ); } SLT_SHADOWMAP1 slExtractShadowDepth(SLT_SHADOWMAP4 _vColor) { { return _vColor.r; } } SLT_COLOR1 _slGetLinearFilteredShadow_unfolded0000(SLT_TEXCOORD2 _vTex, SLT_SHADOWMAP1 _fDepth) { SLT_TEXCOORD2 _vWeights = _vTex * scSM.zw - half2(0.500000, 0.500000 ); _vWeights = frac( _vWeights ); SLT_TEXCOORD2 _tex0 = _vTex - _vWeights * scSM.xy; SLT_TEXCOORD2 _tex3 = _tex0 + scSM.xy; SLT_TEXCOORD2 _tex1 = half2(_tex3.x, _tex0.y ); SLT_TEXCOORD2 _tex2 = half2(_tex0.x, _tex3.y ); SLT_SHADOWMAP4 _vSample; _vSample.x = slExtractShadowDepth( _slGetShadowMap2D_unfolded0000( _tex0 ) ); _vSample.w = slExtractShadowDepth( _slGetShadowMap2D_unfolded0001( _tex1 ) ); _vSample.y = slExtractShadowDepth( _slGetShadowMap2D_unfolded0002( _tex2 ) ); _vSample.z = slExtractShadowDepth( _slGetShadowMap2D_unfolded0003( _tex3 ) ); SLT_COLOR4 _vShadow = slGetShadowValue( _vSample, float4(_fDepth, _fDepth, _fDepth, _fDepth ) ); _vShadow.xy = lerp( _vShadow.xy, _vShadow.wz, ( half )_vWeights.x ); SLT_COLOR1 _fShadow = lerp( _vShadow.x, _vShadow.y, ( half )_vWeights.y ); return _fShadow; } SLT_COLOR1 _slGetSoftwareFilteredShadow_unfolded0000(SLT_TEXCOORD2 _vTex, SLT_SHADOWMAP1 _fDepth) { return _slGetLinearFilteredShadow_unfolded0000( _vTex, _fDepth ); } SLT_COLOR1 _slGetHardShadow_unfolded0000(SLT_SHADOWMAP4 _vShadowPos) { SLT_COLOR1 _fShadow; { SLT_SHADOWMAP3 _vTex = _vShadowPos.xyz / _vShadowPos.w; _vTex.z = saturate( _vTex.z ); _fShadow = _slGetSoftwareFilteredShadow_unfolded0000( _vTex.xy, _vTex.z ); } return _fShadow; } SLT_COLOR1 slGetShadow_unfolded0000(float4 _pipe_vShadowPos0) { SLT_SHADOWMAP4 _vShadowPos = _pipe_vShadowPos0; SLT_COLOR1 _fShadow = 0.0; _fShadow = _slGetHardShadow_unfolded0000( _vShadowPos ); return _fShadow; } void slApplyScatteringBody_unfolded0000(inout SLT_COLOR4 _color, half3 _pipe_vScatExtinct, half3 _pipe_cInScat) { _color.rgb = lerp( _pipe_cInScat, _color.rgb, _pipe_vScatExtinct ); } void slApplyScattering_unfolded0000(inout SLT_COLOR4 _color, half3 _pipe_vScatExtinct, half3 _pipe_cInScat) { slApplyScatteringBody_unfolded0000( _color, _pipe_vScatExtinct, _pipe_cInScat ); } void slApplyFog_unfolded0000(inout SLT_COLOR4 _color, half3 _pipe_vScatExtinct, half3 _pipe_cInScat) { slApplyScattering_unfolded0000( _color, _pipe_vScatExtinct, _pipe_cInScat ); } SLT_PARAM_FLOAT4 texsize0:register(c4); SLT_PARAM_FLOAT4 uvOffset0:register(c5); SLT_SAMPLER_2D sLand0 : register(s3) < >; SLT_POINT2 slGetTerrainLandTexCoordSingle(SLT_POINT4 _vPos, SLT_FLOAT2 _vPaletteScale2, SLT_FLOAT2 _vPaletteOffset2) { { return _vPos.xz * _vPaletteScale2; } } void slOutputTerrainLandTextureCoordinates_unfolded0001(float4 _pipe_vWorldPos, out float2 _pipe_txcLand0) { SLT_POINT4 _vLocalPos = slGetWorldPosition_unfolded0002( _pipe_vWorldPos ); _pipe_txcLand0 = ( float2 )slGetTerrainLandTexCoordSingle( _vLocalPos, texsize0.xy, uvOffset0.xy ); } void slOutputTerrainTextureCoordinatesBody_unfolded0001(float4 _pipe_vWorldPos, out float2 _pipe_txcLand0) { slOutputTerrainLandTextureCoordinates_unfolded0001( _pipe_vWorldPos, _pipe_txcLand0 ); } void slSetUpTerrainTextureCoordinatesPixel_unfolded0000(float4 _pipe_vWorldPos, out float2 _pipe_txcLand0) { slOutputTerrainTextureCoordinatesBody_unfolded0001( _pipe_vWorldPos, _pipe_txcLand0 ); } SLT_COLOR4 slGetBlendTerrainTexture_unfolded0000(half4 _pipe_clLand0) { SLT_COLOR4 _clBlend; _clBlend = _pipe_clLand0; return _clBlend; } SLT_COLOR4 slGetTerrainBlendedColor_unfolded0000(half4 _pipe_clBlendTexture) { return _pipe_clBlendTexture; } void slSetUpTerrainPaletteTextures_unfolded0000(float2 _pipe_txcLand0, out half4 _pipe_clLand0) { _pipe_clLand0 = tex2D( sLand0, _pipe_txcLand0.xy ); } void slSetUpTerrainSpecularMap_unfolded0000(half4 _pipe_clBlendTexture, out half _pipe_fTerrainSpMap1st) { _pipe_fTerrainSpMap1st = ( half )( slGetTerrainBlendedColor_unfolded0000( _pipe_clBlendTexture ).a ); } void slSetUpTerrainTextures_unfolded0000(float2 _pipe_txcLand0, out half4 _pipe_clLand0, out half4 _pipe_clBlendTexture, out half _pipe_fTerrainSpMap1st) { slSetUpTerrainPaletteTextures_unfolded0000( _pipe_txcLand0, _pipe_clLand0 ); _pipe_clBlendTexture = ( half4 )slGetBlendTerrainTexture_unfolded0000( _pipe_clLand0 ); slSetUpTerrainSpecularMap_unfolded0000( _pipe_clBlendTexture, _pipe_fTerrainSpMap1st ); } struct SPSInput { float4 vWorldPos : TEXCOORD0; saturate_color half4 clDiffuse : TEXCOORD1; floatinterpolation float4 vShadowPos0 : TEXCOORD2; half3 cInScat : TEXCOORD3; half3 vScatExtinct : TEXCOORD4; saturate_color half3 clMainDiffuse : TEXCOORD5; saturate_color half3 clMainSpecular : TEXCOORD6; saturate_color half3 clSpecular : TEXCOORD7; half2 vPatternPos : TEXCOORD8; }; struct SPSOutput { half4 color0 : COLOR0; }; void main(in SPSInput ktglInput, out SPSOutput ktglOutput) { float2 ktglInside_txcLand0; half4 ktglInside_clLand0; half4 ktglInside_clBlendTexture; half ktglInside_fTerrainSpMap1st; half4 ktglInside_cPattern; half ktglInside_fShadow; SLT_COLOR4 _clOut; slSetUpTerrainTextureCoordinatesPixel_unfolded0000( ktglInput.vWorldPos, ktglInside_txcLand0 ); slSetUpTerrainTextures_unfolded0000( ktglInside_txcLand0, ktglInside_clLand0, ktglInside_clBlendTexture, ktglInside_fTerrainSpMap1st ); slSetUpAccessoryPixel_unfolded0000( ktglInput.vPatternPos, ktglInside_cPattern ); { { SLT_COLOR1 _fShadow = slGetShadow_unfolded0000( ktglInput.vShadowPos0 ); slApplyAccessoryPixelLighting_unfolded0000( ktglInput.clMainDiffuse, ktglInput.clDiffuse, ktglInput.clMainSpecular, ktglInput.clSpecular, ktglInside_cPattern, ktglInside_fShadow, _fShadow ); { slApplyAccessoryTextures_unfolded0000( _clOut, ktglInput.clDiffuse, ktglInput.clSpecular, ktglInside_clBlendTexture, ktglInside_fTerrainSpMap1st ); } slApplyFog_unfolded0000( _clOut, ktglInput.vScatExtinct, ktglInput.cInScat ); slOutputAccessoryPixel_unfolded0000( _clOut ); _clOut.rgb *= ( 0.500000 ); } } ktglOutput.color0 = _clOut; }