Deferred Rendering Project WT EngineMG

I have added an post processing effect, similar to the scene fringe effect described here: https://docs.unrealengine.com/latest/INT/Engine/Rendering/PostProcessEffects/SceneFringe/


In principle soft gpu particles are also working. The difference is, that for soft particles the scene depth and particle depth are used to calculate how transparent the particle should be.
The problem is the lack of precision of the depth buffer. So if the camera is at a greater distance from the particles, the depth values are calculated to be the same, so the particles fade out.
At the moment I encode the depth value after perspective z over w divide in the rgb channels of a texture. If anybody has an idea about what to do about the depth precision problem, I would be happy to know :slight_smile:
For the implementation of the gpu particles, I used the old XNA sample. Here are some images for comparison of gpu and soft gpu particles.

Great work!

are you using a linear depth buffer? I think z/w might not be good enough

Thank you!

I use z/w encoded to 24 bits of a RenderTarget at the moment. I think I need more precision for the depth.

The depth written to the depth RenderTarget of the GBuffer is now linear. This is what the RenderTarget looks like.

A small update, the CubeMapPointLights seem to work again.

At the moment not much to show so I thought it may be interesting what it looked like when I experimented with dual paraboloid shadow mapping and the driver had an issue :slight_smile:

The linear depth visualized as greyscale image looks like this:

The dual paraboloid shadow mapping point lights are working again.

Next thing I want to do is update some more shaders, so they work also with the linear depth. This should be straightforward, since I updated already some shaders.
After that I want to update the particle shader. With the better distributed depth precision it should now be possible to make soft particles work with all camera distances (I had the issue that particles would disappear when the camera is not close to the particles).

In the last three posts the first image shows normal particles and the second shows soft particles respectively. So as a conclusion, the disappearing soft particles with greater camera distances came from the depth not having enough precision.

I’m happy now with the visual result of the particles, looks very nice :slight_smile:

I’m thinking now abut trying out different fade functions. At the moment I use the scaled depth difference. This value is then multiplied with the final particle color.
If somebody has a helpful link or can recommend a function, please let me know :wink:

2 Likes

Here is an image with screen space ambient occlusion (SSAO). It gives the scene a bit more atmosphere :slight_smile:

1 Like

For comparison to the last image, no SSAO this time but a point light:

Here is an older screenshot of the particles:

Tomorrow after a long time, I think i will find some time to work a little bit on the renderer. Looking forward to it :slight_smile:

Also started to use the #monogame tag on twitter.

what ssao do you use

I think it was this article from gamedev, where I took the original code from. But it has been quite some time so I don’t remember exactly.

https://www.gamedev.net/resources/_/technical/graphics-programming-and-theory/a-simple-and-practical-approach-to-ssao-r2753