<p><em>Disclosure: I work for <a href="https://stackoverflow.com/jobs/companies/imagination-technologies">IMG/PowerVR</a></em></p>

<p>Indeed there are rendering systems that can do this: Imagination demonstrated hybrid rendering on their "Wizard" <a href="https://www.imgtec.com/blog/imagination-technologies-the-ray-tracing-pioneers/" rel="nofollow noreferrer">Ray Tracing/Rasterisation</a> system. Scroll down to "Making ray tracing happen" and there is a screen grab of a hybrid demo.</p>

<p>As others have mentioned, there are pros and cons: Some advantages include that rasteriser can be extremely efficient at handling the first set of intersections and, for shadows, you don't spend effort pre-rendering portions of shadow maps that may never be visible in the final render. On the downsides, you are typically constrained to the standard pinhole camera model. </p>

CC BY-SA 4.0
2019-11-05T09:22:21.057Z
2019-11-05T09:22:21.057Z
Simon F
<p>Rasterization is sometimes used for primary rays. However, it limits greatly what you can do - depth of field, motion blur, participating media, refraction, only basic camera models, no adaptive or custom sampling, etc.</p>

CC BY-SA 4.0
2019-11-05T10:19:36.723Z
Using the z-buffer should enable you to make an approximate of the DOF effect. I don't see how it limits refraction however. Lets suppose you don't actually render the triangles using rasterization, you just tell the raytracer which portions of which triangles to shade given the z buffer (now you have your t-parameter which gives you a hitpoint ), you should be able to just refract that.
AnnoyinC
CC BY-SA 4.0
2019-11-05T10:29:28.167Z
@AnnoyinC This "approximation will be arbitrarily bad. In general dof depends on the aperture of your camera, which you cannot really model very well in rasterization. The issue with refraction, is that if you put a glass panel in front of your camera, your rasterization will effectively just "intersect" the glass panel, which may be made from 2 triangles, so you don't get the usual high gain compared to ray tracing.
lightxbulb
CC BY-SA 4.0
2019-11-07T18:01:34.567Z
@lightxbuld in that example, a pure raytracer would be even slower. It woul raytrace the first intersection, and then the refraction/reflection, so it has to do 2/3 passes for a render. Offloading the first pass to a rasterizer would still provide gains.
AnnoyinC
CC BY-SA 4.0
2019-11-07T18:30:55.903Z
@AnnoyinC I wouldn't be so sure. In rt you may hit the bounding box of this glass quad and be done, in a rasterizer you may have to render millions of tris hidden behind it.
lightxbulb
CC BY-SA 4.0
2019-11-07T18:43:15.600Z
Oh, I see what you mean now. Yeah, I was thinking along the lines of "get a very simple rasterizer to simply get the nearest triangle for each pixel, then use a raytracer as a shader." Then the raytracing shader can concern itself with material properties like transparency.
AnnoyinC
CC BY-SA 4.0
2019-11-07T21:11:57.277Z
@AnnoyinC The issue is how you find the "nearest" triangle. And if two tris intersect, then some parts of both are nearest - that's where z-buffer comes in, but you may have to render you whole scene for that. Some tricks may be used however to achieve something similar like acceleration structures in ray tracing.
lightxbulb
CC BY-SA 4.0
2019-11-04T17:29:57.407Z
2019-11-04T17:29:57.407Z
lightxbulb
<p>There are renderes that do this. Most notably Pixars Renderman prefers to work this way. Hybrid renderers can work in other ways too...</p>

<p>It used to be that hybrid renderers like this were quite common, they still are somewhat  in software only implementations. They are slowly being replaced though by a new breed of trace only renderes though. Mostly the reason is that by foregoing the other you get a simpler piece of code.</p>

CC BY-SA 4.0
2019-11-04T15:39:27.347Z
2019-11-04T15:39:27.347Z
joojaa
<p>Because when you test the visibility of a fragment during rasterization you already know (or can easily calculate) all the details that raytracing will give you.</p>

<p>So doing the ray-triangle collision calculation is redundant.</p>

<p>But it is the additional lighting beyond the first hit where raytracing is helpful. However each ray is only a small part of what contributes to the lighting in a scene, so you need a lot of them per fragment. And each ray has relatively large cost to compute. </p>

<p>Those two properties make raytracing not very atractive for real-time rendering without some dedicated acceleration.</p>

CC BY-SA 4.0
2019-11-05T09:25:14.920Z
_"Those two properties make raytracing not very atractive for real-time rendering without some dedicated acceleration"_  One could probably say the same for rasterisation.  ;-)
Simon F
CC BY-SA 4.0
2021-11-18T03:07:50.217Z
When you combine rasterization with ray tracing, you're allowing the standard rasterization to determine the location that the primary ray would hit. It's not redundant because you no longer have to test the first ray for intersection.
tay10r
CC BY-SA 4.0
2019-11-04T16:28:57.627Z
2019-11-04T16:28:57.627Z
ratchet freak
<p>If I'm not mistaken, you can make a hybrid renderer which lets a rasterizer solve the visibility problem, then shade all of the projected shapes with a raytracing algorithm. It seems that this isn't commonly done however, what's the reason for that? Oversight?</p>

