下面的shader参照博客修改而成:改动的地方用此颜色表示 代码参照: unity build-in管线中的PBR材质Shader分析研究_郭大钦的博客-CSDN博客_shader 支持pbr材质以及cubemap unity build-in管线中的PBR材质Shader分析研究_bulit-in pbr-CSDN博客 最终效果如下:左边是手写的,右边是unity内置standard 1.原shader没有阴影,根据精要我在此基础上添加了阴影. 2.原shader由于作者追求尽量与unity内置standard效果一致,所以有些公式是按照unity独特方式写的,而且是最高质量的计算方式 ,因此有些算法还可以精简,再就是他把函数都展开写到片元着色器里面了,比较难看.有待改进. 3.仅有不透明物体的计算方式. 4.金属度,粗糙度只有数值调节,没有贴图控制.待完善.
Is this you? As a journalist, you can create a free Muck Rack account to customize your profile, list your contact preferences, and upload a portfolio of your best work.
Claim your profile
Get in touch with Return Oneminus
Contact Return Oneminus, search articles and posts on X, monitor coverage, and track replies from one place.
Learn more about Muck Rack