Game Development Community

Basic Lighting and Post Effects

by Lewis Bibby · in Torque 3D Professional · 06/19/2011 (1:31 pm) · 4 replies

I have a quick question regarding basic lighting. I'm not 100% on how it works but I noticed that using Basic Lighting turns off my depth of field and SSAO. For me the perfect solution to my game is to use Basic Lighting and also have these post effects on. Is it possible to have the post effects on whilst using basic lighting or is basic lighting simply not compatible with shader effects like that?

#1
06/19/2011 (3:04 pm)
I don't believe basic is compatible with fancy fx shaders and the sort.

If you want a world without dynamic shadows but wants shaders, disable shadows in all of the "lighting quality" settings in core/scripts/client/defaults.cs - it'll give you a pretty big fps win in Advanced Lighting.
#2
06/19/2011 (4:44 pm)
That was exactly what I needed, Thank you. It would be good though if there was some way I could have just the player cast a shadow as well as it'd be easier for player to guage where they will land. Even a fake shadow would work like having the player have a moving decal below him.

Any ideas on how I could achieve this?
#3
06/19/2011 (4:56 pm)
There are projected decal shadows for BL, you could slip that code into the AL.
#4
06/20/2011 (10:37 am)
SSAO requires a linear depth texture that is only generated in AL mode. It also generates an AO mask that is only used by the Advanced Lighting light shaders. You'd need to change the BL shaders significantly to make them use it.

And I'd argue that SSAO is far too much for whatever GPU you're trying to target using Basic Lighting. It's an effect that does several scattered samplings of high-precision textures - the kind of stuff integrated GPUs are terrible at.

The AL sun and scattersky can make Players cast a decal shadow. Check the datablocks in FPS example to see how it's done.