I am having an issue in an app I am working on which I can view 360 degree stereo videos. I am currently using the Oculus Rift to build it and for that I am using the native Unity VR API’s.
Since I am rendering a different image in each eye, I must use the “Target Eye” serialized camera property to ensure that each eye renders correctly. Unfortunately, I am getting absolutely bombarded with the following error:
Assertion failed: Assertion failed on expression: ‘IsMatrixValid(matrix)’
This error stops when I disable the Right Eye camera or just set the right eye camera’s target eye to left.
I remember this error but not what the fix is. Maybe only certain versions of Unity have that error.
An alternative is to Play the stereo video using only 1 camera, and let the shader handle sending the image to separate eyes. My VR Eye Shaders handles this:
And the stereoscopic video shader is included in 360 Video Player also:
@SiliconDroid No code is necessary to reproduce the problem. It’s all scene manipulation. Simply:
Setup the project for VR via the player settings as normal
Add 2 cameras
Set one camera to left eye target, set the other to right eye target
Place both cameras at the origin
Add a unity sphere at the origin
Set the scale of the sphere to 100x100x100
Now when you press play you should be spammed by the error. The error immediately stops when moving the camera outside of the sphere, disabling the right eye camera or setting the right eye camera’s target to left.
Do you have any source to say that using a shader is more performant? I am trying to do it the camera route as that is the advised cross hmd and platform native vr API methodology and I would like to attack the problem correctly.
I am perfectly capable of writing a shader to solve the problem myself if that is the route I choose to go down, but nice job advertising your product and trying to shove it down my throat so I can bypass bugs that should be solved officially.
‘Do you have any source to say that using a shader is more performant?’
Common sense. Here’s a hint, it’s faster for a GPU to render 1 mesh than 2.
“I am perfectly capable of writing a shader to solve the problem myself if that is the route I choose to go down”
You expect me to believe you can write a complex shader when you don’t know why rendering 1 mesh is faster than rendering 2? OK
“Nice job advertising your product and trying to shove it down my throat”
Mate I don’t care about your $15, you posted an error that I obviously have more experience with than you do, and I’m the only person who has responded with an actual solution. Admittedly I regret trying to help you as your an asshat, but hopefully someone else finds some use from this forum post.