-
-
Notifications
You must be signed in to change notification settings - Fork 144
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for the HMD's hidden area mesh #203
Comments
Yes, but the answer is more complicated than that: virtual void DrawHiddenAreaMesh_RenderThread(class FRHICommandList& RHICmdList, EStereoscopicPass StereoPass) const {};
virtual void DrawVisibleAreaMesh_RenderThread(class FRHICommandList& RHICmdList, EStereoscopicPass StereoPass) const {}; This expects the implementor (the VR plugin AKA UEVR) to call the relevant functions at this point in the rendering pipeline to draw the mesh primitives, given the command list. Adding a command to the command list properly would need to be reverse engineered, and tested for stability across versions. We would use something like the engine function So these are the main problems:
The other alternative would be constructing our own injected DirectX command which would arguably be easier to maintain, into the correct point within the rendering pipeline. If done directly through the engine, the DirectX implementation for 11 and 12 could be abstracted away and would be preferable. According the the source, |
If The RHICmdList layout is relatively simple near the start, so this could be allocated. The |
Now, as an alternative, we could instead hook the last command's |
An easy experiment would be to hardcode all the necessary offsets and see if any of these methods (apart from the DX one) works. Well this was a lot of brainstorming. Good documentation for later. |
great documentation for later and some really clear explanations as to why this is so challenging. I really appreciate the time you've taken to explore and explain this. Obviously all of the stuff above is way beyond my knowledge and skill level, and the chances of me implementing something workable are basically zero, but I'll take a look anyway because it's fun |
I have been writing (and learning...) some Direct3D code in some unfinished builds, so I might be able to experiment with obtaining the actual D3D command list at the time this virtual is called, and attempt to inject an actual Direct3D DrawIndexedPrimitiveUP-like command into the depth buffer (at least that's what I assume is supposed to be done to make this work) if nothing fancy is needed |
DrawHiddenAreaMesh_RenderThread_index / DrawHiddenAreaMesh_index appears in the UESDK's IHeadMountedDisplayVT - is it possible to hook this and pass the HMD-provided hidden area mesh (or a derivative of it that accounts for projection changes)?
if not, could a hacky alternative be to create and attach an opaque mesh to the camera at the near-z distance which just occludes stuff in that part of the view?
The text was updated successfully, but these errors were encountered: