浏览代码

HDRenderPipeline: minor update of ComputeTextureLOD function

/main
sebastienlagarde 7 年前
当前提交
1ac183cc
共有 1 个文件被更改,包括 3 次插入4 次删除
  1. 7
      ScriptableRenderPipeline/Core/CoreRP/ShaderLibrary/Common.hlsl

7
ScriptableRenderPipeline/Core/CoreRP/ShaderLibrary/Common.hlsl


return max(0.5 * log2(d), 0.0);
}
// texelSize is Unity XXX_TexelSize feature parameters
// x contains 1.0/width, y contains 1.0 / height, z contains width, w contains height
float ComputeTextureLOD(float2 uv, float4 texelSize)
// x contains width, w contains height
float ComputeTextureLOD(float2 uv, float2 texelSize)
uv *= texelSize.zw;
uv *= texelSize;
return ComputeTextureLOD(uv);
}

正在加载...
取消
保存