所有反射示例都使用以下属性设置了Cubemaps:
Properties {
_Cube("Reflection Map", Cube) = "" {}
}但我想使用天空框从“照明”所有的着色器。怎么做?
发布于 2017-12-22 10:00:11
使用unity_SpecCube0,这里是带有unity函数的采样的一个简单版本
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);
}https://stackoverflow.com/questions/42912743
复制相似问题