Original Post
Hi all- I've been implementing basic VSM lately, but I'm having a hard time with the classic light bleeding problem. The main problem is that the light bleeds VERY strongly. Using p_max = linstep(min,max,p_max) from this thread, I have to set min to 0.8 (even 0.9 in cases) to get rid of the bleeding, which, predictably, has undesirable results. I'm just trying to figure out why the bleed is so strong in my implementation. It's nowhere near as bad in the 1-30-07 VSM demo, for example, so the linstep works well. The immediate idea is probably that I have one occluder near the light, then other occluders and receivers far away from the light but near each other. This is really not the case, though. The light is supposed to be the sun, so it's far away from everything. It may be intersting to note that the bleed tends to be very strong close to the second occluder, and weakens as the distance from the occluder increases. Has anyone seen this before or any ideas what I might be doing wrong? Some details that may be relevant: -Map format is currently G32R32F. 16 bit formats were basically unusable. -GPU is a Radeon X1900. -I'm doing a bilinear filter in the pixel shader, as well as a single-pass guassian on the map. I've tried with only one of these at a time, and the bleed behavior is the same with either. -I'm using a tiny vsm_epsilon as a minimum variance. -I switched to a linear depth metric: distance(world_position, light_position) * (1.0 / (far_clip - near_clip)) Any suggestions would be welcome. :)