Well. Sort of an upgrade at least.
It’s an upgrade to my deferred shading which puts it in view space. It also allows me to reconstruct the Z axis of the normal buffer in order to reduce the size of the GBuffer by one channel.
And that’s pretty much it.
So in other news I started experimenting on putting a Subsurface Scattering approximation technique into the engine pipeline which allows me to render light pass-through on organic objects such as vegetation or skin.
I’m in other words not sure whether this is worth having or not.
Surely it could make quite the visual difference in scenes that contain a lot of shrubbery or… Naked… Skin?
But none of those are exactly in focus for the engine right now.
The neat thing about it, I think, is that it’s integrated with the deferred shading so light pass-through works uniformly across the entire scene without need of any special behavior.
It wouldn’t see much use in a standard game, which is (I imagine) a big reason as to why it isn’t present in that many engines today, but it’s a pretty new technique for real-time rendering which is also part of the reason.
The approximated technique is essentially the same as proposed in this document which is pretty great and is pretty close to the ideas I’ve had in the past regarding real-time subsurface scattering.
My idea was less complicated and involved multiplying a scattered color (think orange/red for skin) with a dot product of the inverse light vector and surface normal, which effectively makes the pixels shine when the light is situated behind them. As you may gather this is just an additional N•L(N•-L to be precise) for the light shader and is very, very simple.
“My” approach still works for some cases, but the technique proposed by Dice emulates the light source visible through the surface too, not just the pass-through itself. It also emulates how much the surface scatters the light as it’s passing through and a lot of other neat things.
I think in the end I’ll make this a completely optional thing, just so that we won’t force games that don’t need it to still render it.
There’s another thing I’ve been thinking about, but don’t know if it would make much sense in the bigger picture.
I was thinking of letting ambient occlusion be automatically adjusted to the contrast of the scene’s lighting, so you’d get a very slight ambient occlusion term when your ambient values are high and a darker ambient occlusion when the ambient is low.
I’m not sure of all the possibilities of this yet, but I think it could be interesting in games where the ambient values range enough for people to notice.
It could eliminate one of the few gripes I have with ambient occlusion terms baked into the diffuse texture. My problem with it is that in some situations it over-darkens things.
You could even go as far as to let the ambient occlusion term be modulated by the scene ambient itself.
I’ll test things out and write some more junk on here if it proves to be somehow interesting. 🙂