浏览代码

integrate PR feedback

/main
sebastienlagarde 6 年前
当前提交
b3199d5d
共有 2 个文件被更改,包括 3 次插入4 次删除
  1. 3
      com.unity.render-pipelines.high-definition/HDRP/Lighting/LightEvaluation.hlsl
  2. 4
      com.unity.render-pipelines.high-definition/HDRP/Lighting/Volumetrics/VolumetricLighting.compute

3
com.unity.render-pipelines.high-definition/HDRP/Lighting/LightEvaluation.hlsl


shadow = shadowMask = (lightData.shadowMaskSelector.x >= 0.0) ? dot(bakeLightingData.bakeShadowMask, lightData.shadowMaskSelector) : 1.0;
#endif
// We test NdotL > 0.0 to not sample the shadow map if it is not required.
// In case of thin mode we always need to perform the fetch as we reuse it for back and front lighting
// We test NdotL >= 0.0 to not sample the shadow map if it is not required.
UNITY_BRANCH if (lightData.shadowIndex >= 0 && (dot(N, L) >= 0.0))
{
#ifdef USE_DEFERRED_DIRECTIONAL_SHADOWS

4
com.unity.render-pipelines.high-definition/HDRP/Lighting/Volumetrics/VolumetricLighting.compute


DirectionalLightData light = _DirectionalLightDatas[i];
float3 L = -light.forward; // Lights point backwards in Unity
float3 color; float attenuation; float attenuationNoContactShadows;
float3 color; float attenuation;
EvaluateLight_Directional(context, posInput, light, unused, 0, L,
color, attenuation);

float4 distances = float4(dist, distSq, distRcp, distProj);
float3 L = -lightToSample * distRcp;
float3 color; float attenuation; float attenuationNoContactShadows;
float3 color; float attenuation;
EvaluateLight_Punctual(context, posInput, light, unused,
0, L, lightToSample, distances,
color, attenuation);

正在加载...
取消
保存