浏览代码

Fix shadows from directional lights

/Branch_Batching2
Evgenii Golubev 8 年前
当前提交
3464c886
共有 1 个文件被更改,包括 8 次插入0 次删除
  1. 8
      Assets/ScriptableRenderPipeline/HDRenderPipeline/ShaderVariables.hlsl

8
Assets/ScriptableRenderPipeline/HDRenderPipeline/ShaderVariables.hlsl


// Computes the world space view direction (pointing towards the camera).
float3 GetWorldSpaceNormalizeViewDir(float3 positionWS)
{
#if SHADERPASS != SHADERPASS_DEPTH_ONLY
#else
// TODO: set 'unity_OrthoParams' during the shadow pass.
if (GetWorldToHClipMatrix()[3].x != 0 &&
GetWorldToHClipMatrix()[3].y != 0 &&
GetWorldToHClipMatrix()[3].z != 0 &&
GetWorldToHClipMatrix()[3].w != 1)
#endif
{
// Perspective
float3 V = GetCurrentCameraPosition() - positionWS;

正在加载...
取消
保存