microsoft / DirectXTK

The DirectX Tool Kit (aka DirectXTK) is a collection of helper classes for writing DirectX 11.x code in C++
https://walbourn.github.io/directxtk/
MIT License
2.55k stars 506 forks source link

How to use DirectXTK to develop Hololens app? #133

Closed IngoChou closed 6 years ago

IngoChou commented 6 years ago

Hello,

How to use DirectXTK to develop Hololens app?

Thanks.

walbourn commented 6 years ago

There are a few folks who have modified the library to support HoloLens (dngoins, southie) which is mostly an issue of doing the instancing needed to render to multiple render targets simultaneously. I've not yet integrated official support because it's not entirely clear the best way to do it non-invasively.

See issue 115, 42, and 41

IngoChou commented 6 years ago

Yes, that's right. The mainly issue is VPRT feature and using GS shader.

How can I use my custom shader (vs, ps, gs ...)?

I think maybe I can make my app run on hololens and mixed reality portal if I can set and make sure the app is using my custom shaders but not the default effect.

Thanks a lot.

insightcoder commented 6 years ago

So what would happen if we try to use DirectXTK SpriteFont within a HoloLens App? Would anything be displayed?

southie commented 6 years ago

Using any of DirectXTK without implementing the appropriate geometry shader and VPRT shaders will result in, I believe, only one eye rendering ( left eye?). It may show you something on the emulator (it only renders one view), but it won't work on the HoloLens. I suppose you could try to render to texture and use custom shaders from that point, though I haven't tried to do that with SpriteFont.