浏览代码

Reduce the number of iterations of the secant method

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

2
ScriptableRenderPipeline/Core/ShaderLibrary/PerPixelDisplacement.hlsl


// Secant method to affine the search
// Ref: Faster Relief Mapping Using the Secant Method - Eric Risser
for (int i = 0; i < 5; ++i)
for (int i = 0; i < 3; ++i)
{
// intersectionHeight is the height [0..1] for the intersection between view ray and heightfield line
float intersectionHeight = (pt0 * delta1 - pt1 * delta0) / (delta1 - delta0);

正在加载...
取消
保存