浏览代码

Clean up Common.hlsl

/feature-ReflectionProbeFit
Evgenii Golubev 7 年前
当前提交
6c081ac7
共有 2 个文件被更改,包括 3 次插入5 次删除
  1. 5
      ScriptableRenderPipeline/Core/ShaderLibrary/Common.hlsl
  2. 3
      ScriptableRenderPipeline/Core/ShaderLibrary/Hammersley.hlsl

5
ScriptableRenderPipeline/Core/ShaderLibrary/Common.hlsl


return (x < 1.0) ? poly : HALF_PI - poly;
}
// TODO: this intrinsic is unavailable outside compute. This is a Unity shader compiler bug.
#if (SHADER_TARGET >= 50) && (SHADER_STAGE_COMPUTE != 0)
#if (SHADER_TARGET >= 50)
return firstbithigh(x) – 1u;
return firstbithigh(x) - 1u;
}
#endif

3
ScriptableRenderPipeline/Core/ShaderLibrary/Hammersley.hlsl


// Ref: http://holger.dammertz.org/stuff/notes_HammersleyOnHemisphere.html
uint ReverseBits32(uint bits)
{
// TODO: this intrinsic is unavailable outside compute. This is a Unity shader compiler bug.
#if (SHADER_TARGET >= 50) && (SHADER_STAGE_COMPUTE != 0)
#if (SHADER_TARGET >= 50)
return reversebits(bits);
#else
bits = (bits << 16) | (bits >> 16);

正在加载...
取消
保存