Followers 0

# Deferred SSDO

## 5 posts in this topic

Thanks for the info. SH is just used to reconstruct occlusion function. The dot product between occlusion function and light vector is to calculate dirrectional occlusion from the light. Makes sense now,

0

##### Share on other sites

I had the same idea some time ago as well, but actually there's no need to encode the screen spaced approximated visibility function into SH basis. They do it because they need to pass over the function from one pass to the other (DSSDO -> Lighting).

It would be way better, if you just sampled the screen space along the direction of the light and lerp the lights color with the occluders color based on how sure the algorithm is, that the occluder is actually occluding the light. This way there's no need for any spherical harmonics, as you have the full screen space approximated visibility function (technically it's more than just a visibility function, as you can get chromatic information) and you can use that and put it into your rendering equation.

0

##### Share on other sites
float3 diff = centerPosition - samplePosition;
float3 dir = diff * rsqrt(dot(diff,diff));
float ssdo = dot(dir, u_lightDirection);
ssdo = ambientOcculusionValueForThisSample * step(ssdoTreshold, ssdo);


My ssdo method for sunlight try to reuse ao samples. Sample position and direction is computed for ao sample already so only thing I have to  do is dot against light direction and weight it. SSAO is bandwith limited so this is almost free and hide VSM shadow leaking almost completely.

2

## Create an account

Register a new account