浏览代码

HDRenderPipeline: Update value for tetrahedra encoding (same result but differently oriented)

/Branch_batcher
Sebastien Lagarde 8 年前
当前提交
141ffe53
共有 1 个文件被更改,包括 8 次插入8 次删除
  1. 16
      Assets/ScriptableRenderPipeline/HDRenderPipeline/Material/Lit/Lit.hlsl

16
Assets/ScriptableRenderPipeline/HDRenderPipeline/Material/Lit/Lit.hlsl


// normalize(v0 + v1 + v2), etc...
static const float3 basisNormal[4] =
{
float3(0.816497, 0., -0.57735),
float3(-0.816497, 0., -0.57735),
float3(0., 0.816497, 0.57735),
float3(0., -0.816497, 0.57735)
float3(0., 0.816497, -0.57735),
float3(-0.816497, 0., 0.57735),
float3(0.816497, 0., 0.57735),
float3(0., -0.816497, -0.57735)
float3x3(0., 1., 0., 0.57735, 0., 0.816497, 0.816497, 0., -0.57735),
float3x3(0., -1., 0., -0.57735, 0., 0.816497, -0.816497, 0., -0.57735),
float3x3(-1., 0., 0., 0., -0.57735, 0.816497, 0., 0.816497, 0.57735),
float3x3(1., 0., 0., 0., 0.57735, 0.816497, 0., -0.816497, 0.57735)
float3x3(-1., 0., 0.,0., 0.57735, 0.816497,0., 0.816497, -0.57735),
float3x3(0., -1., 0.,0.57735, 0., 0.816497,-0.816497, 0., 0.57735),
float3x3(0., 1., 0.,-0.57735, 0., 0.816497,0.816497, 0., 0.57735),
float3x3(1., 0., 0.,0., -0.57735, 0.816497,0., -0.816497, -0.57735)
};
// Return [-1..1] vector2 oriented in plane of the faceIndex of a regular tetrahedron

正在加载...
取消
保存