#define saturate_color #define nopacked #define floatinterpolation #define depth_compare #pragma warning(disable : 3205) typedef float4 SLT_POINT4; typedef float4x4 SLT_POINT4x4; typedef float4 SLT_PARAM_FLOAT4; typedef float4x4 SLT_PARAM_FLOAT4x4; SLT_POINT4 slApplyMatrix(SLT_POINT4x4 mat, SLT_POINT4 vec) { return mul( vec, mat ); } SLT_PARAM_FLOAT4x4 mL2P:register(c0); SLT_POINT4x4 slGetMatrixL2P() { return ( float4x4 )mL2P; } SLT_PARAM_FLOAT4 scale:register(c4); SLT_PARAM_FLOAT4 gMrpRng:register(c5); void slTransformTerrainVertex_unfolded0000(float4 _pipe_vtxPos, out float4 _pipe_vProjPos) { _pipe_vProjPos = slApplyMatrix( slGetMatrixL2P(), _pipe_vtxPos ); } void slDecodeTerrainVertex_unfolded0000(inout float4 _pipe_vtxPos, out half _pipe_fMorph) { SLT_POINT4 _vDecodePos; _vDecodePos.xyz = scale.xyz * _pipe_vtxPos.xyz; _vDecodePos.w = 1.0; _pipe_fMorph = saturate( dot( _vDecodePos, gMrpRng ) ); _vDecodePos.y = scale.y * ( _pipe_vtxPos.y + _pipe_vtxPos.w * _pipe_fMorph ); _vDecodePos.y += scale.w; _pipe_vtxPos = _vDecodePos; } struct SVSInput { float4 vtxPos : POSITION0; }; struct SVSOutput { float4 vOutPos : POSITION; }; void main(in SVSInput ktglInput, out SVSOutput ktglOutput) { half ktglInside_fMorph; float4 ktglInside_vProjPos; slDecodeTerrainVertex_unfolded0000( ktglInput.vtxPos, ktglInside_fMorph ); slTransformTerrainVertex_unfolded0000( ktglInput.vtxPos, ktglInside_vProjPos ); ktglOutput.vOutPos = ktglInside_vProjPos; }