<p>is it possible to calculate a &quot;projection matrix&quot; which is sheared as well?
the usual perspective projection matrix forms a pyramid where the near clipping plane is rectangular.
I have 4 lines which represents the edges of the pyramid in general. But the clipping plane is not orthogonal to the view direction (see picture 1)</p>
<p><strong>Picture 1: view onto the projected area from above. Also from the side direction it will look like this</strong>
<a href="https://i.sstatic.net/08M8I.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/08M8I.png" alt="enter image description here" /></a></p>
<p>By looking from the view position to the near clipping plane / image plane it would look like picture 2.</p>
<p><strong>Picture 2: the view from the view position onto the scene</strong>
<a href="https://i.sstatic.net/etMwM.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/etMwM.png" alt="enter image description here" /></a></p>
<p>The image plane is restricted to be rectangular. Only from the view position its shape will look non rectangular.</p>
<p>Now lets look at the parameters which are known:</p>
<ol>
<li>all 4 corners of the image plane</li>
<li>the view position</li>
<li>the far plane distance</li>
</ol>
<p>so my task is to calculate this projection matrix, but I've no idea how to start or if it is possible at all.
Thanks for your help in advance!</p>

CC BY-SA 4.0
2021-01-29T19:24:23.097Z
In a vertex shader, after multiplying with the view matrix, divide z by y. And scale appropriately.
Andrew Wilson
CC BY-SA 4.0
2021-01-30T11:44:38.167Z
@andrewWilson can you discribe how your solution works? I don't get it... But thanks a lot for your help!
Thomas
CC BY-SA 4.0
2021-01-30T11:51:54.337Z
In depth discussion on oblique clipping planes: http://www.terathon.com/lengyel/Lengyel-Oblique.pdf
pmw1234
<projections>
computing sheared perspective projection matrix
Thomas
# computing sheared perspective projection matrix

(Asked by: username_0 on 2021-01-29)

is it possible to calculate a "projection matrix" which is sheared as well?
the usual perspective projection matrix forms a pyramid where the near clipping plane is rectangular.
I have 4 lines which represents the edges of the pyramid in general. But the clipping plane is not orthogonal to the view direction (see picture 1)

**Picture 1: view onto the projected area from above. Also from the side direction it will look like this**
[![enter image description here](https://i.sstatic.net/08M8I.png)](https://i.sstatic.net/08M8I.png)

By looking from the view position to the near clipping plane / image plane it would look like picture 2.

**Picture 2: the view from the view position onto the scene**
[![enter image description here](https://i.sstatic.net/etMwM.png)](https://i.sstatic.net/etMwM.png)

The image plane is restricted to be rectangular. Only from the view position its shape will look non rectangular.

Now lets look at the parameters which are known:

1. all 4 corners of the image plane
2. the view position
3. the far plane distance

so my task is to calculate this projection matrix, but I've no idea how to start or if it is possible at all.
Thanks for your help in advance!

**Tags:** projections

> **Comments:**
> **username_1**: In a vertex shader, after multiplying with the view matrix, divide z by y. And scale appropriately.  
> **username_0**: @andrewWilson can you discribe how your solution works? I don't get it... But thanks a lot for your help!  
> **username_2**: In depth discussion on oblique clipping planes: http://www.terathon.com/lengyel/Lengyel-Oblique.pdf  

---

## 0 answers

