33 inline void LeRasterizer::fillFlatTexZC(
int y,
float x1,
float x2,
float w1,
float w2,
float u1,
float u2,
float v1,
float v2)
35 uint8_t * c = (uint8_t *) &curTriangle->
solidColor;
38 if (d == 0.0f)
return;
40 float au = (u2 - u1) / d;
41 float av = (v2 - v1) / d;
42 float aw = (w2 - w1) / d;
45 int xe = (int) (x2 + 1.9999f);
48 uint8_t * p = (uint8_t *) (xb + ((
int) y) *
frame.
tx + pixels);
50 for (
int x = xb; x < xe; x++) {
52 uint32_t tu = ((int32_t) (u1 * z)) & texMaskU;
53 uint32_t tv = ((int32_t) (v1 * z)) & texMaskV;
54 uint8_t * t = (uint8_t *) &texDiffusePixels[tu + (tv << texSizeU)];
56 p[0] = (t[0] * c[0]) >> 8;
57 p[1] = (t[1] * c[1]) >> 8;
58 p[2] = (t[2] * c[2]) >> 8;
LeColor solidColor
Definition: trilist.h:83
int tx
Definition: bitmap.h:81
LeBitmap frame
Definition: rasterizer_float.h:61