Home › Forums › Games202-高质量实时渲染 › 局部基函数(TBN空间的构建)是如何推导的 This topic has 0 replies, 1 voice, and was last updated 1 year, 11 months ago by shuaigougou5545. Viewing 0 reply threads Author Posts 2023年1月9日 at 上午11:41 #16110 Score: 0 shuaigougou5545Participant Karma: 1 pt void LocalBasis(vec3 n, out vec3 b1, out vec3 b2) { float sign_ = sign(n.z); if (n.z == 0.0) { sign_ = 1.0; } float a = -1.0 / (sign_ + n.z); float b = n.x * n.y * a; b1 = vec3(1.0 + sign_ * n.x * n.x * a, sign_ * b, -sign_ * n.x); b2 = vec3(b, sign_ + n.y * n.y * a, -n.y); } 这是作业3中的函数,有人知道这个函数是怎么推导的吗? Author Posts Viewing 0 reply threads You must be logged in to reply to this topic. Log In Username: Password: Keep me signed in Log In