@@ -37,6 +37,7 @@ This document describes the overall design of [luminance].
3737 * [ Type-driven interface] ( #type-driven-interface )
3838 * [ Vertex instancing] ( #vertex-instancing )
3939 * [ Tessellation slice mapping] ( #tessellation-slice-mapping )
40+ * [ Tessellation views] ( #tessellation-views )
4041 * [ Textures] ( #textures )
4142 * [ ` Dim ` , ` Dimensionable ` and others] ( #dim-dimensionable-and-others )
4243 * [ Pixel formats] ( #pixel-formats )
@@ -47,6 +48,7 @@ This document describes the overall design of [luminance].
4748 * [ Obtaining a pipeline gate] ( #obtaining-a-pipeline-gate )
4849 * [ Shading gates] ( #shading-gates )
4950 * [ Render gates] ( #render-gates )
51+ * [ Tessellation gates] ( #tessellation-gates )
5052 * [ Queries] ( #queries )
5153
5254<!-- vim-markdown-toc -->
@@ -500,6 +502,8 @@ core, tessellations are quite easy to understand. A couple of raw concepts must
500502 [ vertex storage] ( #vertex-storage ) of the tessellation.
501503- _ Slice mapping_ : tessellations’ data can be mapped back to be updated. More on that in the
502504 [ slice mapping] ( #tessellation-slice-mapping ) section.
505+ - Tessellation view: allow to _ view_ into the whole / a subport of the tessellation. This is mainly used for rendering
506+ with tessellation gates.
503507
504508### Primitives
505509
@@ -673,6 +677,19 @@ It is highly recommended to prefer using slice mapping to reconstructing a full
673677tessellation construction goes through a lot of GPU settings (buffer allocation, etc.), while slice mapping is much
674678faster. You also get access to function that works on slices, such as ` copy_from_slice ` for instance.
675679
680+ ### Tessellation views
681+
682+ Tessellation views allow to render a subpart of a ` Tess ` . You can decide to render the whole part of the tessellation,
683+ or a subpart, starting at a given vertex and ending at another.
684+
685+ Tessellation views allow for various kinds of effects: particles engine, packing objects into the same GPU region, etc.
686+ etc.
687+
688+ You can create a tessellation view using ` TessView::whole ` , ` TessView::sub ` , ` TessView::slice ` or the instance-based
689+ versions, which also accept the number of instances to render. Another good way to create tessellation views is to use
690+ the ` View ` trait, which allows to use ranges with the ` view() ` and ` inst_view() ` methods, which are implemented on
691+ ` &Tess ` . That allows calls like ` tess.view(..) ` , ` tess.view(..12) ` or ` tess.inst_view(3..=10, 1000) ` , for instance.
692+
676693## Textures
677694
678695Textures can be used in a write path (framebuffer) or read path (shader stage):
@@ -833,7 +850,13 @@ the `FnOnce`, will also provide a `RenderGate`, allowing to go down the tree onc
833850
834851### Render gates
835852
836- Render gates create a sharing node around ` RenderState ` , allowing to render using the same ` RenderState ` .
853+ Render gates create a sharing node around ` RenderState ` , allowing to render using the same ` RenderState ` . Once entered,
854+ they give access to tessellation gates.
855+
856+ ### Tessellation gates
857+
858+ Tessellation gates allow to render various ` Tess ` , for which the vertices types must be compatible with the shading gate
859+ vertex semantics. Tessellations are not rendered directly, but instead require passing via a ` TessView ` .
837860
838861## Queries
839862
0 commit comments