2 ms·
Obviously a hardware accelerated implementation would be ideal if not required, which is why I was going to first implement this in a shader, if possible. The
by JasonSage 14y ago
Obviously a hardware accelerated implementation would be ideal if not required, which is why I was going to first implement this in a shader, if possible.
The artifacts you mention are sort-of inherent in shadow maps, and depend on the resolution of shadow map you are working with. The demonstration I did had a lot of error, but you can see at the bottom some examples of higher resolution test cases which have significantly less error.
- kevingadd 14y agoIf you use a raycasting method, you can rasterize a shadow map with exactly the amount of precision you need and not have any artifacts (for 2d, of course - for 3d the necessary amount of precision is hard to calculate and sometimes prohibitive). My old game Chimaera ( http://www.luminance.org/chimaera.html http://www.luminance.org/chimaera.html ) did this - lightmap rendered at full screen resolution (1-1 mapping) in full precision, with an on-demand raycasting solution for offscreen pixels. A raycasting method also allows you to cache the shadow data for static geometry and static light sources, which can be a big win for complex scenes. (I think maybe you could cache the polar data, but it wouldn't be as easy since you can't just translate by x&y like you can with a normal 2D perspective?)
- JasonSage 14y agoFor line of sight you couldn't cache, no, but for static lighting you certainly could.