#Raytracing + Imgui

26 messages · Page 1 of 1 (latest)

plucky stump
#

Hey can someone point me in the right direction on how to use ImGui along side a raytracing pipeline.

So I have a raytracing renderer which init Vulkan and all the stuff for the raytracing to work, but now I would like to have Imgui too to display my UIs, but Imgui require a render pass that i dont have since I'm using a raytracing pipeline, so I tried to create a dummy one but it keep crashing.
Do I need two pipeline ? how does that work exactly ?

Thanks for your help 🙂

rigid prairie
#

you don't need a "dummy" renderpass, you need an actual renderpass

#

and yes you need multiple pipelines

plucky stump
rigid prairie
#

you don't need multiple command buffers, that's unrelated to this

plucky stump
#

So how do I send the command to render the UI ?

#

I need to bind the pipeline right ?

rigid prairie
#

you have a few scenarios to pick:

  • you render your RT workflow to a offscreen image
    you do your UI renderpass and draw your RT image as a fullscreen texture
  • you render your RT workflow to the swapchain
    you do your UI renderpass with load op load
rigid prairie
plucky stump
#

Euh.. I'm pretty new 😄 But I bind a lot a thing to my command buffer, and I would assume that binding two pipeline would mess with my RT workflow

rigid prairie
#

they're sequential, as in they affect what comes after

storm basalt
plucky stump
#

My goal would be to have my Imgui UI containing a viewport where my RT frame will be drawned into

storm basalt
#

they do that exact thing in the tutorial I linked

rigid prairie
plucky stump
storm basalt
#

any of them but the _simple one is the simplest

plucky stump
storm basalt
#

I'd also recommend going on the tutorial page itself here

#

it's sort of a series, and lots of these apps build on what the previous apps established

plucky stump
storm basalt
#

no?

#

they have a rasterization fallback but you can just ignore that and imagine it doesn't exist

plucky stump
#

(also they're using nvvk, which make it quite more difficult to understand what's going on)

#

Oki I'll look more deeper

rigid prairie
#

the main thing you need to do is render to a offscreen texture
then you can follow any tutorial on how to draw a image with your UI toolkit of choice