return;\r
\r
// slopes\r
- const f32 invDeltaX = reciprocal_zero2( line.x[1] - line.x[0] );\r
+ const f32 invDeltaX = fill_step_x( line.x[1] - line.x[0] );\r
const f32 subPixel = ( (f32) pShader.xStart ) - line.x[0];\r
\r
// store slopes in endpoint, and correct first pixel\r
}\r
\r
SOFTWARE_DRIVER_2_CLIPCHECK_REF;\r
- pShader.dst = (tVideoSample*) ( (u8*) RenderTarget->getData() + ( line.y * RenderTarget->getPitch() ) + ( pShader.xStart << VIDEO_SAMPLE_GRANULARITY ) );\r
- pShader.z = (fp24*) ( (u8*) DepthBuffer->lock() + ( line.y * DepthBuffer->getPitch() ) + ( pShader.xStart << VIDEO_SAMPLE_GRANULARITY ) );\r
+ pShader.dst = (tVideoSample*) ( (u8*) RenderTarget->getData() + ( line.y * RenderTarget->getPitch() ) + ( pShader.xStart << SOFTWARE_DRIVER_2_RENDERTARGET_GRANULARITY) );\r
+ pShader.z = (fp24*) ( (u8*) DepthBuffer->lock() + ( line.y * DepthBuffer->getPitch() ) + ( pShader.xStart << SOFTWARE_DRIVER_2_RENDERTARGET_GRANULARITY) );\r
\r
for ( pShader.i = 0; pShader.i <= pShader.dx; ++pShader.i )\r
{\r
return;\r
\r
// slopes\r
- const f32 invDeltaX = reciprocal_zero2( line.x[1] - line.x[0] );\r
+ const f32 invDeltaX = fill_step_x( line.x[1] - line.x[0] );\r
\r
// search z-buffer for first not occulled pixel\r
- pShader.z = (fp24*) ( (u8*) DepthBuffer->lock() + ( line.y * DepthBuffer->getPitch() ) + ( pShader.xStart << VIDEO_SAMPLE_GRANULARITY ) );\r
+ pShader.z = (fp24*) ( (u8*) DepthBuffer->lock() + ( line.y * DepthBuffer->getPitch() ) + ( pShader.xStart << SOFTWARE_DRIVER_2_RENDERTARGET_GRANULARITY) );\r
\r
// subTexel\r
const f32 subPixel = ( (f32) pShader.xStart ) - line.x[0];\r
line.w[0] = a;\r
line.w[1] = b;\r
\r
- pShader.dst = (tVideoSample*) ( (u8*) RenderTarget->getData() + ( line.y * RenderTarget->getPitch() ) + ( pShader.xStart << VIDEO_SAMPLE_GRANULARITY ) );\r
+ pShader.dst = (tVideoSample*) ( (u8*) RenderTarget->getData() + ( line.y * RenderTarget->getPitch() ) + ( pShader.xStart << SOFTWARE_DRIVER_2_RENDERTARGET_GRANULARITY) );\r
\r
a = (f32) pShader.i + subPixel;\r
\r
\r
\r
// calculate delta y of the edges\r
- scan.invDeltaY[0] = reciprocal_zero2( c->Pos.y - a->Pos.y );\r
- scan.invDeltaY[1] = reciprocal_zero2( b->Pos.y - a->Pos.y );\r
- scan.invDeltaY[2] = reciprocal_zero2( c->Pos.y - b->Pos.y );\r
+ scan.invDeltaY[0] = fill_step_y( c->Pos.y - a->Pos.y );\r
+ scan.invDeltaY[1] = fill_step_y( b->Pos.y - a->Pos.y );\r
+ scan.invDeltaY[2] = fill_step_y( c->Pos.y - b->Pos.y );\r
\r
if ( F32_LOWER_EQUAL_0 ( scan.invDeltaY[0] ) )\r
return;\r
}\r
\r
// rasterize the edge scanlines\r
- for( line.y = yStart; line.y <= yEnd; ++line.y)\r
+ for( line.y = yStart; line.y <= yEnd; line.y += SOFTWARE_DRIVER_2_STEP_Y)\r
{\r
line.x[scan.left] = scan.x[0];\r
line.w[scan.left] = scan.w[0];\r
}\r
\r
// rasterize the edge scanlines\r
- for( line.y = yStart; line.y <= yEnd; ++line.y)\r
+ for( line.y = yStart; line.y <= yEnd; line.y += SOFTWARE_DRIVER_2_STEP_Y)\r
{\r
line.x[scan.left] = scan.x[0];\r
line.w[scan.left] = scan.w[0];\r