#4009 Score: 1
Atlas
Participant

1)view_pos是投影前的坐标,也就是真实坐标。t里面的vertex坐标是投影后的。
void rst::rasterizer::draw(std::vector<Triangle *> &Triangle)里有写view_pos大概是怎么算出来的。
2)你的alpha,beta,gamma好像算错了,之前的代码框架里自带的是(x, y, t.v),而且x和y还可以改成x + 0.5和y + 0.5。正常情况下w是1和手算是一样的。
3)应该用view_pos插值。

This post has received 1 vote up.
  • This reply was modified 2 years, 2 months ago by Atlas.
  • This reply was modified 2 years, 2 months ago by Atlas.