#include "VertexShader.h" #define C_POINT_SIZE c14 ;------------------------------------------------------------------------------ ; Vertex transformation ;------------------------------------------------------------------------------ ; Transform to projection space m4x4 OPOS, vPos, C_PROJECTION_MATRIX FIXUP_OPOS ; Compute 1/z ; z/w??? ; just 1/w??? this seems to work dp4 r1.xyzw, vPos, c9 ; C_PROJECTION_MATRIX+3 rcp r0, r1.w ; Copy diffuse color mul oD0, vDiffuse, C_MATERIAL_COLOR ; Calculate fog factor CalculateLayeredFog(vPos, oFog) mul r0.x, r0.x, C_POINT_SIZE.y ; scale to 480 mul oPts, r0.x, vScale.x