#define saturate_color #define nopacked #define floatinterpolation #define depth_compare #pragma warning(disable : 3205) typedef float2 SLT_FLOAT2; 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 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 = h4tex2D( 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 scSM2:register(c0); typedef SLT_SAMPLER_2D SLT_SAMPLER_SHADOWMAP; SLT_SAMPLER_SHADOWMAP sShadow : register(s0) < >; SLT_COLOR1 _slGetHardWareFilteredShadow_unfolded0003(SLT_SHADOWMAP4 _vTex) { return ( half )tex2Dproj( sShadow, _vTex ); } SLT_COLOR1 _slGetHardWareFilteredShadow_unfolded0002(SLT_SHADOWMAP4 _vTex) { return ( half )tex2Dproj( sShadow, _vTex ); } SLT_COLOR1 _slGetHardWareFilteredShadow_unfolded0001(SLT_SHADOWMAP4 _vTex) { return ( half )tex2Dproj( sShadow, _vTex ); } SLT_COLOR1 _slGetHardWareFilteredShadow_unfolded0000(SLT_SHADOWMAP4 _vTex) { return ( half )tex2Dproj( sShadow, _vTex ); } SLT_COLOR1 _slGetDitherSoftShadow_unfolded0000(SLT_SHADOWMAP4 _vShadowPos, SLT_TEXCOORD2 _vDither) { SLT_TEXCOORD2 _vOffset = _vDither * scSM2.zw + scSM2.xy; SLT_COLOR1 _sum = 0.0; { _vShadowPos.xyz /= _vShadowPos.w; _vShadowPos.xy += _vOffset; _vShadowPos.w = 1.0; SLT_SHADOWMAP4 _tex; _tex = _vShadowPos; _sum += _slGetHardWareFilteredShadow_unfolded0000( _tex ); _tex.x += scSM2.z; _sum += _slGetHardWareFilteredShadow_unfolded0001( _tex ); _vShadowPos.y += scSM2.w; _tex = _vShadowPos; _sum += _slGetHardWareFilteredShadow_unfolded0002( _tex ); _tex.x += scSM2.z; _sum += _slGetHardWareFilteredShadow_unfolded0003( _tex ); } return _sum * 0.250000; } SLT_TEXCOORD2 slApplyDitherMatrix(inout SLT_SHADOWMAP4 _vShadowPos, SLT_TEXCOORD2 _vScreenPos) { SLT_TEXCOORD2 _dither; _dither = 0.500000 * _vScreenPos; _dither.y += _dither.x; _dither = frac( _dither ); return _dither; } SLT_COLOR1 slGetShadow_unfolded0000(float4 _pipe_vShadowPos0, half2 _pipe_vScreenPos) { SLT_SHADOWMAP4 _vShadowPos = _pipe_vShadowPos0; SLT_COLOR1 _fShadow = 0.0; SLT_TEXCOORD2 _dither; _dither = slApplyDitherMatrix( _vShadowPos, _pipe_vScreenPos ); _fShadow = _slGetDitherSoftShadow_unfolded0000( _vShadowPos, _dither ); 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(c1); SLT_PARAM_FLOAT4 uvOffset0:register(c2); 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 = h4tex2D( 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; half4 clDiffuse : TEXCOORD1; floatinterpolation float4 vShadowPos0 : TEXCOORD2; half3 cInScat : TEXCOORD3; half3 vScatExtinct : TEXCOORD4; half3 clSpecular : TEXCOORD5; half3 clMainSpecular : TEXCOORD6; half3 clMainDiffuse : TEXCOORD7; half2 vPatternPos : TEXCOORD8; half2 vScreenPos : WPOS; }; 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, ktglInput.vScreenPos ); 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; }