浏览代码

Minor renaming.

/Branch_Batching2
Julien Ignace 8 年前
当前提交
c8b1658e
共有 1 个文件被更改,包括 8 次插入8 次删除
  1. 16
      Assets/ScriptableRenderPipeline/HDRenderPipeline/Lighting/TilePass/TilePass.cs

16
Assets/ScriptableRenderPipeline/HDRenderPipeline/Lighting/TilePass/TilePass.cs


{
var directionalLightData = new DirectionalLightData();
float diffuseIntensity = m_PassSettings.diffuseGlobalDimmer * additionalData.lightDimmer;
float specularIntensity = m_PassSettings.specularGlobalDimmer * additionalData.lightDimmer;
if (diffuseIntensity <= 0.0f && specularIntensity <= 0.0f)
float diffuseDimmer = m_PassSettings.diffuseGlobalDimmer * additionalData.lightDimmer;
float specularDimmer = m_PassSettings.specularGlobalDimmer * additionalData.lightDimmer;
if (diffuseDimmer <= 0.0f && specularDimmer <= 0.0f)
return false;
// Light direction for directional is opposite to the forward direction

directionalLightData.positionWS = light.light.transform.position;
directionalLightData.color = GetLightColor(light);
directionalLightData.diffuseScale = additionalData.affectDiffuse ? diffuseIntensity : 0.0f;
directionalLightData.specularScale = additionalData.affectSpecular ? specularIntensity : 0.0f;
directionalLightData.diffuseScale = additionalData.affectDiffuse ? diffuseDimmer : 0.0f;
directionalLightData.specularScale = additionalData.affectSpecular ? specularDimmer : 0.0f;
directionalLightData.invScaleX = 1.0f / light.light.transform.localScale.x;
directionalLightData.invScaleY = 1.0f / light.light.transform.localScale.y;
directionalLightData.cosAngle = 0.0f;

float distanceToCamera = (lightData.positionWS - camera.transform.position).magnitude;
float distanceFade = ComputeLinearDistanceFade(distanceToCamera, additionalData.fadeDistance);
float lightIntensity = additionalData.lightDimmer * distanceFade;
float lightScale = additionalData.lightDimmer * distanceFade;
lightData.diffuseScale = additionalData.affectDiffuse ? lightIntensity * m_PassSettings.diffuseGlobalDimmer : 0.0f;
lightData.specularScale = additionalData.affectSpecular ? lightIntensity * m_PassSettings.specularGlobalDimmer : 0.0f;
lightData.diffuseScale = additionalData.affectDiffuse ? lightScale * m_PassSettings.diffuseGlobalDimmer : 0.0f;
lightData.specularScale = additionalData.affectSpecular ? lightScale * m_PassSettings.specularGlobalDimmer : 0.0f;
if (lightData.diffuseScale <= 0.0f && lightData.specularScale <= 0.0f)
return false;

正在加载...
取消
保存