浏览代码

Optimize GetLocalFrame() with FastSign()

/main
GitHub 7 年前
当前提交
7dc833d0
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 2
      ScriptableRenderPipeline/Core/ShaderLibrary/CommonLighting.hlsl

2
ScriptableRenderPipeline/Core/ShaderLibrary/CommonLighting.hlsl


float x = localZ.x;
float y = localZ.y;
float z = localZ.z;
float sz = z >= 0 ? 1 : -1;
float sz = FastSign(z);
float a = 1 / (sz + z);
float ya = y * a;
float b = x * ya;

正在加载...
取消
保存