• Advertisement
Sign in to follow this  

Coherent Rays

Recommended Posts

Hi,

I came across this term called Coherent Rays. Not sure if it is about co-planer rays or parallel rays related to 3d computer graphics. Is it just a some case specific form of pattern of rays.  Both 3d and 2d meaning.

reply,

Pyro.

Share this post


Link to post
Share on other sites
Advertisement

Coherency basically means "are they going to hit the same object". Incoherent rays will travel to different destinations in the scene. Coherent rays will all collide with the same objects.

This is important for ray-tracers implemented using SIMD (SSE/AVX/etc on the CPU, or any modern GPU), because incoherent branching (e.g. if statements) has a large cost on SIMD architectures.

Share this post


Link to post
Share on other sites

I'll add that the performance of ray tracing strongly depends on whether the rays are coherent (e.g. camera rays) or incoherent (shadow rays). Coherent rays are faster because the same BVH nodes are traversed each time, and are more likely to be in cache. There are usually different ray tracing/BVH traversal algorithms used for coherent or incoherent rays. (e.g. intersect 4 coherent rays vs. 1 BVH / intersect 1 ray vs. 4 BVH).

Share this post


Link to post
Share on other sites

I'd add that "coherent rays" are just closer to parallel to each other, and "incoherent rays" are just less close to parallel. A 1d graph if you will with "rays" being fully parallel and in the same direction or "coherent" on one end and fully perpendicular/firing in opposite directions/etc. or "incoherent" at the other end. 

Edited by Frenetic Pony

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

  • Advertisement