I have a Shadertoy which renders the image below using ray tracing.

I'd like to add caustics, but am aware that in general they are a hard solution, especially without bidirectional ray tracing or photon mapping.

Does anyone know if there is a way to analytically calculate caustics, or at least some of the caustics (or plausible caustic effects) in a situation like this?

There is refraction going on here, not just transparency, in case that makes a difference.

enter image description here

  • $\begingroup$ Just thinking out loud, it may be possible to use some equations for spherical lenses and treat it like calculating defocus blur. The caustic brightness would go like $1/r^2$ of the circle of confusion, or something like that. $\endgroup$ Jan 12, 2017 at 22:04
  • $\begingroup$ That sounds really promising. I like how that seems like it could be exact for spheres, whereas the answer about using surface normal and refractive index would be decent approximations for general shapes. $\endgroup$
    – Alan Wolfe
    Jan 12, 2017 at 22:40

1 Answer 1


You might find this paper useful—its authors describe a way to make reasonably plausible caustic effects just by modulating their shadows with the surface normal and refractive index. It won’t get you the more complex/interesting hot-spot shapes that you’d get with photon mapping, but it could work well depending on your scene.

sample fake caustics

To extend stochastic shadow maps to mimic caustics, we decrease shadowing where light strikes a transmissive surface at normal incidence. We increase shadowing where the refractor is at a glancing angle and thus has a low Fresnel transmission factor. Specifically, during shadow map rendering, we increase ρ(λ) where the magnitude of the dot product of the surface normal nˆ and the vector to the light ωˆi is close to 1, and decrease ρ(λ) where the dot product is close to zero. We also increase this effect with the relative refractive index η.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.