浏览代码

Avoid shading pixels behind rectangular lights

/Branch_Batching2
Evgenii Golubev 8 年前
当前提交
7cc7dab2
共有 1 个文件被更改,包括 11 次插入4 次删除
  1. 15
      Assets/ScriptableRenderPipeline/HDRenderPipeline/Material/Lit/Lit.hlsl

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


diffuseLighting = float3(0.0, 0.0, 0.0);
specularLighting = float3(0.0, 0.0, 0.0);
// TODO: This could be precomputed.
float halfWidth = lightData.size.x * 0.5;
float halfHeight = lightData.size.y * 0.5;
float3 unL = lightData.positionWS - positionWS;
float3 unL = lightData.positionWS - positionWS;
[branch]
if (dot(lightData.forward, unL) >= 0)
{
// The light is back-facing.
return;
}
// TODO: This could be precomputed.
float halfWidth = lightData.size.x * 0.5;
float halfHeight = lightData.size.y * 0.5;
// Define the dimensions of the attenuation volume.
// TODO: This could be precomputed.

正在加载...
取消
保存