【发布时间】:2012-11-11 16:53:01
【问题描述】:
我正在学习从头开始编写着色器程序,现在我正在使用漫射照明。目前方程是
Diffuse Intensity = Intensity of light * 'k' diffuse constant of material * (dot product of surface's normal vector and light direction vector)
问题是,我读过白色材料的 k 常数为 1,如果材料为黑色,则 k 为 0。现实世界的情况并非如此,因为我的黑色对象 确实 当我将它暴露在光源下时会变轻。为什么算法是这样的?
我正在学习如何在 Unity 中编写 GLSL 的链接。我可以更轻松地设置场景,以便在 Unity 中使用着色器进行试验。 http://en.wikibooks.org/wiki/GLSL_Programming/Unity/Diffuse_Reflection
【问题讨论】:
标签: rendering glsl unity3d shader