1
$\begingroup$

Currently I have a basic (OpenGL 3.3) rendering scheme using a simple depth vertex shader to generate shadow maps for a scene. I don't care about having a large number of lights in the scene so it is fine to do individual render passes to generate each shadow map.

What I want to do:

My concern is that I want (or indeed NEED) to render the same scene geometry from many different camera transforms (over 500x) and it is very resource intensive to do one render pass per transform. Besides, reading pixels from the device is slow, so I would rather prefer to draw and fetch as many of these camera renders per call as the hardware allows. The current rendering pass uses a standard Phong vertex->fragment pipeline that relies on the computed shadow maps.

What have I found:

Despite all the parallel computing capabilities of GPU devices, I find the OpenGL API regarding shader pipelines somewhat abstruse. I found something called instanced rendering, which seems like should be the correct way to implement what I want, except I haven't found a decent example of how instanced rendering should work when rendering different fragments to different layers of a framebuffer.

Btw I also think that a layered framebuffer is the way for doing multiple renders at once, but not sure if this is accurate or current

What would help me:

If perhaps this use case requires more recent OpenGL versions, or perhaps another framework (Vulkan?) this would also be an acceptable answer, as long as some details or examples are provided that I can use to build on

$\endgroup$

1 Answer 1

1
$\begingroup$

You might look into "mulitview" it is fairly straight forward to setup and use. It does have limits on the number of views that can be rendered at the same time. Most examples are geared toward VR but it has obvious uses for a wide range of other situations like rendering cube maps. This would still mean multiple render passes but could get the number well under a hundred. It is supported on both Vulkan and OpenGL.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.