
Building on my last Ambient Occlusion shader, I'm now implementing a mixture of three things:
1. SSDO -- Screen-Space Directional Occlusion. This is an extension on SSAO that uses the same basic infrastructure. The difference is that SSAO does not check lights to compute occlusion; but SSDO does. In other words. SSAO looks like this, no matter where the light is coming from:
With the SSDO shader I'm working on, the occlusion is now sensitive to the light source, so it looks like this:
or like this:
Depending on where the light is coming from. SSDO includes one light bounce (which I'm not showing here, will post more pics later) -- in other words, diffuse inter-reflection. The effect is a little subtle; but it can be noticed. Note also that the shader is generating "contact shadows" (small shadows that happen when two surfaces are in contact to each other). Although, technically, the contact shadows are happening because I'm also adding...
2. Bent Normals: this is the average unoccluded direction when computing SSAO. Using this normal to compute lighting tends to produce an effect that is closer to GI and also creates the shadows I've described; and finally, I'm also adding the following (since I'm here):
3. Normal Mapping. However, this isn't the regular normal mapping we find in other games. I'm approximating the normal map from the derivative of the luminosity value of the texture being rendered. But it does provide the illusion of relief and it responds to changes in illumination, so... probably as good as it's going to get without actually generating normal maps for each model.
As usual, there are a number of technical details that I have to fix: I don't have access to the smooth normals from the game (Jeremy has tried to explain to me how to do it; but I'm not yet smart enough to understand him), so some of the shadows look a bit faceted; there's some noise in certain areas; and we have the same limitations we had for SSAO: the effect disappears around the edges of the screen, etc. However, I think it still looks good enough in spite of these details. I'll post more pictures later...