浏览代码

fix mojoshader preprocessor issue

/main
Antti Tapaninen 7 年前
当前提交
11ad0670
共有 1 个文件被更改,包括 5 次插入5 次删除
  1. 10
      com.unity.render-pipelines.high-definition/HDRP/Material/Lit/Lit.hlsl

10
com.unity.render-pipelines.high-definition/HDRP/Material/Lit/Lit.hlsl


float3 rayOriginWS = float3(0, 0, 0);
float3 rayDirWS = float3(0, 0, 0);
float mipLevel = 0;
#if DEBUG_DISPLAY
#ifdef DEBUG_DISPLAY
int debugMode = 0;
#endif
float invScreenWeightDistance = 0;

rayDirWS = preLightData.transparentRefractV;
mipLevel = preLightData.transparentSSMipLevel;
invScreenWeightDistance = _SSRefractionInvScreenWeightDistance;
#if DEBUG_DISPLAY
#ifdef DEBUG_DISPLAY
debugMode = DEBUGLIGHTINGMODE_SCREEN_SPACE_TRACING_REFRACTION;
#endif
}

rayDirWS = preLightData.iblR;
mipLevel = PositivePow(preLightData.iblPerceptualRoughness, 0.8) * uint(max(_ColorPyramidScale.z - 1, 0));
invScreenWeightDistance = _SSReflectionInvScreenWeightDistance;
#if DEBUG_DISPLAY
#ifdef DEBUG_DISPLAY
#if DEBUG_DISPLAY
#ifdef DEBUG_DISPLAY
bool debug = _DebugLightingMode == debugMode
&& !any(int2(_MouseClickPixelCoord.xy) - int2(posInput.positionSS));
#endif

// Jitter the ray origin to trade some noise instead of banding effect
ssRayInput.rayOriginWS = rayOriginWS + rayDirWS * SampleBayer4(posInput.positionSS + uint2(_FrameCount, uint(_FrameCount) / 4u)) * 0.1;
ssRayInput.rayDirWS = rayDirWS;
#if DEBUG_DISPLAY
#ifdef DEBUG_DISPLAY
ssRayInput.debug = debug;
#endif

正在加载...
取消
保存