浏览代码

Merge pull request #1617 from Unity-Technologies/DisableFogWithDiffsueAndSpecularDebug

Disable fog when Diffuse, Specular and luxmeter debug modes are enabled
/main
GitHub 6 年前
当前提交
4790e09b
共有 3 个文件被更改,包括 13 次插入0 次删除
  1. 1
      com.unity.render-pipelines.high-definition/CHANGELOG.md
  2. 10
      com.unity.render-pipelines.high-definition/HDRP/Sky/AtmosphericScattering/AtmosphericScattering.hlsl
  3. 2
      com.unity.render-pipelines.high-definition/HDRP/Sky/OpaqueAtmosphericScattering.shader

1
com.unity.render-pipelines.high-definition/CHANGELOG.md


- Fixed issue when using more than one volume mask texture with density volumes.
- Fixed an error which prevented volumetric lighting from working if no density volumes with 3D textures were present.
- Fixed issue with color temperature not take correctly into account with static lighting
- Don't display fog when diffuse lighting, specular lighting, or lux meter debug mode are enabled.
### Added
- Add option supportDitheringCrossFade on HDRP Asset to allow to remove shader variant during player build if needed

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 atmospheric scattering when lighting debug more are 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

正在加载...
取消
保存