浏览代码

Disable fog when Diffuse, Specular and luxmeter debug modes are enabled

/main
Antoine Lelievre 6 年前
当前提交
832089b8
共有 2 个文件被更改,包括 12 次插入0 次删除
  1. 10
      com.unity.render-pipelines.high-definition/HDRP/Sky/AtmosphericScattering/AtmosphericScattering.hlsl
  2. 2
      com.unity.render-pipelines.high-definition/HDRP/Sky/OpaqueAtmosphericScattering.shader

10
com.unity.render-pipelines.high-definition/HDRP/Sky/AtmosphericScattering/AtmosphericScattering.hlsl


TEXTURE3D(_VBufferLighting);
#ifdef DEBUG_DISPLAY
#include "../../Debug/DebugDisplay.hlsl"
#endif
CBUFFER_START(AtmosphericScattering)
int _AtmosphericScatteringType;
// Common

{
float3 fogColor = 0;
float fogFactor = 0;
#ifdef DEBUG_DISPLAY
// Don't sample amthmospheric scattering when diffuse lighting debug is enabled so fog is not visible
if (_DebugLightingMode == DEBUGLIGHTINGMODE_DIFFUSE_LIGHTING || _DebugLightingMode == DEBUGLIGHTINGMODE_SPECULAR_LIGHTING || _DebugLightingMode == DEBUGLIGHTINGMODE_LUX_METER)
return float4(0, 0, 0, 0);
#endif
switch (_AtmosphericScatteringType)
{

2
com.unity.render-pipelines.high-definition/HDRP/Sky/OpaqueAtmosphericScattering.shader


#pragma vertex Vert
#pragma fragment Frag
#pragma multi_compile _ DEBUG_DISPLAY
// #pragma enable_d3d11_debug_symbols

正在加载...
取消
保存