浏览代码

HDRenderPipeline: Handle UINT_MAX case of materialFeatures

- This should increase performance for deferred.shader and also allow to
debug material feature in the Gbuffer
/main
Sebastien Lagarde 7 年前
当前提交
2624fe5f
共有 1 个文件被更改,包括 6 次插入0 次删除
  1. 6
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Material/Lit/Lit.hlsl

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


pixelFeatureFlags |= tileFeatureFlags & (pixelHasIridescence ? MATERIALFEATUREFLAGS_LIT_IRIDESCENCE : 0);
pixelFeatureFlags |= tileFeatureFlags & (pixelHasClearCoat ? MATERIALFEATUREFLAGS_LIT_CLEAR_COAT : 0);
// If tileFeatureFlags == UINT_MAX it mean we are call from deferred.shader (or a debug mode) that have no classification
// in this case for the sake of performance saving we should rely on pixelFeatureFlags
// TODO: validate that this doesn't hurst performance somewhere with classification
if (tileFeatureFlags == UINT_MAX)
bsdfData.materialFeatures = pixelFeatureFlags;
// Decompress feature-agnostic data from the G-Buffer.
float3 baseColor = inGBuffer0.rgb;

正在加载...
取消
保存