浏览代码

Merge pull request #137 from EvgeniiG/master

Avoid incorrectly shading the skybox region
/Branch_Batching2
GitHub 8 年前
当前提交
01469c87
共有 1 个文件被更改,包括 14 次插入3 次删除
  1. 17
      Assets/ScriptableRenderLoop/HDRenderPipeline/Lighting/Resources/Deferred.shader

17
Assets/ScriptableRenderLoop/HDRenderPipeline/Lighting/Resources/Deferred.shader


PreLightData preLightData = GetPreLightData(V, posInput, bsdfData);
float3 diffuseLighting;
float3 specularLighting;
LightLoop(V, posInput, preLightData, bsdfData, bakeDiffuseLighting, diffuseLighting, specularLighting);
float3 diffuseLighting = float3(0, 0, 0);
float3 specularLighting = float3(0, 0, 0);
#if UNITY_REVERSED_Z
float clearDepth = 0;
#else
float clearDepth = 1;
#endif
// Do not shade the far plane - wastes cycles and produces wrong results.
if (depth != clearDepth)
{
LightLoop(V, posInput, preLightData, bsdfData, bakeDiffuseLighting, diffuseLighting, specularLighting);
}
Outputs outputs;
#ifdef OUTPUT_SPLIT_LIGHTING

正在加载...
取消
保存