Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add vertex buffer layout to Mesh #3120

Closed

Commits on Jan 4, 2022

  1. Add dynamic vertex buffer layouts to resolve sorting issues

    - Vertex buffer layouts are set on `Mesh` for shader specialization.
      `Mesh` knows how to specialize its own vertex buffer because it owns
      the vertex data.
    - The `RenderAsset` implementation for `Mesh` caches the vertex buffer
      layout and adds a cache key to the `GpuMesh` render asset. The
      `MeshPipeline` can lookup the vertex buffer layout by composing
      `VertexLayoutKey` within `MeshPipelineKey`.
    - `SpritePipeline` and `UiPipeline` populates the vertex layout cache
      for themselves..
    - `SpecializedPipeline::specialize` now takes a reference to the
      `RenderPipelineCache`, which is the best way I could find to get a
      reference to the cache for vertex layout lookups.
    - Discussion: https://discord.com/channels/691052431525675048/743663924229963868/908484759833960489
    parasyte committed Jan 4, 2022
    Configuration menu
    Copy the full SHA
    a159f2d View commit details
    Browse the repository at this point in the history

Commits on Jan 10, 2022

  1. Apply suggestions from code review

    Co-authored-by: Nicola Papale <nicopap@users.noreply.github.com>
    parasyte and nicopap committed Jan 10, 2022
    Configuration menu
    Copy the full SHA
    eb58387 View commit details
    Browse the repository at this point in the history