Question regarding multiple render passes #7
-
|
First of all, excellent library! It helped tremendously to simplify my rendering code. I do however have a question about best practice in certain case. In So this:
will mark input resource as readable - one used to read from, this: creates output resource and marks it as writeable, increments version by 1. How do you manage resource which will be written to in multiple passes? As a simple example let's say we wish to render scene using forward renderer -
In this case if we wish to render multiple times onto the exact same surface, if we use this:
framegraph will increment version by 1 each time we call If we do not use builder.write() but simply try and use the same render target pass will be culled, if for example particles pass doesn't have any inputs and is not marked with Is there any way to solve this? I'm probably missing something simple but can figure out what. Could be I'm just not using it correctly... |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
No. Whenever you call
Look at here. |
Beta Was this translation helpful? Give feedback.
No. Whenever you call
builder.write()you get a newFrameGraphResourcehandle with incremented version, but the underlying resource is the same as an input resource.Bumping the version enforces correct execution order.
Look at here.
And here you can find a simple pass that draws a skybox over a render target (after opaques deferred pass).