浏览代码

fix shader (perceptualRoughness->roughness)

/main
vlad-andreev 8 年前
当前提交
3eb07ca4
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 4
      Assets/ScriptableRenderLoop/fptl/Internal-DeferredReflections.shader

4
Assets/ScriptableRenderLoop/fptl/Internal-DeferredReflections.shader


sampleDir = worldNormalRefl;
Unity_GlossyEnvironmentData g;
g.perceptualRoughness = SmoothnessToPerceptualRoughness(data.smoothness);
g.roughness = SmoothnessToPerceptualRoughness(data.smoothness);
g.reflUVW = sampleDir;
half3 env0 = Unity_GlossyEnvironment(UNITY_PASS_TEXCUBEARRAY(_reflCubeTextures), lgtDat.iSliceIndex, float4(lgtDat.fLightIntensity, lgtDat.fDecodeExp, 0.0, 0.0), g);

// TODO: remove pow, store cubemap mips differently
half roughness = pow(glossIn.perceptualRoughness, 3.0/4.0);
#else
half roughness = glossIn.perceptualRoughness; // MM: switched to this
half roughness = glossIn.roughness; // MM: switched to this
#endif
//roughness = sqrt(sqrt(2/(64.0+2))); // spec power to the square root of real roughness

正在加载...
取消
保存