Evgenii Golubev 7 年前
当前提交
f589fe1b
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 4
      ScriptableRenderPipeline/Core/ShaderLibrary/Common.hlsl

4
ScriptableRenderPipeline/Core/ShaderLibrary/Common.hlsl


// Ref: https://twitter.com/SebAaltonen/status/878250919879639040
// 2 mads (mad_sat and mad), faster than regular sign
float3 FastSign(float x)
float FastSign(float x)
return saturate(x * FLT_MAX) * 2.0 - 1.0;
return saturate(x * FLT_MAX) * 2.0 - 1.0;
}
// Orthonormalizes the tangent frame using the Gram-Schmidt process.

正在加载...
取消
保存