浏览代码

Revert "HDRenderPipeline: Fix issue with tessellation shadow and camera relative code"

This reverts commit 73e6ad6a524557e41947247fc1bb32c4ca3bfdef.
/stochastic_alpha_test
Evgenii Golubev 7 年前
当前提交
1d7db227
共有 1 个文件被更改,包括 1 次插入7 次删除
  1. 8
      ScriptableRenderPipeline/HDRenderPipeline/ShaderVariablesFunctions.hlsl

8
ScriptableRenderPipeline/HDRenderPipeline/ShaderVariablesFunctions.hlsl


// Otherwise, depth comparisons become meaningless!
float4x4 trViewMat = transpose(GetWorldToViewMatrix());
float3 rotCamPos = trViewMat[3].xyz;
float3 viewPositionWS = mul((float3x3)trViewMat, -rotCamPos);
// When USE_LEGACY_UNITY_MATRIX_VARIABLES is define GetWorldToViewMatrix is absolute (because it use legacy unity matrix), but if not define it use our own variable that is camera relative.
#ifdef USE_LEGACY_UNITY_MATRIX_VARIABLES
return GetCameraRelativePositionWS(viewPositionWS);
#else
return viewPositionWS;
#endif
return mul((float3x3)trViewMat, -rotCamPos);
#endif
}

正在加载...
取消
保存