浏览代码

Move clamp of cookie size from UI to LightLoop

/feature-ReflectionProbeFit
sebastienlagarde 7 年前
当前提交
8a1c2e42
共有 1 个文件被更改,包括 4 次插入4 次删除
  1. 8
      ScriptableRenderPipeline/HDRenderPipeline/Lighting/LightLoop/LightLoop.cs

8
ScriptableRenderPipeline/HDRenderPipeline/Lighting/LightLoop/LightLoop.cs


// Light direction for directional is opposite to the forward direction
directionalLightData.forward = light.light.transform.forward;
// Rescale for cookies and windowing.
directionalLightData.up = light.light.transform.up * 2 / additionalData.shapeHeight;
directionalLightData.right = light.light.transform.right * 2 / additionalData.shapeWidth;
directionalLightData.right = light.light.transform.right * 2 / Mathf.Max(additionalData.shapeWidth, 0.001f);
directionalLightData.up = light.light.transform.up * 2 / Mathf.Max(additionalData.shapeHeight, 0.001f);
directionalLightData.positionWS = light.light.transform.position;
directionalLightData.color = GetLightColor(light);
directionalLightData.diffuseScale = additionalData.affectDiffuse ? diffuseDimmer : 0.0f;

lightData.size.x = light.range;
// Rescale for cookies and windowing.
lightData.right *= 2.0f / additionalLightData.shapeWidth;
lightData.up *= 2.0f / additionalLightData.shapeHeight;
lightData.right *= 2.0f / Mathf.Max(additionalLightData.shapeWidth, 0.001f);
lightData.up *= 2.0f / Mathf.Max(additionalLightData.shapeHeight, 0.001f);
}
else if (lightData.lightType == GPULightType.ProjectorPyramid)
{

正在加载...
取消
保存