I have some custom code that renders to Direct3D11 texture. Is it possible to use this texture on an object in unreal 4? Or alternatively, is it possible to draw custom geometry directly to the scene in unreal 4 using raw Direct3d?
So far, it seems like I need to make a custom instance of UPrimitiveComponent
which creates and returns an FPrimitiveSceneProxy
. In the FPrimitiveSceneProxy::CreateRenderThreadResources
I can call RHIGetNativeDevice
and cast its return to ID3D11Device
and use it to create Direct3D instances, however, I'm not sure where to put my per-frame draw calls.