# Accessing View Projection Matrix from material

**URL:** <https://forums.unrealengine.com/t/accessing-view-projection-matrix-from-material/362104>\
**Category:** Rendering\
**Tags:** projection-matrix, unreal-engine, Shaders, question\
**Created:** [June 27, 2016, 2:01am UTC](https://forums.unrealengine.com/t/accessing-view-projection-matrix-from-material/362104 "2016-06-27T02:01:56Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_3f4ca383](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_3f4ca383](https://forums.unrealengine.com/u/anonymous_user_3f4ca383)\
**Post date:** [June 27, 2016, 2:01am UTC](https://forums.unrealengine.com/t/accessing-view-projection-matrix-from-material/362104/1 "2016-06-27T02:01:56Z")

</div>

Hello,

I need to access view projection matrix in my material, is it possible in any way?

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_3f4ca383](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_3f4ca383](https://forums.unrealengine.com/u/anonymous_user_3f4ca383)\
**Post date:** [June 27, 2016, 12:31pm UTC](https://forums.unrealengine.com/t/accessing-view-projection-matrix-from-material/362104/2 "2016-06-27T12:31:46Z")

</div>

Thanks for the answer, I’ll look into it, I need it for projected grid shader I think I can actually achieve it with Transform nodes you provided, thanks a lot again. 😉

---

<div class="post-metadata">

**Author:** ![Aejjee](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/aejjee/32/1204088_2.png) [@Aejjee](https://forums.unrealengine.com/u/Aejjee)\
**Post date:** [July 18, 2023, 9:37am UTC](https://forums.unrealengine.com/t/accessing-view-projection-matrix-from-material/362104/3 "2023-07-18T09:37:33Z")

</div>

I love you 🙂

---

<div class="post-metadata">

**Author:** ![AcerDara](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@AcerDara](https://forums.unrealengine.com/u/AcerDara)\
**Post date:** [May 24, 2024, 2:57pm UTC](https://forums.unrealengine.com/t/accessing-view-projection-matrix-from-material/362104/4 "2024-05-24T14:57:25Z")

</div>

It’s an old post but, I leave a comment because I think There are still many people that search for this these days.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/1/f/01f6f2f48a307e2014136d261cf624b1c6d2acdb.png)  
You can get view projection matrix using custom node and `ResolvedView.ViewToClip` fuction.  
Return value is a matrix so, you should acces rows or elements with a array access expression. e.g. `ResolvedView.ViewToClip[0][0]`

I think there are more matrix like that in engine code so, If I need I should search through engine code.

---

<div class="post-metadata">

**Author:** ![UE\_sims](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@UE\_sims](https://forums.unrealengine.com/u/UE_sims)\
**Post date:** [November 10, 2024, 9:49am UTC](https://forums.unrealengine.com/t/accessing-view-projection-matrix-from-material/362104/6 "2024-11-10T09:49:11Z")

</div>

Great help! 🙂
