浏览代码

Update SSR for deferred

/main
Frédéric Vauchelles 7 年前
当前提交
a3477180
共有 3 个文件被更改,包括 17 次插入20 次删除
  1. 1
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/LightLoop/Deferred.compute
  2. 28
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/LightLoop/LightLoop.hlsl
  3. 8
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Material/Lit/Lit.hlsl

1
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/LightLoop/Deferred.compute


#define LIGHTLOOP_TILE_PASS 1
// deferred opaque always use FPTL
#define USE_FPTL_LIGHTLIST 1
#define _REFLECTION_SSRAY_PROXY
//#pragma enable_d3d11_debug_symbols

28
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/LightLoop/LightLoop.hlsl


// First loop iteration
if (featureFlags & (LIGHTFEATUREFLAGS_ENV | LIGHTFEATUREFLAGS_SKY | LIGHTFEATUREFLAGS_SSREFRACTION | LIGHTFEATUREFLAGS_SSREFLECTION))
{
float reflectionHierarchyWeight = 0.0; // Max: 1.0
float refractionHierarchyWeight = 0.0; // Max: 1.0
float reflectionHierarchyWeight = 0.0; // Max: 1.0
float refractionHierarchyWeight = 0.0; // Max: 1.0
#ifdef LIGHTLOOP_TILE_PASS
GetCountAndStart(posInput, LIGHTCATEGORY_ENV, envLightStart, envLightCount);
#else
envLightCount = _EnvLightCount;
#ifdef LIGHTLOOP_TILE_PASS
GetCountAndStart(posInput, LIGHTCATEGORY_ENV, envLightStart, envLightCount);
#else
envLightCount = _EnvLightCount;
#endif
#endif
// Reflection / Refraction hierarchy is
// 1. Screen Space Refraction / Reflection

if (envLightCount > 0)
{
if (envLightCount > 0)
}
else
{
envLightData = InitSkyEnvLightData(0);
}
else
envLightData = InitSkyEnvLightData(0);
if (featureFlags & LIGHTFEATUREFLAGS_SSREFLECTION)
{

AccumulateIndirectLighting(lighting, aggregateLighting);
}
if (featureFlags & LIGHTFEATUREFLAGS_SSREFRACTION)
if (featureFlags & LIGHTFEATUREFLAGS_SSREFRACTION)
}
}
// Reflection probes are sorted by volume (in the increasing order).
if (featureFlags & LIGHTFEATUREFLAGS_ENV)

8
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Material/Lit/Lit.hlsl


#if HAS_REFRACTION
# define SSRAY_INPUT REFRACTION_SSRAY_IN
# define SSRAY_QUERY REFRACTION_SSRAY_QUERY
# if _REFRACTION_SSRAY_HIZ
# if defined(_REFRACTION_SSRAY_HIZ)
# elif _REFRACTION_SSRAY_PROXY
# elif defined(_REFRACTION_SSRAY_PROXY)
# define SSRAY_MODEL SSRAYMODEL_PROXY
# endif

# if _REFLECTION_SSRAY_HIZ
# if defined(_REFLECTION_SSRAY_HIZ)
# elif _REFLECTION_SSRAY_PROXY
# elif defined(_REFLECTION_SSRAY_PROXY)
# define SSRAY_MODEL SSRAYMODEL_PROXY
# endif
#endif

正在加载...
取消
保存