<p>I've generalized Everitt's results if that's needed.</p>

<p><a href="https://i.sstatic.net/VyA1o.png" rel="noreferrer"><img src="https://i.sstatic.net/VyA1o.png" alt="generalized common frustum"></a></p>

<p>As a bonus, a way to extract left0/right0 from the eyes perspective matrices:</p>

<pre><code>left0   = n0 * (Mle13 - 1) / Mle11;
right1  = n1 * (Mre13 + 1) / Mre11;
</code></pre>

<p>If you have row major. transpose for column major. c.f. <a href="https://stackoverflow.com/a/12926655/893406">this answer</a></p>

CC BY-SA 3.0
2017-02-24T03:58:44.900Z
2017-02-27T03:52:47.363Z
2017-05-23T12:39:19.850Z
v.oddou
<p>Be careful, using a single frustum for culling only works if the combined field of view of the eyes is less than 180 degrees. There are now VR headsets with a larger field of view around 200 degrees, i.e. the <a href="https://pimaxvr.com/products/pimax-5k-series" rel="noreferrer">Pimax 5k+</a> and <a href="https://www.starvr.com/products/" rel="noreferrer">StarVR</a>. It's impossible to construct a traditional view frustum or single projection matrix for a field of view over 180 degrees.</p>

<p>These headsets use angled screens, so the projection planes and the forward vectors in view space are not parallel. The equations from the other answers here assume that they are parallel, and would produce incorrect results when that assumption is wrong.</p>

<p>A single combined view frustum can still be useful, but your code should be prepared to deal with cases where this can't be constructed to ensure that it's future proof. Alternatively, consider doing culling per eye view, or switch to angle-based culling which can express a larger-than-180-degree FOV.</p>

CC BY-SA 4.0
2019-01-10T18:05:53.947Z
2019-01-10T18:05:53.947Z
klausw
<p>It's pretty easy to create a single frustum that encloses both of the individual eye frusta, as shown in this diagram created by Cass Everitt at Oculus. You just have to place the vertex of this frustum between the eyes and behind them a little bit. You can also increase the near plane distance to match the original near plane of the eye frusta.</p>

<p><a href="https://i.sstatic.net/TpHYa.jpg" rel="noreferrer"><img src="https://i.sstatic.net/TpHYa.jpg" alt="enter image description here"></a></p>

<p>Such a frustum includes a little space that wasn't in the union of the original two frusta. There's a small volume horizontally between the two eyes; also, the diagram doesn't show the vertical dimension, but pulling the frustum vertex back makes it include some space above and below the original frusta. However, for practical culling purposes it probably doesn't matter. Frustum culling is usually conservative anyway, and the extra space is only a few centimeters in thickness.</p>

<p>It's also possible to simply cull against the original frustum top and bottom planes (which are shared between eyes) together with the outer side planes. These planes don't form a frustum, technically, but if using "the usual" culling algorithm that tests against one plane at a time, the algorithm will happily work on any set of planes you care to give it.</p>

<p>Sharing frustum culling, LOD selection, etc. between eyes, rather than re-doing it twice every frame, is a great way to optimize the CPU cost of stereo rendering. This is also a prerequisite if you want to use a rendering method that draws both eyes in a single pass, such as <a href="https://docs.google.com/presentation/d/19x9XDjUvkW_9gsfsMQzt3hZbRNziVsoCEHOn4AercAc/" rel="noreferrer">instanced stereo rendering</a>.</p>

