.. _stdlib_render_pipeline_component: ============== RenderPipeline ============== ++++++++++++ Enumerations ++++++++++++ .. _enum-public_components-HDRMode: .. das:attribute:: HDRMode :Values: * **SDR_RGBA8** = 0 - SDR (standard dynamic range) rendering mode. Intermediate results are stored into RGBA8 texture with colors being clamped into [0, 1] range. * **HDR_R11G11B10F** = 1 - HDR rendering mode. Intermediate results are stored into R11G11B10F texture with colors being unclamped. It's the default mode as in average scenario it gives better look than SDR without sacrificing performance and memory. * **HDR_RGBA16F** = 2 - HDR rendering mode. Intermediate results are stored into RGBA16F texture with colors being unclamped. .. _enum-public_components-TransparencySortMode: .. das:attribute:: TransparencySortMode :Values: * **Disabled** = 0 - Sorting is disabled. * **Auto** = 1 - Sorting mode is deduced automatically. It's by distance for perspective camera and by depth for orthographic camera. * **ByDistance** = 2 - Sorting is performed back to front based on distance from object's bbox center to the camera. For perspective camera it means that the order is independent from camera rotation. * **ByDepth** = 3 - Sorting is performed back to front based on depth of object's bbox center along camera view direction. For orthographic camera it means that the order is independent from object's position in the screen space. +++++++ Classes +++++++ .. _struct-render_pipeline_component-RenderPipeline: .. das:attribute:: RenderPipeline : NativeComponent This component contains general settings for rendering pipeline. Each setting is described in detail in the corresponding field documentation. To use this component, add the following line to your project file:: require engine.core_components.render_pipeline_component // or require engine.core Usage example:: let setting = create_render_settings() get_component(renderSettings) $(var rpSetup : RenderPipeline?) { rpSetup.hdrMode = HDRMode.HDR_RGBA16F rpSetup.transparencySortMode = TransparencySortMode.ByDistance } :Properties: .. _function-render_pipeline_component__dot__rq_hdrMode_RenderPipeline: .. das:operator:: RenderPipeline.hdrMode() : HDRMode .. _function-render_pipeline_component__dot__rq_hdrMode_rq_clone_RenderPipeline_HDRMode: .. das:operator:: RenderPipeline.hdrMode =(value: HDRMode) HDR rendering mode. Enabling HDR has the following advantages: - Removes color banding at near to black color values after conversion into sRGB. - Allows tonemapping to work on unclamped colors. It has the following disadvantages in case of HDR_R11G11B10F: - Precision degradation relative to SDR_RGBA8 starting from 0.125 color values. It has the following disadvantages in case of HDR_RGBA16F: - Slower rendering because of increased bandwidth. - Extra VRAM required to store RGBA16F texture compared to RGBA8 in SDR. :Arguments: * **value** : :ref:`HDRMode ` .. _function-render_pipeline_component__dot__rq_transparencySortMode_RenderPipeline: .. das:operator:: RenderPipeline.transparencySortMode() : TransparencySortMode .. _function-render_pipeline_component__dot__rq_transparencySortMode_rq_clone_RenderPipeline_TransparencySortMode: .. das:operator:: RenderPipeline.transparencySortMode =(value: TransparencySortMode) Sorting mode for transparent objects (those having ``transparencyMode`` property of their materials different from :ref:`TransparencyMode Opaque `). Because visual appearance of semi-transparent geometry depends on rendering order, we sort transparent objects by default. Sorting can be costly. First, due to the sorting itself, which may take noticeable time. Second, because sorting shuffles objects with different materials. So the number of drawcalls and the amount of costly render state changes in the worst case scenario can be as much as there are transparent objects in the scene. This also implies, that everything has to be done on CPU, including culling and filling necessary buffers. To alleviate those problems, try to use less materials for transparent geometry, and, for example, leverage ``uvRect`` and ``color`` :ref:`per-instance properties `. If you don't have intersecting transparent geometry, you can disable sorting to save performance. Otherwise, we advice against doing this, because rendering order can change between frames causing visible flickering. Descriptions of possible values are in the corresponding enum documentation. :Arguments: * **value** : :ref:`TransparencySortMode `