Soft shadows demo

Spherical harmonics is rather different than this idea. Spherical harmonics are a way of encoding direction with just a few numbers. One could use spherical harmonics for anisotropic lighting, or for directional lighting, or a number of other different things.
 
DeathKnight said:
It must have been a fluke. For some reason it happened only the first time I ran it. Now the framerate is fluctuating like it should. 37fps is 75Hz divided by two (roughly), but I see no real reason why that would happen when v-sync is enabled. If the framerate is below the refresh it should still fluctuate.

Anyway, great demo Humus (as usual). Keep 'em coming :)

IIRC, it doesn't Either you hit the refresh rate and get 75FPS, or you fall short and get half the refresh rate, 37FPS. It would fluctuate normally if you had triple buffering enabled in addition to V-Sync.
 
Humus said:
Yet another demo. :)
This time it's dynamic soft shadows implemented by interpolating between a set of lightmaps.

Actually, could someone explain what this means? Lightmaps are precalculated lighting for a scene?
 
Alright, this demo makes use of 16 precalculated lightmaps. But if it just skipped from lightmap to lightmap you would notice it seems very jumpy (heh I know I disabled the lerping between lightmaps to see how fluid it looked with just 16 without it). By interpolating between the lightmaps he is able to get a good match for what would be inbetween assuming the light displacement between the two maps isn't too far (how far too far will depend on how close objects are also to the light casting shadows, if they are farther away then you need less and if closer need more since the shadows will move faster as a result).
 
Humus said:
I would say they are pretty much exactly as soft as they should be. I sample 400 light positions within a light sphere that's the exact same size as the light I draw.
Actually, it may be that the interpolation increases the apparent softness of the lightmap.
 
Quitch said:
Actually, could someone explain what this means? Lightmaps are precalculated lighting for a scene?

Yes.
This is an example how a lightmap may look like:
lightmap.png


Each rectangle you see is mapped onto a polygon somewhere in the scene. For instance in the upper left corner you can see the rectangle that maps onto the ceiling.
 
Chalnoth said:
Humus said:
I would say they are pretty much exactly as soft as they should be. I sample 400 light positions within a light sphere that's the exact same size as the light I draw.
Actually, it may be that the interpolation increases the apparent softness of the lightmap.

Looks like you hit upon whats causing some of the softness I thought I was seeing. Just quickly checked with just having one lightmap and its definately looks slightly crisper. Makes sense since if you interpolate between 2 shadow maps that the soft shadows grow wider (the more shadow maps though I would expect the increase in softness on lerping would be less). But interesting thing to note is your eye doesn't really notice the soft shadows waxing and waning in size as it goes from inbetween shadow maps to being just one shadow map.
 
london-boy said:
What are the NV drivers that support GLSL? For my 5900U... Can't remember...
The 61.xx drivers support it for the 6800, at least. Prior drivers support GLSL with a registry switch.
 
Back
Top