非常感谢,改成(intersect(Ray(hitPoint, ws)).distance – lightInter.distance) > EPSILON;有画面了,但是我有点不理解,bool block = (intersect(Ray(hitPoint, ws)).coords – lightInter.coords).norm() > EPSILON;我理解这个指两个交点有距离,为啥这个不能代表光线被其他物体挡住了呢?
另外画面变成了这样,能帮忙分析一下可能是啥问题么?
This post has received 1 vote down.
Attachments:
You must be
logged in to view attached files.