Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
所有反射示例都使用以下属性设置立方体贴图:
Properties { _Cube("Reflection Map", Cube) = "" {} }
但我想为所有着色器使用“Lighting”中的天空盒。怎么做?
使用unity_SpecCube0,这是一个简单的采样版本,带有统一的辅助函数
half3 GetCube(half3 _vector, half _smoothness) { half mip = _smoothness * 6.0; half4 rgbm = UNITY_SAMPLE_TEXCUBE_LOD(unity_SpecCube0, _vector, mip); return DecodeHDR(rgbm, unity_SpecCube0_HDR); }