Xenko

OPEN / CLOSE
  • Features
  • Blog
  • Documentation
  • Community
(icon) Download

  • Facebook
  • Twitter
  • YouTube

LANGUAGE

OPEN / CLOSE
  • English
  • Manual
  • API
  • Release notes
    Show / Hide Table of Contents

    Render features

    A @'SiliconStudio.Xenko.Rendering.RenderFeature' is responsible for drawing a given type of @'SiliconStudio.Xenko.Rendering.RenderObject'.

    Render phases

    Render features have several phases.

    Collect

    The collect phase determines what needs to be processed and rendered. It's usually driven by the graphics compositor.

    The collect phase:

    • creates render views, and updating them with the most recent data such as view and projection matrices
    • creates and setting up render stages
    • performes visibility culling and sorting

    Extract

    The extract phase copies data from game states of previously collected objects to short-lived render-specific structures. It's usually driven by the @'SiliconStudio.Xenko.Rendering.RenderSystem' and @'SiliconStudio.Xenko.Rendering.RenderFeature's.

    This should be as fast as possible and avoid heavy computations since game update and scripts are blocked. Heavy computations should be deferred to Prepare.

    Note

    Currently, Xenko doesn't parallelize game updates and scripts, so they won't be resumed until the prepare and draw phases are finished.

    Example tasks:

    • copying object matrices
    • copying material parameters

    Prepare

    The prepare phase prepares GPU resources and performs heavy computations. This is usually driven by the @'SiliconStudio.Xenko.Rendering.RenderSystem' and @'SiliconStudio.Xenko.Rendering.RenderFeature's.

    Example tasks:

    • computing lighting data and structures
    • filling constant buffers and resource tables

    Draw

    The draw phase fills the GPU command list.

    Example tasks:

    • setting up render textures
    • drawing combinations of render stage with render view.

    Example

    A typical example of views and stages created during collect phase, used during the draw phase:

    media/render-features-draw-example.png

    Pipeline processors

    Pipeline processors are classes called when creating the pipeline state. This lets you do things such as enable alpha blending or wireframe rendering in a specific render stage.

    Xenko includes several predefined pipeline processors. You can also create your own.

    See also

    • Rendering pipeline
    • Render stages
    • Effects and shaders
    • Graphics compositor
    • Improve this Doc

    Back to top

    Copyright © 2016 Silicon Studio
    Generated by DocFX