<p>You could try to optimize the calculation by first casting a smaller number of "feeler rays" (say 32) to check for penumbra, and cast the remaining rays if the result is in penumbra according to the rays. Of course this can give you false negatives, but you could then try to improve the heuristics by checking the results of nearby feeler rays.</p>

CC BY-SA 3.0
2017-02-23T13:32:29.873Z
2017-02-23T13:32:29.873Z
JarkkoL
<p>My light mapper can generate soft shadows just fine - for each texel I cast a ray to the light, offset by some distribution of the 'area' of the light on disc. The problem is that I am casting many rays and that slows down production. I note that even for texels completely in shadow, I still cast 128 rays towards the light, but none of them hit it. This seems like a waste of effort. I imagine I could try to intersect a cone with the scene to reject cases when the texel is so deeply in shadow that multiple rays would be ineffective, but I currently only have a ray-tracer at my disposal, so before I go on I wanted to know if anyone has any good ideas. How can I accelerate the calculation of soft-shadows on the CPU?</p>

<raytracing><lighting><sampling>
Acceleration techniques for CPU soft-shadow calculation in light mapper
Steven
# Acceleration techniques for CPU soft-shadow calculation in light mapper

(Asked by: username_0 on 2017-02-22)

My light mapper can generate soft shadows just fine - for each texel I cast a ray to the light, offset by some distribution of the 'area' of the light on disc. The problem is that I am casting many rays and that slows down production. I note that even for texels completely in shadow, I still cast 128 rays towards the light, but none of them hit it. This seems like a waste of effort. I imagine I could try to intersect a cone with the scene to reject cases when the texel is so deeply in shadow that multiple rays would be ineffective, but I currently only have a ray-tracer at my disposal, so before I go on I wanted to know if anyone has any good ideas. How can I accelerate the calculation of soft-shadows on the CPU?

**Tags:** raytracing, lighting, sampling


---

## 1 answers

### Answer by username_1 on 2017-02-23. Score: 2

You could try to optimize the calculation by first casting a smaller number of "feeler rays" (say 32) to check for penumbra, and cast the remaining rays if the result is in penumbra according to the rays. Of course this can give you false negatives, but you could then try to improve the heuristics by checking the results of nearby feeler rays.


---

