浏览代码

Remove quadFalloff part of distance attenuation

/main
egomeh 6 年前
当前提交
ba0b9874
共有 1 个文件被更改,包括 1 次插入3 次删除
  1. 4
      com.unity.render-pipelines.lightweight/LWRP/ShaderLibrary/Lighting.hlsl

4
com.unity.render-pipelines.lightweight/LWRP/ShaderLibrary/Lighting.hlsl


{
// We use a shared distance attenuation for additional directional and puctual lights
// for directional lights attenuation will be 1
half quadFalloff = distanceAttenuation.x;
half denom = distanceSqr * quadFalloff + 1.0h;
half lightAtten = 1.0h / denom;
half lightAtten = 1.0h / distanceSqr;
// We need to smoothly fade attenuation to light range. We start fading linearly at 80% of light range
// Therefore:

正在加载...
取消
保存