浏览代码

More feedback

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

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


#endif
// Volumetric don't use screenspace shadow. Transparent neither (as we don't have the depth information)
#if (SHADERPASS != SHADERPASS_VOLUMETRIC_LIGHTING && !defined(_SURFACE_TYPE_TRANSPARENT))
#ifndef _SURFACE_TYPE_TRANSPARENT
shadow = min(shadow, GetContactShadow(lightLoopContext, lightData.contactShadowIndex));
#endif
}

#endif
// Volumetric don't use screenspace shadow. Transparent neither (as we don't have the depth information)
#if (SHADERPASS != SHADERPASS_VOLUMETRIC_LIGHTING && !defined(_SURFACE_TYPE_TRANSPARENT))
#ifndef _SURFACE_TYPE_TRANSPARENT
shadow = min(shadow, GetContactShadow(lightLoopContext, lightData.contactShadowIndex));
#endif
}

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


float3 L = -light.forward; // Lights point backwards in Unity
float3 color; float attenuation;
light.contactShadowIndex = -1; // Disable shadow contact if any
EvaluateLight_Directional(context, posInput, light, unused, 0, L,
color, attenuation);

float3 L = -lightToSample * distRcp;
float3 color; float attenuation;
light.contactShadowIndex = -1; // Disable shadow contact if any
EvaluateLight_Punctual(context, posInput, light, unused,
0, L, lightToSample, distances,
color, attenuation);

float distProj = dot(lightToSample, light.forward);
float4 distances = float4(1, 1, 1, distProj);
float3 color; float attenuation; float attenuationNoContactShadows;
float3 color; float attenuation;
light.contactShadowIndex = -1; // Disable shadow contact if any
EvaluateLight_Punctual( context, posInput, light, unused,
0, L, lightToSample, distances,
color, attenuation);

正在加载...
取消
保存