浏览代码

Fixed TransformObjectToTangent

/main
GitHub 8 年前
当前提交
800198d1
共有 1 个文件被更改,包括 1 次插入2 次删除
  1. 3
      Assets/ScriptableRenderLoop/HDRenderPipeline/ShaderVariables.hlsl

3
Assets/ScriptableRenderLoop/HDRenderPipeline/ShaderVariables.hlsl


float3 TransformObjectToTangent(float3 dirOS, float3 worldToTangent[3])
{
// TODO check: do we need to normalize ?
//return normalize(mul(float3x3(worldToTangent[0].xyz, worldToTangent[1].xyz, worldToTangent[2].xyz), mul((float3x3)unity_ObjectToWorld, dirOS)));
return normalize(mul(float3x3(worldToTangent[0].xyz, worldToTangent[1].xyz, worldToTangent[2].xyz), mul((float3x3)unity_WorldToObject, dirOS)));
return normalize(mul(float3x3(worldToTangent[0].xyz, worldToTangent[1].xyz, worldToTangent[2].xyz), mul((float3x3)unity_ObjectToWorld, dirOS)));
}
#endif // UNITY_SHADER_VARIABLES_INCLUDED
正在加载...
取消
保存