vs_2_0 dcl_position v0 dcl_normal v1 dcl_texcoord0 v3 dcl_texcoord6 v14 dcl_texcoord7 v15 dcl_position1 v6 dcl_normal1 v10 dcl_position2 v7 dcl_normal2 v11 dcl_position3 v8 dcl_normal3 v12 dcl_position4 v9 dcl_normal4 v13 #include "../../VertexShader.h" ;------------------------------------------------------------------------------ ; Geometry transform ;------------------------------------------------------------------------------ ; Calculate bone indices mad r7, vIndices, c23.x, c23.y ; Sum weighted blendshape position deltas mul rTemp, vBlend0, c24.x mad rTemp, vBlend1, c24.y, rTemp mad rTemp, vBlend2, c24.z, rTemp mad rTemp, vBlend3, c24.w, rTemp mad rTemp.xyz, c26.x, rTemp, vPos mov rTemp.w, C_ONE ; Skin position by bone 0 MOVA a0.x, r7.x m4x3 r0.xyz, rTemp, c[a0.x] mul pPos.xyz, r0.xyz, vWeights.xxx ; Calculate the second bone weight from the first sub r8.x, C_ONE, vWeights.x ; Skin position by bone 1 MOVA a0.x, r7.y m4x3 r0.xyz, rTemp, c[a0.x] mad pPos.xyz, r0.xyz, r8.x, pPos mov pPos.w, C_ONE ; Sum weighted blendshape normal deltas mul rTemp, vBlendNorm0, c25.x mad rTemp, vBlendNorm1, c25.y, rTemp mad rTemp, vBlendNorm2, c25.z, rTemp mad rTemp, vBlendNorm3, c25.w, rTemp mad rTemp, c26.x, rTemp, vNormal ; Skin normal by bone 0 MOVA a0.x, r7.x m3x3 pNormal.xyz, rTemp, c[a0.x] NormalizeVector(pNormal) ; Transform skinned position to projection space m4x4 OPOS, pPos, C_PROJECTION_MATRIX FIXUP_OPOS #include "..\..\VertexShader.h" ;------------------------------------------------------------------------------ ; Diffuse color ;------------------------------------------------------------------------------ ; Initialize diffuse color mov oD0, C_MATERIAL_COLOR #include "..\..\VertexShader.h" ;------------------------------------------------------------------------------ ; Fog calculation ;------------------------------------------------------------------------------ #include "..\..\VertexShader.h" ;------------------------------------------------------------------------------ ; Texture coordinates ;------------------------------------------------------------------------------ ; Scale and offset the base texture coordinates mov r0, c12 mul r0, r0, C_TEXCOORD_DECOMPRESS mad r0, vTexCoords, r0, c13 mov oT0.xy, r0 ; Detail map coordinates mul oT1.xy, r0, C_DETAIL_FACTOR