Avdbergnmf/UnityURPMirrorShader

Possible support for 2020.3 LTS?

Opened this issue · 2 comments

Hi!

First off I would like to thank you for making this mirror shader available for free!
It workes great on 2019.4, and even runs without any performance issues on the Quest 2.

I would really like to upgrade the project I'm using it for to 2020.3 because of an unrelated bug in 2019.4.
(The bug has to do with soft particles in VR not working properly for the right eye).

The mirror from this project unfortunately does not work on 2020.3. I spent some time yesterday trying to fix it but wasn't able to.

It seems that camera.stereoEnabledalways returns false on 2020.3 and I suspect something is wrong with the projection matrix you get from camera.GetStereoProjectionMatrix(eye).

Have to tried to get it working 2020.3 yourself? Do you think it is possible, or does Unity have to fix stuff on their end to get it working?

I was able to put it together because of other people's work they share for free, so no problem at all!

Wrt 2020, I haven't tried it and atm I don't have time to mess around with it. If I'd find a solution, I'll surely let you know but get your hopes up.

I do think it should be possible. In 2020 they renamed a bunch of stuff so you'll probably need to go through conversion guides / documentation to figure it out. 2020.3 is LTS, so I don't expect any roadblocks in terms of sh!t not being finished.

Furthermore, if you manage to get it to work, please do post a PR! :)

Alright :)

The docs for stereoEnabled don't seem to have changed though, https://docs.unity3d.com/ScriptReference/Camera-stereoEnabled.html

I also found this forum post that kind of gave me the impression that there are some bugs left relating to this despite being LTS: https://forum.unity.com/threads/stereoenabled-false-in-unity-2020-3.1098265/

Could GetStereoProjectionmatrix() returning an identity explain why the mirror was showing a view from world origin rather than the position of the portal cameras? That seemed to be the behaviour I got after I made a workaround for the stereoEnabled issue.

Probably going to settle for 2019.4 and not use soft particles for my clouds. I'll post a PR if I change my mind and manage to fix it!