DBG dba59550 driver_opengl_vertex_program.cpp 115 activeNVVertexProgram : loading program (2296 bytes) = "!!VP1.0 # compute Basic geomorph into R0.x ADD R0, v[0], -c[5]; # R0 = startPos - RefineCenter DP3 R2.x, R0, R0; # R2.x= sqrDist= (startPos - RefineCenter).sqrnorm() RCP R0.x, R2.x; # R0.x= 1 / sqrDist MUL R0.x, v[10].x, R0.x; # R0.x= ErrorMetric= GeomFactor / sqrDist # compute Transition Factor To TileNear Geomorph, into R0.z ADD R0.z, c[6].x, -R2.x; # R0.z= TileDistFarSqr - sqrDist MUL R0.z, R0.z, c[6].y; # R0.z= f= (TileDistFarSqr - sqrDist ) * OOTileDistDeltaSqr MAX R0.z, R0.z, c[4].x; MIN R0.z, R0.z, c[4].y; # R0.z= f= clamp(f, 0, 1); MUL R0.z, R0.z, R0.z; MUL R0.z, R0.z, R0.z; # R0.z= finalFactor= f^4 # Apply the transition factor to the ErrorMetric => R0.w= ErrorMetricModified. ADD R0.w, v[10].y, -R0.x; # R0.w= maxNearLimit - ErrorMetric MAD R0.w, R0.z, R0.w, R0.x; # R0.w= finalFactor * (maxNearLimit - ErrorMetric) + ErrorMetric # R0.w may be < R0.x; (when the point is very near). Must take the bigger errorMetric. MAX R0.x, R0.x, R0.w; # R0.x= ErrorMetric Max # apply geomorph into R1 ADD R0.x, R0.x, -c[4].y; # R0.x= ErrorMetric Max - 1 MAX R0.x, R0.x, c[4].x; MIN R0.x, R0.x, c[4].y; # R0.x= geomBlend= clamp(R0.x, 0, 1); # NB: Can't use MAD R1.xyz, v[11], R0.x, v[0], because can't acces 2 inputs in one op. # Hence, can use a MAD to Sub the Landscape Center _PZBModelPosition # write to R1.w is useless (but needed to avoid a read error when multiplied by 0) # in the next instruction MAD R1.xyzw, v[11], R0.x, -c[12]; # set w to 1 by using c[4] = { 0, 1, 0.5, 0} MAD R1, R1, c[4].yyyx, v[0]; # R1= geomBlend * (EndPos-StartPos) + StartPos # compute in Projection space DP4 o[HPOS].x, c[0], R1; DP4 o[HPOS].y, c[1], R1; DP4 o[HPOS].z, c[2], R1; DP4 o[HPOS].w, c[3], R1; MOV o[TEX0], v[8]; MOV o[TEX1], v[9]; DP4 o[FOGC].x, c[10], R1; END "