[Bug]? Fresnel on VR (oculus) : L/R eye different
Hello everyone !
I am having a little bit of an issue on my shaders :
I am using some Fresnel (on pretty much everything) but I noticed that the left eye and the right eye are not rendering the same effect.
[i]It's absolutely logical and normal but it's a big issue as it create a disturbing effect.[/i]
I will be okay with a Fresnel averaging on both eye "the middle eye" but I have no idea if that is possible.
So that pose also a more general question of : can camera based effect be based on the "middle eye" ?
I look forward to your enlightenment, thanks.
asked Aug 24 '14 at 12:06 AM in Bug Reports
This is logical, Here is what is going on behind the scene of a fresnel operation.
The most important part is the top left node. CameraVector. This is the world space camera direction. Since virtual reality glasses use 2 separate camera's ingame, with both a slightly different direction, you won't get the same result.
Fixing this would be easy internally. It would be cool if epic added a ViewVector for virtual reality, so we could access it in the material editor.
Since this is not the case you would have to set it up yourself. The easiest way would be to make a Material Parameter Collection in the content browser, and within there add a new Vector Parameter. Give it a nice name, like VRViewDir. In any material you can now add this Parameter Collection.
Now from within blueprint you can set the VRViewDir with the "Set Vector Parameter Value" node. This way every shader just used that view direction instead of the CameraVector.
answered Aug 24 '14 at 11:41 AM
I fixed this here by changing, in MaterialTemplate.usf, the following line of code:
answered May 06 '16 at 06:54 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here