akira

Forum Replies Created

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • in reply to: 作业6 提高题结果比较(提升似乎有限?) #8713 Score: 0
    akira
    Participant
    3 pts

    刚开始光线z方向是负的,但经过反射或折射后应该可能便为正吧,这样模型复杂一点应该会有bug的我估计

    in reply to: 作业3 interpolated_shadingcoords #8123 Score: 3
    akira
    Participant
    3 pts

    假设向量v的法线是n(有v.T * n = 0),v经过view*model变换后设为v’。因为也要变换法线坐标,但不能用view*model变换,需要保证变换之后其法线经过变换后n’仍然有(v’.T * n’ = 0),故要重新构造一个变换矩阵M,简单推导一下就得到inv_trans了。设v’.T * n’ = (view * model * v).T * (M * n) = 0,得到v.T * (view*model).T * M * n = 0,令(view *model).T * M为单位矩阵I,就能得到M就是代码中的inv_trans了

    This post has received 3 votes up.
Viewing 2 posts - 1 through 2 (of 2 total)