浏览代码

Reintroduce EvaluateBSDF_Area()

/main
Evgenii Golubev 7 年前
当前提交
40cfe5f3
共有 2 个文件被更改,包括 21 次插入2 次删除
  1. 8
      ScriptableRenderPipeline/HDRenderPipeline/Lighting/TilePass/TilePassLoop.hlsl
  2. 15
      ScriptableRenderPipeline/HDRenderPipeline/Material/Lit/Lit.hlsl

8
ScriptableRenderPipeline/HDRenderPipeline/Lighting/TilePass/TilePassLoop.hlsl


while (i <= last && lightData.lightType == GPULIGHTTYPE_LINE)
{
DirectLighting lighting = EvaluateBSDF_Line(context, V, posInput, preLightData, lightData, bsdfData, bakeLightingData);
lightData.lightType = GPULIGHTTYPE_LINE; // Enforce constant propagation
DirectLighting lighting = EvaluateBSDF_Area(context, V, posInput, preLightData, lightData, bsdfData, bakeLightingData);
AccumulateDirectLighting(lighting, aggregateLighting);
lightData = FetchLight(lightStart, min(++i, last));

{
DirectLighting lighting = EvaluateBSDF_Rect(context, V, posInput, preLightData, lightData, bsdfData, bakeLightingData);
lightData.lightType = GPULIGHTTYPE_RECTANGLE; // Enforce constant propagation
DirectLighting lighting = EvaluateBSDF_Area(context, V, posInput, preLightData, lightData, bsdfData, bakeLightingData);
AccumulateDirectLighting(lighting, aggregateLighting);
lightData = FetchLight(lightStart, min(++i, last));

15
ScriptableRenderPipeline/HDRenderPipeline/Material/Lit/Lit.hlsl


return lighting;
}
DirectLighting EvaluateBSDF_Area(LightLoopContext lightLoopContext,
float3 V, PositionInputs posInput,
PreLightData preLightData, LightData lightData,
BSDFData bsdfData, BakeLightingData bakeLightingData)
{
if (lightData.lightType == GPULIGHTTYPE_LINE)
{
return EvaluateBSDF_Line(lightLoopContext, V, posInput, preLightData, lightData, bsdfData, bakeLightingData);
}
else
{
return EvaluateBSDF_Rect(lightLoopContext, V, posInput, preLightData, lightData, bsdfData, bakeLightingData);
}
}
//-----------------------------------------------------------------------------
// EvaluateBSDF_Env
// ----------------------------------------------------------------------------

正在加载...
取消
保存