Deferred Rendering and Particles

Started by
10 comments, last by Ashaman73 8 years, 2 months ago

What is the correct way to combine both textures so I can get the final scene with the correct depth?

Compose the G-buffer, render the forward-pass objects directly onto it. There is no “combining”.

The screen space lighting calculation was clearing the depth stencil view

Then stop doing that.

@Mona2000: How? The lights are calculated on screen space.

Perform forward and deferred lighting in the same space.


L. Spiro

I restore Nintendo 64 video-game OST’s into HD! https://www.youtube.com/channel/UCCtX_wedtZ5BoyQBXEhnVZw/playlists?view=1&sort=lad&flow=grid

Advertisement
> Compose the G-buffer, render the forward-pass objects directly onto it. There is no “combining”.

If you like to render the particles on a (downscaled) different resolution buffer, then you should render to a separate texture first, as long as DX11 doesnt support rendering to mutliple,different resoultion frame buffers (I'm not familiar with DX).

> What stops you from using the depth render target (or depth buffer) from the deferred pass?

Most likely different resolutions. Downsample the depth buffer (or the according part of your G-buffer) and read back the depth and use the depth in your shader for soft fading of particles near geometry.

> 1. Should I render the particles before or after tone mapping?

I get better result when excluding forward rendered (unlit) particles from tone mapping. As long as you don't lit your particles, you will have a hard time to get them integrated into your HDR for all cases, especially if you have lot of dark scenes.

> 2. Should I render the transparent meshes the same way as I'm rendering the particles now?

Depends, I prefer a stitches pattern for transparent surfaces and render them directly to the G-buffer to get proper lighting (see signature), but this will only work for some usecases. There's no real best solution for rendering a transparent surfaces with a deferred rendering approach.

This topic is closed to new replies.

Advertisement