Added Support for HoloLens SpriteFont Rendering#41
Added Support for HoloLens SpriteFont Rendering#41dngoins wants to merge 3 commits intomicrosoft:masterfrom
Conversation
|
Hi @dngoins, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution! TTYL, MSBOT; |
|
@dngoins, Thanks for signing the contribution license agreement so quickly! Actual humans will now validate the agreement and then evaluate the PR. |
|
Thanks for the contribution. I'm glad you were able to get it to work for your scenario, but we need to think about the right way to enable stereo rendering across the whole library before taking this into the mainline. I've created a work-item to track this ask. Thanks! Note that an additional challenge here is abstracting the required APIs properly to maintain the ability to use DirectXTK as a pure C++ library (I avoid the use of C++/CX extensions). Likely some WRL interop will be able to resolve the issue, but this requires additional code complexity. Plus I need a device to actually be able to test it which I don't currently have :) |
|
I understand. I see the pattern you took. I guess I could do the same to help out. However I'm not quite sure how to interact with the Holographic API's outside of C++/CX. It's not published or documented on exactly how to do this. As far as supporting other platforms, that's a good challenge to tackle. I'm up for it if you have the time and get around to any ideas on how to do this I can help. Thanks. |
The Original framework incorrectly rendered on 1 eye (Left). This was due to the stereoscopic rendering targets that was needed for Holographic cameras. Holographic cameras support at least 2 different rendering views: Left eye and Right eye.
My solution is based on the Holographic project template from visual studio 2015. I modified the VertexShader to contain an array of Render Target buffers. In the SpriteBatch classes, the buffers are populated with a float4x4 matrix from each holographic camera (Left and Right) for Hololens. These cameras contain the transform matrices for each view. Each array buffer is then used by the pixel shader to render out the pixels.