You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
The OpenXR plugin now adjusts the stereo render targets based on vr.pixeldensity * AdjustViewRect respects PixelDensity, plus quantizes in order to match RenderTarget size in renderer logic (prevents upscale in MobileShadingRenderer) * Override CalculateRenderTargetSize - previously, FOpenXRHMD was using the default implementation from FXRRenderTargetManager. However, it doesn't care about the per-view quanitization utilized by AdjustViewRect. Instead of modifying the shared implementation, we can provide a customized OpenXR version that shares logic with AdjustViewRect * Allocate the depth texture at color alloc time - Because of the location of where IStereoRenderTargetManager::AllocateDepthTexture is called (scene texture creation time), it's too late for us to acquire the swapchain because it is called _after_ OnBeginRendering_RenderThread. This means we would use janky logic to acquire the swapchain after the frame has started. Instead, since we know if we're going to use depth at session time, and the parameters should be 'known', we can just allocate depth alongside color. Then the interface `AllocateDepthTexture` call is a validator + getter. In the future, we could rename some of these interfaces. * Update layer/swapchain state in PostRenderViewFamily_RenderThread - we only need this state updated for frame end, so we can update it just-in-time. This actually happens 'early' becase we enqueue directly onto GraphBuilder.RHICmdList. In the future, we could schedule a task onto GraphBuilder. #rb Jules.Blok #jira UE-131060 #preflight 62f3fff7466f8c150dba2286 [CL 21324195 by robert srinivasiah in ue5-main branch]