vs_2_0 dcl_position v0 dcl_normal v1 dcl_color v2 dcl_texcoord0 v3 #include "..\..\VertexShader.h" ;------------------------------------------------------------------------------ ; Geometry transform ;------------------------------------------------------------------------------ ; Copy model-space geometry to pipeline registers mov pPos, vPos mov pNormal, vNormal ; Transform position to projection space m4x4 OPOS, vPos, C_PROJECTION_MATRIX FIXUP_OPOS #include "..\..\VertexShader.h" ;------------------------------------------------------------------------------ ; Diffuse color ;------------------------------------------------------------------------------ ; Combine vertex color and material color mul oD0, vDiffuse, C_MATERIAL_COLOR #include "..\..\VertexShader.h" ;------------------------------------------------------------------------------ ; Fog calculation ;------------------------------------------------------------------------------ ; Calculate fog factor and copy to fog register CalculateLayeredFog(pPos, oFog) #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