{"action":"created","issue":{"url":"https://api.github.com/repos/AADProductions/VR-Mirrors/issues/2","repository_url":"https://api.github.com/repos/AADProductions/VR-Mirrors","labels_url":"https://api.github.com/repos/AADProductions/VR-Mirrors/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/AADProductions/VR-Mirrors/issues/2/comments","events_url":"https://api.github.com/repos/AADProductions/VR-Mirrors/issues/2/events","html_url":"https://github.com/AADProductions/VR-Mirrors/issues/2","id":172382988,"number":2,"title":"Support singel pass renderer","user":{"login":"AndersMalmgren","id":817577,"avatar_url":"https://avatars.githubusercontent.com/u/817577?v=3","gravatar_id":"","url":"https://api.github.com/users/AndersMalmgren","html_url":"https://github.com/AndersMalmgren","followers_url":"https://api.github.com/users/AndersMalmgren/followers","following_url":"https://api.github.com/users/AndersMalmgren/following{/other_user}","gists_url":"https://api.github.com/users/AndersMalmgren/gists{/gist_id}","starred_url":"https://api.github.com/users/AndersMalmgren/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AndersMalmgren/subscriptions","organizations_url":"https://api.github.com/users/AndersMalmgren/orgs","repos_url":"https://api.github.com/users/AndersMalmgren/repos","events_url":"https://api.github.com/users/AndersMalmgren/events{/privacy}","received_events_url":"https://api.github.com/users/AndersMalmgren/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-08-22T07:09:37Z","updated_at":"2016-08-22T17:49:12Z","closed_at":null,"body":"Hey guys. Have you seen this post?\r\n\r\nhttp://forum.unity3d.com/threads/5-4-beta15-reflection-rendering-wrong-in-openvr-htc-vive.398756/#post-2622845\r\n\r\n\r\n> Thanks for the reply ccs. I should have replied to this thread a while ago with an update on how I've resolved the issue. Your solution sounds reasonable enough, but it does require modifying the main camera / render passes which isn't ideal. My solution modifies the MirrorReflection code and enables it to work without requiring any changes to the main camera (ie: a single main camera rendering all layers to both eyes). It also has the added benefit that it works just fine for single-pass stereo rendering. If we could get support for creating our own stereo cameras that render to split textures, then this could be improved even further.\r\n> \r\n> Basically, I modified the MirrorReflection.shader so that it has two reflection textures, one for each eye, and it samples the appropriate texture based on which eye is being rendered (you can determine this by examining unity_StereoEyeIndex when using single pass stereo rendering, or by checking the sign of unity_CameraProjection[0][2] when using traditional multi-pass stereo rendering).\r\n> \r\n> The MirrorReflection.cs is then responsible for generating the appropriate texture(s) for the camera that is being mirrored. Normal monocular cameras only require a single reflection render pass. Stereo cameras require two reflection render passes (this is where having engine support for creating our own stereo cameras that render to a single side-by-side split render texture would be super useful). Unfortunately, Unity does not currently expose the per-eye details that we need from a stereo camera (ie: position/rotation of each individual eye and the projection matrix used by each eye). I had to rely on some SteamVR APIs to access this information, and haven't yet looked into how (or if) one could do this for other VR platforms.\r\n> \r\n> I've attached our modified MirrorReflection scripts in case anyone is interested.\r\n\r\nBasicly you use _unity_StereoEyeIndex_ when single pass is used"},"comment":{"url":"https://api.github.com/repos/AADProductions/VR-Mirrors/issues/comments/241493295","html_url":"https://github.com/AADProductions/VR-Mirrors/issues/2#issuecomment-241493295","issue_url":"https://api.github.com/repos/AADProductions/VR-Mirrors/issues/2","id":241493295,"user":{"login":"Railboy","id":9789716,"avatar_url":"https://avatars.githubusercontent.com/u/9789716?v=3","gravatar_id":"","url":"https://api.github.com/users/Railboy","html_url":"https://github.com/Railboy","followers_url":"https://api.github.com/users/Railboy/followers","following_url":"https://api.github.com/users/Railboy/following{/other_user}","gists_url":"https://api.github.com/users/Railboy/gists{/gist_id}","starred_url":"https://api.github.com/users/Railboy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Railboy/subscriptions","organizations_url":"https://api.github.com/users/Railboy/orgs","repos_url":"https://api.github.com/users/Railboy/repos","events_url":"https://api.github.com/users/Railboy/events{/privacy}","received_events_url":"https://api.github.com/users/Railboy/received_events","type":"User","site_admin":false},"created_at":"2016-08-22T17:49:12Z","updated_at":"2016-08-22T17:49:12Z","body":"We had not seen this, thank you for the heads up."}}
{"actor":{"display_login":"Railboy"}}