# Why does Rendering Reflection + Refraction take much longer than Rendering them Separately?

In Blender Internal, to simulate glass properly, you have to enable Glossy, (Mirror) and Refraction. (Raytraced Transparency)

However, rather than taking length of reflection only render + length of refraction only render (In this low resolution case, 00:03.33)
it takes much longer:

Material settings:

What is the technical reason for this? How might I render reflection + refraction faster? (maybe some technique of rendering separately and recombining?)

• ether its coded different so its not the same 2 codes that make the other shades or if it needs to blend the shaders then the computer needs more time to buffer the image but im not sure if that's what you asked sorry maby one of the programers should answer – user1005 Jul 26 '13 at 6:29
• Not sure this is a really useful question, Someone can always profile the code and answer the question - but I'm not sure the answer will really help users? – ideasman42 Jul 27 '13 at 3:45
• @ideasman42 I was just wondering mainly as Cycles rendering Glossy + Refraction is not much slower than just refraction.. (though I suppose the techniques are so different that maybe that's not a factor.) – gandalf3 Jul 27 '13 at 21:40

## 1 Answer

Enabling both reflection and refraction enables new light paths that are not rendered when only one of them is enabled. Instead of just reflection + reflection or refraction + refraction it now also has to render reflection + refraction and refraction + reflection.

Further, at each depth Blender will trace both a reflection and a refraction ray, which can make the number of rays to trace go up quickly. For ray depth 1, 2, 3, 4, .. you get 2, 4, 8, 16, .. rays.

Cycles on the other hand will randomly pick between tracing either a reflection or a refraction ray on each bounce. This avoids the quick increase in number of rays for a single sample, but it also means each individual sample contains more noise.