CC BY-SA 3.0
2015-11-19T05:34:35.090Z
Thanks Nathan that's exactly what I was after, where did you get this diagram may I ask, is it in any public documentation from oculus ?
Garry Wallis
CC BY-SA 3.0
2015-11-19T05:37:24.127Z
@GarryWallis Cass [tweeted it](https://twitter.com/casseveritt/status/608677561674149889) a few months ago.
Nathan Reed
CC BY-SA 3.0
2015-11-19T05:09:30.257Z
2015-11-19T05:09:30.257Z
Nathan Reed
<p>When rendering VR ( stereo view ) environments, do you guys recommend just doing 2 frustum checks for determining what is to be drawn during the frustum culling pass or is there some other check that would be able to combine both frusta?</p>

<virtual-reality>
VR and frustum culling
Garry Wallis
# VR and frustum culling

(Asked by: username_0 on 2015-11-19)

When rendering VR ( stereo view ) environments, do you guys recommend just doing 2 frustum checks for determining what is to be drawn during the frustum culling pass or is there some other check that would be able to combine both frusta?

**Tags:** virtual-reality


---

## 3 answers

### Answer by username_3 on 2015-11-19. Score: 13 | Accepted answer

It's pretty easy to create a single frustum that encloses both of the individual eye frusta, as shown in this diagram created by Cass Everitt at Oculus. You just have to place the vertex of this frustum between the eyes and behind them a little bit. You can also increase the near plane distance to match the original near plane of the eye frusta.

[![enter image description here](https://i.sstatic.net/TpHYa.jpg)](https://i.sstatic.net/TpHYa.jpg)

Such a frustum includes a little space that wasn't in the union of the original two frusta. There's a small volume horizontally between the two eyes; also, the diagram doesn't show the vertical dimension, but pulling the frustum vertex back makes it include some space above and below the original frusta. However, for practical culling purposes it probably doesn't matter. Frustum culling is usually conservative anyway, and the extra space is only a few centimeters in thickness.

It's also possible to simply cull against the original frustum top and bottom planes (which are shared between eyes) together with the outer side planes. These planes don't form a frustum, technically, but if using "the usual" culling algorithm that tests against one plane at a time, the algorithm will happily work on any set of planes you care to give it.

Sharing frustum culling, LOD selection, etc. between eyes, rather than re-doing it twice every frame, is a great way to optimize the CPU cost of stereo rendering. This is also a prerequisite if you want to use a rendering method that draws both eyes in a single pass, such as [instanced stereo rendering](https://docs.google.com/presentation/d/19x9XDjUvkW_9gsfsMQzt3hZbRNziVsoCEHOn4AercAc/).

> **Comments:**
> **username_0**: Thanks username_3 that's exactly what I was after, where did you get this diagram may I ask, is it in any public documentation from oculus ?  
> **username_3**: @username_0 Cass [tweeted it](https://twitter.com/casseveritt/status/608677561674149889) a few months ago.  

---

### Answer by username_1 on 2017-02-24. Score: 6

I've generalized Everitt's results if that's needed.

[![generalized common frustum](https://i.sstatic.net/VyA1o.png)](https://i.sstatic.net/VyA1o.png)

As a bonus, a way to extract left0/right0 from the eyes perspective matrices:

```
left0   = n0 * (Mle13 - 1) / Mle11;
right1  = n1 * (Mre13 + 1) / Mre11;

```

If you have row major. transpose for column major. c.f. [this answer](https://stackoverflow.com/a/12926655/893406)


---

### Answer by username_2 on 2019-01-10. Score: 5

Be careful, using a single frustum for culling only works if the combined field of view of the eyes is less than 180 degrees. There are now VR headsets with a larger field of view around 200 degrees, i.e. the [Pimax 5k+](https://pimaxvr.com/products/pimax-5k-series) and [StarVR](https://www.starvr.com/products/). It's impossible to construct a traditional view frustum or single projection matrix for a field of view over 180 degrees.

These headsets use angled screens, so the projection planes and the forward vectors in view space are not parallel. The equations from the other answers here assume that they are parallel, and would produce incorrect results when that assumption is wrong.

A single combined view frustum can still be useful, but your code should be prepared to deal with cases where this can't be constructed to ensure that it's future proof. Alternatively, consider doing culling per eye view, or switch to angle-based culling which can express a larger-than-180-degree FOV.


---

