Deferred Engine Playground - download

i have no idea, i haven’t looked at proper implementations, just what I thought of myself.

I think the only things that are “stolen” from tutorials are softPCF algorithms, but I’m working on some of my own right now as I am trying to optimize bias

I think for sampling with texCube, you don’t need a normalized vector. But I’m not sure, since it has been a while since experimenting with it. A normalization though should not change anything regarding the sampling. For the diffuse and specular calculation I think a normalization makes sense.

how to rendering partial transparent obj and sort properly? bcoz i try when forward render with the deferredComposite, my obj is always render overlay on infornt of the object.

Reconstruct depth before (on the rt that you draw to)

thanks, but light pre-pass demo render twice 2 for opaqe material. G-buffer = > reconstruct shading , it actually consume alot of fps.

If you use prepass you can reconstruct depth anyways for the second pass and use Depthcomparison Equal, if you have high enough precision.

But reconstructing depth alone shouldn’t be super expensive, it’s cheaper in the long run than to compare each pixel against the depth map.

Anyways this thread is not about random questions, make a new thread for that

Sry for that, i tot this thread is related to deferred rendering and somemore your r more expert on this area.

Hi @kosmonautgames, Is it possible to add HDR Rendering and SoftShadow implementation into this Engine.

If it is then please let me know where to begin?


HDR rendering is more or less in, with the latest commit there is a tonemapping operation in the postprocess.fx

Soft shadows are in for directional lights as far as I’m aware, but they have some artifacts due to the way monogame breaks the texture samplers, that’s why I didn’t feel encouraged to make them available for point lights, too.

If you want point light soft shadows you would have to change up the deferredpointlight.fx

here is the article to improve the point light soft shadow, hope it help :slight_smile:!Advanced-Lighting/Shadows/Point-Shadows

funny you should mention that because i implemented exactly those half an hour or so ago.

Check out the newest version on git

1 Like

xD i just found this article…

I’ve improved the editor experience quite a bit.
The rotation now works correctly (as it should) when pressing r. Plus the selection and outlining is better.

I have added tools to easily manipulate lights in realtime, too. And you can drag around the environment probe like you can a light.

I’ve also added optional blur on the Screen Space Reflections and added a some tone map operators for post processing.


Nice progress! :slight_smile:

Wish those things would also work that good in my renderer :sweat_smile:

Hi @kosmonautgames, I have downloaded the latest version and tested it, This is so good and Thanks.

1 Like

@11110, Thanks for sharing.

I’ve added a slider for “shadow softness” to have nice soft shadows. (There are some seam artifacts at the edges of the cubemap, but I’ll fix them at some point)

This can create very very soft shadows at a high expense, but sometimes one just cares about quality.

For that I made some crazy changes where I manually generate a texture atlas instead of a texture cube and made custom sampling shader code (not done for all directions yet).


is the directional light work?

is the directional light work?


nice, i saw there is unused spotlight shader in ur project. does it work as will?