]> git.lizzy.rs Git - irrlicht.git/blobdiff - source/Irrlicht/CTRTextureLightMap2_Add.cpp
Merging r6145 through r6171 from trunk to ogl-es branch
[irrlicht.git] / source / Irrlicht / CTRTextureLightMap2_Add.cpp
index 11d430bf910428f39d3a1662b1b54c40dc574a29..61497d3b23f6d864b850d0dfc40a9b5a17cc1f0c 100644 (file)
@@ -86,7 +86,7 @@ public:
 \r
 \r
 private:\r
-       void scanline_bilinear ();\r
+       void fragmentShader();\r
 \r
 };\r
 \r
@@ -103,7 +103,7 @@ CTRTextureLightMap2_Add::CTRTextureLightMap2_Add(CBurningVideoDriver* driver)
 \r
 /*!\r
 */\r
-REALINLINE void CTRTextureLightMap2_Add::scanline_bilinear ()\r
+REALINLINE void CTRTextureLightMap2_Add::fragmentShader()\r
 {\r
        tVideoSample *dst;\r
 \r
@@ -143,7 +143,7 @@ REALINLINE void CTRTextureLightMap2_Add::scanline_bilinear ()
                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
 #ifdef IPOL_Z\r
        slopeZ = (line.z[1] - line.z[0]) * invDeltaX;\r
@@ -199,7 +199,7 @@ REALINLINE void CTRTextureLightMap2_Add::scanline_bilinear ()
 #endif\r
 \r
 \r
-       for ( s32 i = 0; i <= dx; i++ )\r
+       for ( s32 i = 0; i <= dx; i += SOFTWARE_DRIVER_2_STEP_X)\r
        {\r
 #ifdef CMP_Z\r
                if ( line.z[0] < z[i] )\r
@@ -274,9 +274,9 @@ void CTRTextureLightMap2_Add::drawTriangle(const s4DVertex* burning_restrict a,
        const f32 ba = b->Pos.y - a->Pos.y;\r
        const f32 cb = c->Pos.y - b->Pos.y;\r
        // calculate delta y of the edges\r
-       scan.invDeltaY[0] = reciprocal_zero( ca );\r
-       scan.invDeltaY[1] = reciprocal_zero( ba );\r
-       scan.invDeltaY[2] = reciprocal_zero( cb );\r
+       scan.invDeltaY[0] = fill_step_y( ca );\r
+       scan.invDeltaY[1] = fill_step_y( ba );\r
+       scan.invDeltaY[2] = fill_step_y( cb );\r
 \r
        if ( F32_LOWER_EQUAL_0 ( scan.invDeltaY[0] ) )\r
                return;\r
@@ -400,7 +400,7 @@ void CTRTextureLightMap2_Add::drawTriangle(const s4DVertex* burning_restrict a,
 #endif\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.x[scan.right] = scan.x[1];\r
@@ -431,7 +431,7 @@ void CTRTextureLightMap2_Add::drawTriangle(const s4DVertex* burning_restrict a,
 #endif\r
 \r
                        // render a scanline\r
-                       scanline_bilinear ();\r
+                       interlace_scanline fragmentShader();\r
 \r
                        scan.x[0] += scan.slopeX[0];\r
                        scan.x[1] += scan.slopeX[1];\r
@@ -560,7 +560,7 @@ void CTRTextureLightMap2_Add::drawTriangle(const s4DVertex* burning_restrict a,
 #endif\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.x[scan.right] = scan.x[1];\r
@@ -591,7 +591,7 @@ void CTRTextureLightMap2_Add::drawTriangle(const s4DVertex* burning_restrict a,
 #endif\r
 \r
                        // render a scanline\r
-                       scanline_bilinear ();\r
+                       interlace_scanline fragmentShader();\r
 \r
                        scan.x[0] += scan.slopeX[0];\r
                        scan.x[1] += scan.slopeX[1];\r