cs0116 命名空间不能直接包含_Unity SRP变量命名等规范

4ec9c7344eff6cee8b80abf7172b3872.png

在Unity的URP Package中,Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl文件内有一大段关于各种规范的注释。本人读了一遍觉得还挺有用,特地翻译出来分享给大家。

下面开始原文+翻译。

Convention:

规范:

Unity is Y up and left handed in world space
Caution: When going from world space to view space, unity is right handed in view space and the determinant of the matrix is negative
For cubemap capture (reflection probe) view space is still left handed (cubemap convention) and the determinant is positive.

在Unity的世界空间中,Y朝上并且使用左手坐标系。

注意:从世界空间变换到视图空间的同时也会转变为右手坐标系,因此变换矩阵的行列式是负的。

对于反射探针获取的cubemap,按照一贯习惯,查看空间依然使用左手坐标系,因此行列式是正的。

The lighting code assume that 1 Unity unit (1uu) == 1 meters. This is very important regarding physically based light unit and inverse square attenuation

光照模型中默认按照1单位为1米进行计算,因此为了实现更逼真的渲染效果,一定要确保模型的尺寸比例是正确的。

space at the end of the variable name
WS: world space
RWS: Camera-Relat
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值