None,
SSAO,
SSAOBeforeFiltering,
MotionVectors
MotionVectors,
NanTracker
}
[Serializable]
#define FULLSCREENDEBUGMODE_SSAO (1)
#define FULLSCREENDEBUGMODE_SSAOBEFORE_FILTERING (2)
#define FULLSCREENDEBUGMODE_MOTION_VECTORS (3)
#define FULLSCREENDEBUGMODE_NAN_TRACKER (4)
#endif
{
return 1.0f - SAMPLE_TEXTURE2D(_DebugFullScreenTexture, sampler_DebugFullScreenTexture, input.texcoord).xxxx;
if (_FullScreenDebugMode == FULLSCREENDEBUGMODE_NAN_TRACKER)
#if UNITY_UV_STARTS_AT_TOP
input.texcoord.y = 1.0 - input.texcoord.y;
float4 color = SAMPLE_TEXTURE2D(_DebugFullScreenTexture, sampler_DebugFullScreenTexture, input.texcoord);
if (any(isnan(color)) || any(isinf(color)))
color = float4(1.0, 0.0, 1.0, 1.0);
else
// Dim the color buffer so we can see NaNs & Infs better
color.rgb *= 0.25;
return color;
if (_FullScreenDebugMode == FULLSCREENDEBUGMODE_MOTION_VECTORS)
float2 mv = SampleMotionVectors(input.texcoord);
// Render all type of transparent forward (unlit, lit, complex (hair...)) to keep the sorting between transparent objects.
RenderForward(m_CullResults, camera, renderContext, cmd, false);
PushFullScreenDebugTexture(cmd, m_CameraColorBuffer, camera, renderContext, FullScreenDebugMode.NanTracker);
// Planar and real time cubemap doesn't need post process and render in FP16
if (camera.cameraType == CameraType.Reflection)