docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Rendering Debugger

    The Rendering Debugger window lets you visualize various lighting, rendering, and Material properties. The visualizations help you identify rendering issues and optimize scenes and rendering configurations.

    This section contains the following topics:

    • How to access the Rendering Debugger window.

      Information on how to access the Rendering Debugger window in the Editor, in the Play mode, and at runtime in Development builds.

    • Rendering Debugger window sections

      Descriptions of the elements and properties in the Rendering Debugger window.

    • Navigation at runtime

      How to navigate the Rendering Debugger interface at runtime.

    How to access the Rendering Debugger window

    The Rendering Debugger window is available in the following modes:

    • The Editor.

    • The Play mode.

    • At runtime in the standalone Unity Player, on any device. The window is only available in Development builds.

    To enable all the sections of the Rendering Debugger in your built application, disable Strip Debug Variants in Project Settings > Graphics > URP Global Settings. Otherwise you can only use the Display Stats section.

    Use one of the following options to open the Rendering Debugger window.

    In the Editor:

    • Select Window > Analysis > Rendering Debugger.

    • Press Ctrl+Backspace (Ctrl+Delete on macOS).

    In the Play mode or at runtime in a Development build:

    • On a desktop or laptop computer, press LeftCtrl+Backspace (LeftCtrl+Delete on macOS).

    • On a console controller, press L3 and R3 (Left Stick and Right Stick).

    • On a mobile device, use a three-finger double tap.

    You can disable the runtime UI using the enableRuntimeUI property.

    Rendering Debugger window sections

    The Rendering Debugger window contains the following sections:

    • Display Stats

    • Frequently Used

    • Material

    • Lighting

    • Rendering

    • Probe Volume

    The following illustration shows the Rendering Debugger window in the Scene view.

    Rendering Debugger window.

    Display Stats

    The Display Stats panel shows statistics relevant to debugging performance issues in your project. You can only view this section of the Rendering Debugger in Play mode.

    Use the [runtime shortcuts](#Navigation at runtime) to open the Display stats window in the scene view at runtime.

    Frame Stats

    The Frame Stats section displays the average, minimum, and maximum value of each property. URP calculates each Frame Stat value over the 30 most recent frames.

    Property Description
    Frame Rate The frame rate (in frames per second) for the current camera view.
    Frame Time The total frame time for the current camera view.
    CPU Main Thread Frame The total time (in milliseconds) between the start of the frame and the time when the Main Thread finished the job.
    CPU Render Thread Frame The time (in milliseconds) between the start of the work on the Render Thread and the time Unity waits to render the present frame (Gfx.PresentFrame).
    CPU Present Wait The time (in milliseconds) that the CPU spent waiting for Unity to render the present frame (Gfx.PresentFrame) during the last frame.
    GPU Frame The amount of time (in milliseconds) the GPU takes to render a given frame.
    Debug XR Layout Display debug information for XR passes.
    This mode is only available in editor and development builds.

    Bottlenecks

    A bottleneck is a condition that occurs when one process performs significantly slower than other components, and other components depend on it.

    The Bottlenecks section describes the distribution of the last 60 frames across the CPU and GPU. You can only check the Bottleneck information when you build your player on a device.

    Note: Vsync limits the Frame Rate based on the refresh rate of your device’s screen. This means when you enable Vsync, the Present Limited category is 100% in most cases. To turn Vsync off, go to Edit > Project settings > Quality > Current Active Quality Level and set the Vsync Count set to Don't Sync.

    Bottleneck categories

    Category Description
    CPU The percentage of the last 60 frames in which the CPU limited the frame time.
    GPU The percentage of the last 60 frames in which the GPU limited the frame time.
    Present limited The percentage of the last 60 frames in which the frame time was limited by the following presentation constraints:
    • Vertical Sync (Vsync): Vsync synchronizes rendering to the refresh rate of your display.
    •Target framerate: A function that you can use to manually limit the frame rate of an application. If a frame is ready before the time you specify in targetFrameRate, Unity waits before presenting the frame.
    Balanced This percentage of the last 60 frames in which the frame time was not limited by any of the above categories. A frame that is 100% balanced indicates the processing time for both CPU and GPU is approximately equal.

    Bottleneck example

    If Vsync limited 20 of the 60 most recent frames, the Bottleneck section might appear as follows:

    • CPU 0.0%: This indicates that URP did not render any of the last 60 frames on the CPU.
    • GPU 66.6%: This indicates that the GPU limited 66.6% of the 60 most recent frames rendered by URP.
    • Present Limited 33.3%: This indicates that presentation constraints (Vsync or the target framerate) limited 33.3% of the last 60 frames.
    • Balanced 0.0%: This indicates that in the last 60 frames, there were 0 frames where the CPU processing time and GPU processing time were the same.

    In this example, the bottleneck is the GPU.

    Detailed Stats

    The Detailed Stats section displays the amount of time in milliseconds that each rendering step takes on the CPU and GPU. URP updates these values once every frame based on the previous frame.

    Property Description
    Update every second with average Calculate average values over one second and update every second.
    Hide empty scopes Hide profiling scopes that use 0.00ms of processing time on the CPU and GPU.
    Debug XR Layout Enable to display debug information for XR passes. This mode only appears in the editor and development builds.

    Frequently Used

    This section contains a selection of properties that users use often. The properties are from the other sections in the Rendering Debugger window. For information about the properties, refer to the sections Material, Lighting, and Rendering.

    Material

    The properties in this section let you visualize different Material properties.

    Rendering Debugger, Material section
    Rendering Debugger, Material section

    Material Filters

    Property Description
    Material Override Select a Material property to visualize on every GameObject on screen.
    The available options are:
    • Albedo
    • Specular
    • Alpha
    • Smoothness
    • AmbientOcclusion
    • Emission
    • NormalWorldSpace
    • NormalTangentSpace
    • LightingComplexity
    • Metallic
    • SpriteMask
    With the LightingComplexity value selected, Unity shows how many Lights affect areas of the screen space.
    Vertex Attribute Select a vertex attribute of GameObjects to visualize on screen.
    The available options are:
    • Texcoord0
    • Texcoord1
    • Texcoord2
    • Texcoord3
    • Color
    • Tangent
    • Normal

    Material Validation

    Property Description
    Material Validation Mode Select which Material properties to visualize: Albedo, or Metallic. Selecting one of the properties shows the new context menu.
        Validation Mode: Albedo Selecting Albedo in the Material Validation Mode property shows the Albedo Settings section with the following properties:
    Validation Preset: Select a pre-configured material, or Default Luminance to visualize luminance ranges.
    Min Luminance: Unity draws pixels where the luminance is lower than this value with red color.
    Max Luminance: Unity draws pixels where the luminance is higher than this value with blue color.
    Hue Tolerance: available only when you select a pre-set material. Unity adds the hue tolerance to the minimum and maximum luminance values.
    Saturation Tolerance: available only when you select a pre-set material. Unity adds the saturation tolerance to the minimum and maximum luminance values.
        Validation Mode: Metallic Selecting Metallic in the Material Validation Mode property shows the Metallic Settings section with the following properties:
    Min Value: Unity draws pixels where the metallic value is lower than this value with red color.
    Max Value: Unity draws pixels where the metallic value is higher than this value with blue color.

    Lighting

    The properties in this section let you visualize different settings and elements related to the lighting system, such as shadow cascades, reflections, contributions of the Main and the Additional Lights, and so on.

    Lighting Debug Modes


    The Lighting Debug Modes subsection.

    Property Description
    Lighting Debug Mode Specifies which lighting and shadow information to overlay on-screen to debug. The options are:
    • None: Renders the scene normally without a debug overlay.
    • Shadow Cascades: Overlays shadow cascade information so you can determine which shadow cascade each pixel uses. Use this to debug shadow cascade distances. For information on which color represents which shadow cascade, refer to the Shadows section of the URP Asset.
    • Lighting Without Normal Maps: Renders the scene to visualize lighting. This mode uses neutral materials and disables normal maps. This and the Lighting With Normal Maps mode are useful for debugging lighting issues caused by normal maps.
    • Lighting With Normal Maps: Renders the scene to visualize lighting. This mode uses neutral materials and allows normal maps.
    • Reflections: Renders the scene to visualize reflections. This mode applies perfectly smooth, reflective materials to every Mesh Renderer.
    • Reflections With Smoothness: Renders the scene to visualize reflections. This mode applies reflective materials without an overridden smoothness to every GameObject.
    Lighting Features Specifies flags for which lighting features contribute to the final lighting result. Use this to view and debug specific lighting features in your scene. The options are:
    • Nothing: Shortcut to disable all flags.
    • Everything: Shortcut to enable all flags.
    • Global Illumination: Indicates whether to render global illumination.
    • Main Light: Indicates whether the main directional Light contributes to lighting.
    • Additional Lights: Indicates whether lights other than the main directional light contribute to lighting.
    • Vertex Lighting: Indicates whether additional lights that use per-vertex lighting contribute to lighting.
    • Emission: Indicates whether emissive materials contribute to lighting.
    • Ambient Occlusion: Indicates whether ambient occlusion contributes to lighting.

    Rendering

    The properties in this section let you visualize different rendering features.

    Rendering Debug


    The Rendering Debug subsection.

    Property Description
    Map Overlays Specifies which render pipeline texture to overlay on the screen. The options are:
    • None: Renders the scene normally without a texture overlay.
    • Depth: Overlays the camera's depth texture on the screen.
    • Additional Lights Shadow Map: Overlays the shadow map that contains shadows cast by lights other than the main directional light.
    • Main Light Shadow Map: Overlays the shadow map that contains shadows cast by the main directional light.
    **  Map Size** The width and height of the overlay texture as a percentage of the view window URP displays it in. For example, a value of 50 fills up a quarter of the screen (50% of the width and 50% of the height).
    HDR Indicates whether to use high dynamic range (HDR) to render the scene. Enabling this property only has an effect if you enable HDR in your URP Asset.
    MSAA Indicates whether to use Multisample Anti-aliasing (MSAA) to render the scene. Enabling this property only has an effect if:
    • You set Anti Aliasing (MSAA) to a value other than Disabled in your URP Asset.
    • You use the Game View. MSAA has no effect in the Scene View.
    Post-processing Specifies how URP applies post-processing. The options are:
    • Disabled: Disables post-processing.
    • Auto: Unity enables or disables post-processing depending on the currently active debug modes. If color changes from post-processing would change the meaning of a debug mode's pixel, Unity disables post-processing. If no debug modes are active, or if color changes from post-processing don't change the meaning of the active debug modes' pixels, Unity enables post-processing.
    • Enabled: Applies post-processing to the image that the camera captures.
    Additional Wireframe Modes Specifies whether and how to render wireframes for meshes in your scene. The options are:
    • None: Doesn't render wireframes.
    • Wireframe: Exclusively renders edges for meshes in your scene. In this mode, you can see the wireframe for meshes through the wireframe for closer meshes.
    • Solid Wireframe: Exclusively renders edges and faces for meshes in your scene. In this mode, the faces of each wireframe mesh hide edges behind them.
    • Shaded Wireframe: Renders edges for meshes as an overlay. In this mode, Unity renders the scene in color and overlays the wireframe over the top.
    Overdraw Indicates whether to render the overdraw debug view. This is useful to check where Unity draws pixels over one other.

    Pixel Validation


    The Pixel Validation subsection.

    Property Description
    Pixel Validation Mode Specifies which mode Unity uses to validate pixel color values. The options are:
    • None: Renders the scene normally and doesn't validate any pixels.
    • Highlight NaN, Inf and Negative Values: Highlights pixels that have color values that are NaN, Inf, or negative.
    • Highlight Values Outside Range: Highlights pixels that have color values outside a particular range. Use Value Range Min and Value Range Max.
    **  Channels** Specifies which value to use for the pixel value range validation. The options are:
    • RGB: Validates the pixel using the luminance value calculated from the red, green, and blue color channels.
    • R: Validates the pixel using the value from the red color channel.
    • G: Validates the pixel using the value from the green color channel.
    • B: Validates the pixel using the value from the blue color channel.
    • A: Validates the pixel using the value from the alpha channel.
    This property only appears if you set Pixel Validation Mode to Highlight Values Outside Range.
    **   Value Range Min** The minimum valid color value. Unity highlights color values that are less than this value.

    This property only appears if you set Pixel Validation Mode to Highlight Values Outside Range.
    **   Value Range Max** The maximum valid color value. Unity highlights color values that are greater than this value.

    This property only appears if you set Pixel Validation Mode to Highlight Values Outside Range.

    Probe Volume panel

    These settings make it possible for you to visualize Probe Volumes in your Scene, and configure the visualization.

    Subdivision Visualization

    Property Sub-property Description
    Display Cells Display cells. Refer to Understanding Probe Volumes for more information.
    Display Bricks Display bricks. Refer to Understanding Probe Volumes for more information.
    Live Subdivision Preview Enable a preview of Probe Volume data in the scene without baking. This might make the Editor slower. This setting appears only if you select Display Cells or Display Bricks.
    Cell Updates Per Frame Set the number of cells, bricks, and probe positions to update per frame. Higher values might make the Editor slower. The default value is 4. This property appears only if you enable Live Subdivision Preview.
    Update Frequency Set how frequently Unity updates cell, bricks, and probe positions, in seconds. The default value is 1. This property appears only if you enable Live Subdivision Preview.
    Debug Draw Distance Set how far from the scene camera Unity draws debug visuals for cells and bricks, in meters. The default value is 500.

    Probe Visualization

    Property Sub-property Description
    Display Probes Display probes.
    Probe Shading Mode Set what the Rendering Debugger displays. The options are:
    • SH: Display the spherical harmonics (SH) lighting data for the final color calculation. The number of bands depends on the SH Bands setting in the active URP Asset.
    • SHL0: Display the spherical harmonics (SH) lighting data with only the first band.
    • SHL0L1: Display the spherical Harmonics (SH) lighting data with the first two bands.
    • Validity: Display whether probes are valid, based on the number of backfaces the probe samples. Refer to Fix issues with Probe Volumes for more information about probe validity.
    • Probe Validity Over Dilation Threshold: Display red if a probe samples too many backfaces, based on the Validity Threshold set in the Probe Volumes panel. This means the probe can't be baked or sampled.
    • Invalidated By Touchup Volumes: Display probes that a Probe Adjustment Volume component has made invalid.
    • Size: Display a different color for each size of brick.
    Debug Size Set the size of the displayed probes. The default is 0.3.
    Exposure Compensation Set the brightness of the displayed probes. Decrease the value to increase brightness. The default is 0. This property appears only if you set Probe Shading Mode to SH, SHL0, or SHL0L1.
    Max Subdivisions Displayed Set the lowest probe density to display. For example, set this to 0 to display only the highest probe density.
    Min Subdivisions Displayed Set the highest probe density to display.
    Debug Probe Sampling Display how probes are sampled for a pixel. In the Scene view, in the Adaptive Probe Volumes overlay, select Select Pixel to change the pixel.
    Debug Size Set the size of the Debug Probe Sampling display.
    Debug With Sampling Noise Enable sampling noise for this debug view. Enabling this gives more accurate information, but makes the information more difficult to read.
    Virtual Offset Debug Display the offsets Unity applies to Light Probe capture positions.
    Debug Size Set the size of the arrows that represent Virtual Offset values.
    Debug Draw Distance Set how far from the scene camera Unity draws debug visuals for cells and bricks, in meters. The default is 200.

    Streaming

    Use the following properties to control how URP streams Probe Volumes. Refer to Streaming Probe Volumes for more information.

    Property Description
    Freeze Streaming Stop Unity from streaming probe data.
    Display Streaming Score If you enable Display Cells, this setting darkens cells that have a lower priority for streaming. Cells closer to the camera usually have the highest priority.
    Maximum cell streaming Stream as many cells as possible every frame.
    Display Index Fragmentation Open an overlay that displays how fragmented the streaming memory is. A green square is an area of used memory. The more spaces between the green squares, the more fragmented the memory.
    Index Fragmentation Rate Displays the amount of fragmentation as a numerical value, where 0 is no fragmentation.
    Verbose Log Log information about streaming.

    Navigation at runtime

    This section describes how to navigate the Rendering Debugger interface at runtime.

    To change the current active item:

    • Keyboard: use the arrow keys.

    • Touch screen: tap the arrows next to properties.

    • Xbox controller: use the Directional pad (D-Pad).

    • PlayStation controller: use the Directional buttons.

    To change the current tab:

    • Keyboard: use the Page up and Page down keys (Fn + Up and Fn + Down keys for MacOS).

    • Touch screen: tap the arrows next to tab title.

    • Xbox controller: use the Left Bumper and Right Bumper.

    • PlayStation controller: use the L1 button and R1 button.

    To display the current active item independently of the debug window:

    • Keyboard: press the right Shift key.

    • Xbox controller: press the X button.

    • PlayStation controller: press the Square button.


    Did you find this page useful? Please give it a rating:

    Thanks for rating this page!

    Report a problem on this page

    What kind of problem would you like to report?

    • This page needs code samples
    • Code samples do not work
    • Information is missing
    • Information is incorrect
    • Information is unclear or confusing
    • There is a spelling/grammar error on this page
    • Something else

    Thanks for letting us know! This page has been marked for review based on your feedback.

    If you have time, you can provide more information to help us fix the problem faster.

    Provide more information

    You've told us this page needs code samples. If you'd like to help us further, you could provide a code sample, or tell us about what kind of code sample you'd like to see:

    You've told us there are code samples on this page which don't work. If you know how to fix it, or have something better we could use instead, please let us know:

    You've told us there is information missing from this page. Please tell us more about what's missing:

    You've told us there is incorrect information on this page. If you know what we should change to make it correct, please tell us:

    You've told us this page has unclear or confusing information. Please tell us more about what you found unclear or confusing, or let us know how we could make it clearer:

    You've told us there is a spelling or grammar error on this page. Please tell us what's wrong:

    You've told us this page has a problem. Please tell us more about what's wrong:

    Thank you for helping to make the Unity documentation better!

    Your feedback has been submitted as a ticket for our documentation team to review.

    We are not able to reply to every ticket submitted.

    In This Article
    • How to access the Rendering Debugger window
    • Rendering Debugger window sections
      • Display Stats
      • Frame Stats
      • Bottlenecks
        • Bottleneck categories
        • Bottleneck example
      • Detailed Stats
      • Frequently Used
      • Material
        • Material Filters
        • Material Validation
      • Lighting
        • Lighting Debug Modes
      • Rendering
        • Rendering Debug
        • Pixel Validation
    • Probe Volume panel
      • Subdivision Visualization
      • Probe Visualization
      • Streaming
    • Navigation at runtime
    Back to top
    Copyright © 2024 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)