Closed qhanson closed 2 years ago
wow, I find it is related to the initialization of the zbuffer.
for(int i = 0; i <width*height; ++i ) zbuffer[i] = -std::numeric_limits<float>::max();
vs
for(int i = 0; i <width*height; ++i ) zbuffer[i] = std::numeric_limits<float>::min();
this version gives your the woman version...
As shown in this image, I finished wiki 4 using barycentric rather than line sweeping. Then I suddenly find that the output is different from the tutorial.