学霸笔记
还是学霸笔记
写这个作业写 b u g bug bug 写到吐了,首先强调一点, w i n d o w window window 下跑这份代码的同学,需要修改 g l o b a l . c p p global.cpp global.cpp 中的 g e t _ r a n d o m _ f l o a t get_random_float get_random_float 函数,不然你的这个"随机函数"每次都是跑出来相同的结果(而且改了这个函数显著的提升效率, l i n u x linux linux 的同学应该也可以改改)。
修改如下????
复制代码
1
2
3
4
5
6
7
8
9
10static std::random_device dev; static std::mt19937 rng(dev()); static std::uniform_real_distribution<float> dist(0.f, 1.f); // distribution in range [1, 6] inline float get_random_float() { return dist(rng); }
前三个函数参考作业6,差异在于 I n t e r s e c t P IntersectP IntersectP 函数的判别条件,因为这个灯 tmd 没有厚度,你以文本格式查看 l i g h t . o b j light.obj
最后
以上就是高挑御姐最近收集整理的关于Games101 作业7 路径追踪的全部内容,更多相关Games101内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复