Implement a Render Graph #16

Merged
SeanOMik merged 20 commits from feature/render-graph into main 2024-06-15 22:54:47 +00: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 21:55:10 +00:00
SeanOMik added 1 commit 2024-05-04 14:02:04 +00:00
SeanOMik added 1 commit 2024-05-08 22:24:16 +00:00
SeanOMik added 1 commit 2024-05-08 22:26:09 +00: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 13:19:22 +00: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 22:45:36 +00: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 21:42:44 +00: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 15:01:00 +00: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 16:54:55 +00: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-06-01 01:07:37 +00: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-03 01:36:20 +00: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-12 01:00:03 +00: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-13 01:23:42 +00:00
SeanOMik added 1 commit 2024-06-13 01:23:43 +00: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-13 01:30:16 +00: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 22:54:47 +00:00
SeanOMik deleted branch feature/render-graph 2024-06-15 22:54:48 +00: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.