# Show different geometry for each eye on an Oculus Rift

**URL:** <https://forums.unrealengine.com/t/show-different-geometry-for-each-eye-on-an-oculus-rift/329718>\
**Category:** XR Development\
**Tags:** rift, Oculus, unreal-engine, geometry, Rendering, question\
**Created:** [August 24, 2015, 8:55am UTC](https://forums.unrealengine.com/t/show-different-geometry-for-each-eye-on-an-oculus-rift/329718 "2015-08-24T08:55:13Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_840e95761](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_840e95761](https://forums.unrealengine.com/u/anonymous_user_840e95761)\
**Post date:** [August 24, 2015, 8:55am UTC](https://forums.unrealengine.com/t/show-different-geometry-for-each-eye-on-an-oculus-rift/329718/1 "2015-08-24T08:55:13Z")

</div>

For an experiment on binocular disparities we want to show different geometries for each eye using UE4 and an Oculus Rift.

We already implemented some Materials that make use of the ScreenPosition of each pixel to determine if it is rendered for the left or the right eye and show different textures. But there seems to be no “trick” to do the same for geometry.

Is there a way to render different geometry for each eye on an oculus rift? Alternatively: Where would such a feature be implemented in code?

Thanks for your answers!

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_840e95761](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_840e95761](https://forums.unrealengine.com/u/anonymous_user_840e95761)\
**Post date:** [August 24, 2015, 5:12pm UTC](https://forums.unrealengine.com/t/show-different-geometry-for-each-eye-on-an-oculus-rift/329718/2 "2015-08-24T17:12:28Z")

</div>

I got an answer from user _JohnMcPineapple_ [https://www.reddit.com/user/JohnMcPineapple](https://www.reddit.com/user/JohnMcPineapple)

> How about just making the material of  
> the geometries invisible for one eye?

Since we can manipulate materials per eye, this question is answered for me.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_729f2b44](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_729f2b44](https://forums.unrealengine.com/u/anonymous_user_729f2b44)\
**Post date:** [November 18, 2015, 1:47pm UTC](https://forums.unrealengine.com/t/show-different-geometry-for-each-eye-on-an-oculus-rift/329718/3 "2015-11-18T13:47:25Z")

</div>

Can you send link to his answer? It will be very helpful.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_840e95761](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_840e95761](https://forums.unrealengine.com/u/anonymous_user_840e95761)\
**Post date:** [November 18, 2015, 3:16pm UTC](https://forums.unrealengine.com/t/show-different-geometry-for-each-eye-on-an-oculus-rift/329718/4 "2015-11-18T15:16:16Z")

</div>

Here is the link to the post:

---

<div class="post-metadata">

**Author:** ![TTV\_Zikick](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@TTV\_Zikick](https://forums.unrealengine.com/u/TTV_Zikick)\
**Post date:** [February 18, 2016, 4:02pm UTC](https://forums.unrealengine.com/t/show-different-geometry-for-each-eye-on-an-oculus-rift/329718/5 "2016-02-18T16:02:27Z")

</div>

Could you share the details of how you implemented your Materials to show different textures for each eye - this is something I need to do as well!

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_840e95761](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_840e95761](https://forums.unrealengine.com/u/anonymous_user_840e95761)\
**Post date:** [February 18, 2016, 8:24pm UTC](https://forums.unrealengine.com/t/show-different-geometry-for-each-eye-on-an-oculus-rift/329718/6 "2016-02-18T20:24:14Z")

</div>

This is quite simple and works for the Oculus Rift (I don’t know if it works for other HMDs too):

- Read the “ScreenPosition” value in the material
- If the value is below 0.5 the material is rendered for the left eye (above 0.5 it is rendered for the right eye)
- switch the texture based on this

---

<div class="post-metadata">

**Author:** ![jic6012](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@jic6012](https://forums.unrealengine.com/u/jic6012)\
**Post date:** [November 16, 2020, 2:58pm UTC](https://forums.unrealengine.com/t/show-different-geometry-for-each-eye-on-an-oculus-rift/329718/7 "2020-11-16T14:58:01Z")

</div>

322199-

Thank you! This idea is very useful.
