浏览代码

Reduce the register pressure when setting the frame

/feature-ReflectionProbeFit
Evgenii Golubev 7 年前
当前提交
b65c1753
共有 1 个文件被更改,包括 2 次插入5 次删除
  1. 7
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Material/Lit/Lit.hlsl

7
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Material/Lit/Lit.hlsl


cosFrame = (quadrant & 2) ? -cosFrame : cosFrame;
// Rotate the reconstructed tangent around the normal.
float3 tangentWS = sinFrame * frame[1] + cosFrame * frame[0];
float3 bitangentWS = cosFrame * frame[1] - sinFrame * frame[0];
frame[0] = tangentWS;
frame[1] = bitangentWS;
frame[0] = sinFrame * frame[1] + cosFrame * frame[0];
frame[1] = cross(frame[2], frame[0]);
}
FillMaterialAnisotropy(anisotropy, frame[0], frame[1], bsdfData);

正在加载...
取消
保存