Deferred Engine Playground - download

I have consequently implemented the bloom shader into the engine

The pipeline is now almost completely 16bit, so we can make more calculations. Either way the way lighting is handled now I can have bloom pick up the right stuff very reliably.

I can also have materials that are much brighter than default and have them evoke bloom.
Even if the block is not casting light itself the bloom makes it look convincing already

1 Like

This just keeps getting better :heart_eyes:


I would like to avoid blooming in PointLights, coz it looks like foggy.

Please let me know how to do that and Is it possible to have directional Light as well with latest engine?

One more thing, Is SSAO working fine with last update, please clarify?


Point lights are not “blooming” but they can have fog around them if you want them to.

AddPointLight(position: new Vector3(66, 0, 40),
radius: 120,
color: Color.White,
intensity: 120,
castShadows: true,
shadowResolution: 1024,
staticShadow: false,
isVolumetric: true); <--------------------

You can disable this in general with g_VolumetricLights = false

Ssao is not working right now, should i make it work again?

Great! Thanks a lot :slight_smile:

The latest one gives me good framerate.


Can you please enable the SSAO, make it optional with GameSettings?

One more problem I found is, My models are looking quite faded, the colors are not attractive.

But the old engine was showing the colors properly with same models. Any idea?

In settings, I disabled

g_TemporalAntiAliasing = false;
g_EnvironmentMapping = false;
g_SSReflection = false;

Is that an issue for fading look?

the textures are treated differently now, you can change that only in shaders or by transforming your material with rgb^(1 / 2.2)

I’ve made a quick video of the current state of the engine.

1 Like

Hi @kosmonautgames, Thanks for the latest update with SSAO.

Please let me know, Do I need change it in DefferedCompose Shader?


Yes you would need to comment out
diffuseColor.rgb = pow(abs(diffuseColor.rgb), 2.2f);


base = pow(abs(base), 1 / 2.2f);

in postprocessing.fx

Keep in mind that light intensities and values are different, so you need to adjust those probably.

Thanks a lot!

It worked, I hope it will not side affect anything other than Light Intensity, Am I right?

no it shouldn’t, it’s just the lighting that is calculated differently

Great, Thanks! Now I am going to update it with your today’s version. :slight_smile:

Hi @kosmonautgames,

A request on enhancing the engines realistic look, Can we have a soft shadow for Indoor[Point Lights] lighting.

The existing shadow may look convincing with Directional Light, But I believe Soft- shadows will give a realistic look.

Normal Shadow:


Please let me know Is it possible?

In case if it can be integrated with your engine what part has to be changed?

I hope the changes with shadow map and just blurring the shadow will give the same result or do we need ray trace?

Looking forward to your reply!

Thanks and Regards,

I think i have some form of soft shadows already in the engine, let me check, i think they are just not enabled for point lights

When I switched to ViewSpace lighting i didn’t fully update the lights with all the shadowing options, I will do that once I find time, but I won’t be able to do that today.

Great! Thanks. Looking forward… :slight_smile:

Hi, can you help me wat’s wrong with my light buffer? i try to implement ur lighting algorithm and all the value is same with ur demo even the scale, but i just cant get it rite like urs shown 1st row in the picture. 2nd row is my depth, normal, light buffer.

it’s when i move the sphere radius is following the camera and cull out. note, farclip is 500 the value in ur demo.

From the picture it looks like maybe the size of the sphere geometry is smaller

i try to mark down the missing path with green color in the picture hope u can understand, the size of the sphere is actually the same as ur demo. i can see culling issue when i move camera.

and if i remove the calculation behind of this, i can see the entire sphere without cullout.

.Maybe you are using a different rasterizer state (e.g. CullClockwise instead of CCW?)

Sorry it’s really hard to make analysis with so little information.

If it’s not the issue above It could be an issue with how you read depth, since it seems related to distance Shader code and culling.

You can try to output the depth you read as output and see if it’s correct and you can output the depth for the culling distance to debug. The idea is pretty simple anyways.)

1 Like