<raytracing><rendering>
Why isn't rasterization combined with raytracing more often?
AnnoyinC
# Why isn't rasterization combined with raytracing more often?

(Asked by: username_0 on 2019-11-04)

If I'm not mistaken, you can make a hybrid renderer which lets a rasterizer solve the visibility problem, then shade all of the projected shapes with a raytracing algorithm. It seems that this isn't commonly done however, what's the reason for that? Oversight?

**Tags:** raytracing, rendering


---

## 4 answers

### Answer by username_1 on 2019-11-05. Score: 1 | Accepted answer

*Disclosure: I work for [IMG/PowerVR](https://stackoverflow.com/jobs/companies/imagination-technologies)*

Indeed there are rendering systems that can do this: Imagination demonstrated hybrid rendering on their "Wizard" [Ray Tracing/Rasterisation](https://www.imgtec.com/blog/imagination-technologies-the-ray-tracing-pioneers/) system. Scroll down to "Making ray tracing happen" and there is a screen grab of a hybrid demo.

As others have mentioned, there are pros and cons: Some advantages include that rasteriser can be extremely efficient at handling the first set of intersections and, for shadows, you don't spend effort pre-rendering portions of shadow maps that may never be visible in the final render. On the downsides, you are typically constrained to the standard pinhole camera model.


---

### Answer by username_2 on 2019-11-04. Score: 3

Rasterization is sometimes used for primary rays. However, it limits greatly what you can do - depth of field, motion blur, participating media, refraction, only basic camera models, no adaptive or custom sampling, etc.

> **Comments:**
> **username_0**: Using the z-buffer should enable you to make an approximate of the DOF effect. I don't see how it limits refraction however. Lets suppose you don't actually render the triangles using rasterization, you just tell the raytracer which portions of which triangles to shade given the z buffer (now you have your t-parameter which gives you a hitpoint ), you should be able to just refract that.  
> **username_2**: @username_0 This "approximation will be arbitrarily bad. In general dof depends on the aperture of your camera, which you cannot really model very well in rasterization. The issue with refraction, is that if you put a glass panel in front of your camera, your rasterization will effectively just "intersect" the glass panel, which may be made from 2 triangles, so you don't get the usual high gain compared to ray tracing.  
> **username_0**: @lightxbuld in that example, a pure raytracer would be even slower. It woul raytrace the first intersection, and then the refraction/reflection, so it has to do 2/3 passes for a render. Offloading the first pass to a rasterizer would still provide gains.  
> **username_2**: @username_0 I wouldn't be so sure. In rt you may hit the bounding box of this glass quad and be done, in a rasterizer you may have to render millions of tris hidden behind it.  
> **username_0**: Oh, I see what you mean now. Yeah, I was thinking along the lines of "get a very simple rasterizer to simply get the nearest triangle for each pixel, then use a raytracer as a shader." Then the raytracing shader can concern itself with material properties like transparency.  
> **username_2**: @username_0 The issue is how you find the "nearest" triangle. And if two tris intersect, then some parts of both are nearest - that's where z-buffer comes in, but you may have to render you whole scene for that. Some tricks may be used however to achieve something similar like acceleration structures in ray tracing.  

---

### Answer by username_3 on 2019-11-04. Score: 1

There are renderes that do this. Most notably Pixars Renderman prefers to work this way. Hybrid renderers can work in other ways too...

It used to be that hybrid renderers like this were quite common, they still are somewhat in software only implementations. They are slowly being replaced though by a new breed of trace only renderes though. Mostly the reason is that by foregoing the other you get a simpler piece of code.


---

### Answer by username_4 on 2019-11-04. Score: 0

Because when you test the visibility of a fragment during rasterization you already know (or can easily calculate) all the details that raytracing will give you.

So doing the ray-triangle collision calculation is redundant.

But it is the additional lighting beyond the first hit where raytracing is helpful. However each ray is only a small part of what contributes to the lighting in a scene, so you need a lot of them per fragment. And each ray has relatively large cost to compute.

Those two properties make raytracing not very atractive for real-time rendering without some dedicated acceleration.

> **Comments:**
> **username_1**: _"Those two properties make raytracing not very atractive for real-time rendering without some dedicated acceleration"_  One could probably say the same for rasterisation.  ;-)  
> **username_5**: When you combine rasterization with ray tracing, you're allowing the standard rasterization to determine the location that the primary ray would hit. It's not redundant because you no longer have to test the first ray for intersection.  

---

