Implement a Render Graph #16

Merged
SeanOMik merged 20 commits from feature/render-graph into main 2024-06-15 18:54:47 -04:00
Owner

This is a PR that would resolve #15

Here's a list of tasks:

  • Collecting passes and their requirements
  • Create resources that passes require
  • Pass execution order
  • Executing passes

The tasks will likely need to be expanded on later. This list may or may not be up to date.

This is a PR that would resolve #15 Here's a list of tasks: - [x] Collecting passes and their requirements - [ ] Create resources that passes require - [x] Pass execution order - [x] Executing passes The tasks will likely need to be expanded on later. This list may or may not be up to date.
SeanOMik added 1 commit 2024-04-28 17:55:10 -04:00
SeanOMik added 1 commit 2024-05-04 10:02:04 -04:00
SeanOMik added 1 commit 2024-05-08 18:24:16 -04:00
SeanOMik added 1 commit 2024-05-08 18:26:09 -04:00
ci/woodpecker/pr/debug Pipeline failed Details
ci/woodpecker/pr/release Pipeline failed Details
bccf6287c0
render: get first image from RenderGraph, just a simple hard coded triangle
Author
Owner

I was able to get a super simple pass in the render graph working!
image
This triangle is hard coded in the shader though, the shader was taken from learn-wgpu. Yes, the renderer has gone all the way back to drawing a triangle lmao.

