для этой страницы,
отображается код на другом
A debug material is a material that can be used for debugging of the image generation stages. By using the debug materials, you can check how the scene looks on a certain stage, visualize contents of the rendering buffers, check how they are blended into the final image. It means that you can render only reflections, or lighting, or only cubemaps, and so on.
The debug materials also allow you to check how sRGB correction and automatic exposure affect the final image.
The debug material includes all deferred buffers that are used on the Deferred Composite stage of the rendering sequence: you can compose contents of these buffers in any desired way. However, note that according to the rendering sequence, the debug materials are rendered after transparent objects rendering. So, the deferred buffers will contain data written by the transparent objects (if their materials have the Deferred Buffers flag set).
The debug materials have the higher priority than the settings in the Rendering Debug Panel of the UnigineEditor.
Applying Debug Materials#
To apply a debug material, perform the following:
- Enable rendering of the debug materials in one of the following ways:
- Via the UnigineEditor: on the Menu Bar, choose Rendering -> Features -> Debug.
- Via the console: specify 1 for the render_debug console command.
- Specify the debug material that should be applied in one of the following ways:
Masking Debug Materials#
By using the mask, you can control the area of debug material visibility. For example, by using the mask, you can create a smooth transition between the image that displays a rendering buffer and the final image. Or you can combine these images as follows:
Debug Materials Presets#
UNIGINE provides a set of preconfigured debug materials that allow debugging lighting, reflections, screen space effects, and so on. These materials are available in the Materials Hierarchy Window:
Such materials are inherited from debug_materials. You can apply one of them as is, or inherit a new material from one of them and change the parameters, apply a mask texture, or toggle the states on and off.
The following pictures demonstrate some of the preconfigured debug materials applied to the scene: