The Mixed Reality Forums here are no longer being used or maintained.
There are a few other places we would like to direct you to for support, both from Microsoft and from the community.
The first way we want to connect with you is our mixed reality developer program, which you can sign up for at https://aka.ms/IWantMR.
For technical questions, please use Stack Overflow, and tag your questions using either hololens or windows-mixed-reality.
If you want to join in discussions, please do so in the HoloDevelopers Slack, which you can join by going to https://aka.ms/holodevelopers, or in our Microsoft Tech Communities forums at https://techcommunity.microsoft.com/t5/mixed-reality/ct-p/MicrosoftMixedReality.
And always feel free to hit us up on Twitter @MxdRealityDev.
Using DirectX to Render 2D Text Glyphs only render on Left Camera
This issue is related to this thread: https://forums.hololens.com/discussion/891/only-single-camera-is-found-by-debugging-whats-the-point-to-use-a-hashmap-to-maintain-camera-res
Basically I only ever get 1 camera and thus the Text is only rendered on the left eye. Please help. How do you get to the right camera? Is this a bug?
Dwight Goins
CAO & Founder| Independent Architect | Trainer and Consultant | Sr. Enterprise Architect
MVP | MCT | MCSD | MCPD | SharePoint TS | MS Virtual TS |Windows 8 App Store Developer | Linux Gentoo Geek | Raspberry Pi Owner | Micro .Net Developer | Kinect For Windows Device Developer
http://dgoins.wordpress.com
Best Answer
-
Options
Figured this out. For DirectX UWP - you must render to both stereoscopic views. The DirectX UWP Holographic example gives you the hint.
1. When rendering draw using the instancedIndex()
2. In your shader (5.0 and above) use the SV_InstanceID semantic to toggle between a 0 and 1, which potentially represents Left and Right.
3. Create a ViewProjectMatrix array in the shader, and use the toggled Left and Right states to retrieve the Left and Right ViewProjections.
4. Set the RenderTargetArrayIndex in the shader to the index corresponding left and right viewprojection matrix.
5. Use a constant buffer and to store the ViewProjectionMatrix [2] array.
6. Populate the viewProjectMatrix array with the Float4x4 matrix from the cameraPose View Transform (Left and Right) matrices.
7. Set the viewPort for the camera (See the UpdateViewProjectionBuffer() method in the default Holographic example)Dwight Goins
CAO & Founder| Independent Architect | Trainer and Consultant | Sr. Enterprise Architect
MVP | MCT | MCSD | MCPD | SharePoint TS | MS Virtual TS |Windows 8 App Store Developer | Linux Gentoo Geek | Raspberry Pi Owner | Micro .Net Developer | Kinect For Windows Device Developer
http://dgoins.wordpress.com5
Answers
Figured this out. For DirectX UWP - you must render to both stereoscopic views. The DirectX UWP Holographic example gives you the hint.
1. When rendering draw using the instancedIndex()
2. In your shader (5.0 and above) use the SV_InstanceID semantic to toggle between a 0 and 1, which potentially represents Left and Right.
3. Create a ViewProjectMatrix array in the shader, and use the toggled Left and Right states to retrieve the Left and Right ViewProjections.
4. Set the RenderTargetArrayIndex in the shader to the index corresponding left and right viewprojection matrix.
5. Use a constant buffer and to store the ViewProjectionMatrix [2] array.
6. Populate the viewProjectMatrix array with the Float4x4 matrix from the cameraPose View Transform (Left and Right) matrices.
7. Set the viewPort for the camera (See the UpdateViewProjectionBuffer() method in the default Holographic example)
Dwight Goins
CAO & Founder| Independent Architect | Trainer and Consultant | Sr. Enterprise Architect
MVP | MCT | MCSD | MCPD | SharePoint TS | MS Virtual TS |Windows 8 App Store Developer | Linux Gentoo Geek | Raspberry Pi Owner | Micro .Net Developer | Kinect For Windows Device Developer
http://dgoins.wordpress.com