I was able to get a super simple pass in the render graph working! ![image](/attachments/f5a16cd9-df88-4379-92c7-25f186226172) This triangle is hard coded in the shader though, the shader was taken from [learn-wgpu](https://sotrh.github.io/learn-wgpu/beginner/tutorial3-pipeline/). Yes, the renderer has gone all the way back to drawing a triangle lmao.
SeanOMik added 1 commit 2024-05-11 09:19:22 -04:00
ci/woodpecker/pr/debug Pipeline failed Details
ci/woodpecker/pr/release Pipeline failed Details
b94a8e3cd3
Make it possible to create a complete pipeline descriptor for a pass
SeanOMik added 1 commit 2024-05-14 18:45:36 -04:00
ci/woodpecker/pr/debug Pipeline failed Details
ci/woodpecker/pr/release Pipeline failed Details
cee6e44d61
render: support creating bindgroups for passes and updating buffers every frame
Author
Owner

Its now possible to create a gpu buffer, put it in a bind group, update the buffer every frame, and use that bind group in the pipeline. Here's a simple demo updating a uniform buffer

Its now possible to create a gpu buffer, put it in a bind group, update the buffer every frame, and use that bind group in the pipeline. Here's a simple demo updating a uniform buffer
SeanOMik added 1 commit 2024-05-17 17:42:44 -04:00
ci/woodpecker/pr/debug Pipeline failed Details
ci/woodpecker/pr/release Pipeline failed Details
64e6e4a942
render: make it easier to share bind groups and bind group layouts between passes
SeanOMik added 1 commit 2024-05-18 11:01:00 -04:00
ci/woodpecker/pr/debug Pipeline failed Details
ci/woodpecker/pr/release Pipeline failed Details
8c3446389c
render: code cleanup
SeanOMik added 1 commit 2024-05-19 12:54:55 -04:00
ci/woodpecker/pr/debug Pipeline failed Details
ci/woodpecker/pr/release Pipeline failed Details
fc57777a45
render: move render targets to be graph slots, create present passes and base passes
Since the render graph no longer has default slots, base passes must be created that supply things like render targets. This also makes it easier to render offscreen to some other surface that is not the window, or just some other texture
SeanOMik added 3 commits 2024-05-31 21:07:37 -04:00
Author
Owner

I FINALLY got meshes rendering again!!

image of rendered cube

This is using the render graph of course, but the code is super messy. A large portion of the mesh rendering code is shoved in a single pass called MeshPass.

What's left to be done:

  • Look into splitting up MeshPass a bit
  • Instead of using strings to label passes, make a trait that label types can implement.
    • Create a proc-macro to implement the trait for enums (maybe also structs?)
  • Change the name of RenderGraphPass to RenderGraphNode
    • Move other structs to names that are more "node-centric" and less "pass-centric." Not every node in a graph renders or computes something on the gpu, some just update buffers or prepare data for other nodes.
I FINALLY got meshes rendering again!! ![image of rendered cube](/attachments/2a5496d5-7e3b-41ce-a4fb-743d97fbf7c4) This is using the render graph of course, but the code is super messy. A large portion of the mesh rendering code is shoved in a single pass called [`MeshPass`](https://git.seanomik.net/SeanOMik/lyra-engine/src/branch/feature/render-graph/lyra-game/src/render/graph/passes/meshes.rs). What's left to be done: - [x] Look into splitting up [`MeshPass`](https://git.seanomik.net/SeanOMik/lyra-engine/src/branch/feature/render-graph/lyra-game/src/render/graph/passes/meshes.rs) a bit - [x] Instead of using strings to label passes, make a trait that label types can implement. - [x] Create a proc-macro to implement the trait for enums (maybe also structs?) - [x] Change the name of `RenderGraphPass` to `RenderGraphNode` - [x] Move other structs to names that are more "node-centric" and less "pass-centric." Not every node in a graph renders or computes something on the gpu, some just update buffers or prepare data for other nodes.
SeanOMik added 3 commits 2024-06-02 21:36:20 -04:00
Author
Owner

The MeshPass wont be split up. Although there's a lot in it, it does all relate to rendering meshes.

I finished implementing a RenderGraphLabel trait as well as a proc macro for implementing it. The labels are used everywhere a string was used, so render graph nodes, node slots, and bind group names.

It's slightly annoying to use them when specifing the bind groups in a PassDesc since you have to provide a borro, but everywhere else it's great.

The `MeshPass` wont be split up. Although there's a lot in it, it does all relate to rendering meshes. I finished implementing a `RenderGraphLabel` trait as well as a proc macro for implementing it. The labels are used everywhere a string was used, so render graph nodes, node slots, and bind group names. It's slightly annoying to use them when specifing the bind groups in a PassDesc since you have to provide a borro, but everywhere else it's great.
SeanOMik added 3 commits 2024-06-11 21:00:03 -04:00
28b9604189
render: rename RenderGraphPass to Node to better represent what it actually is in the RenderGraph
A node wont always render or compute, so it wouldn't actually be a pass. Calling it a node is a better representation of what it actually is
ci/woodpecker/pr/debug Pipeline failed Details
ci/woodpecker/pr/release Pipeline failed Details
6d7932f6a5
render: remove IDs for everything, use only labels to identify things
SeanOMik changed title from WIP: Implement a Render Graph to Implement a Render Graph 2024-06-12 21:23:42 -04:00
SeanOMik added 1 commit 2024-06-12 21:23:43 -04:00
ci/woodpecker/pr/debug Pipeline failed Details
ci/woodpecker/pr/release Pipeline failed Details
9ce79e6b29
resource: fix tests, render: remove warning
SeanOMik added 1 commit 2024-06-12 21:30:16 -04:00
ci/woodpecker/pr/debug Pipeline failed Details
ci/woodpecker/pr/release Pipeline failed Details
d5348ec172
render: a tiny bit of code cleanup
Author
Owner

The render graph is finally good enough for a first pass. In the last few commits, I completed the TODOs of the other comment, and removed IDs from nodes, bind groups, slots, anything that was using it and replaced it with labels. Labels were being used anyway, I just had to delete the ids and reorganize some fields a bit.

The render graph is finally good enough for a first pass. In the last few commits, I completed the TODOs of the [other comment](https://git.seanomik.net/SeanOMik/lyra-engine/pulls/16#issuecomment-2045), and removed IDs from nodes, bind groups, slots, anything that was using it and replaced it with labels. Labels were being used anyway, I just had to delete the ids and reorganize some fields a bit.
SeanOMik merged commit acb58a15ff into main 2024-06-15 18:54:47 -04:00
SeanOMik deleted branch feature/render-graph 2024-06-15 18:54:48 -04:00
Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: SeanOMik/lyra-engine#16
No description provided.