Files
UnrealEngineUWP/Engine/Source/Runtime/HeadMountedDisplay/Private/DefaultStereoLayers.cpp

304 lines
9.8 KiB
C++
Raw Normal View History

// Copyright Epic Games, Inc. All Rights Reserved.
Copying //UE4/Dev-VR to //UE4/Dev-Main (Source: //UE4/Dev-VR @ 3383750) #lockdown Nick.Penwarden ========================== MAJOR FEATURES + CHANGES ========================== Change 3012064 on 2016/06/13 by Nick.Whiting Merging Main -> DevVR Change 3048060 on 2016/07/13 by Nick.Whiting Integrating CL 3045721 from //depot/Partners/Google/AndroidVR-DevVR Upgrade Android and iOS GVR SDK to the latest. Fix the flipped vignette issue when using Unreal's post processing distortion. Change the Daydream & Cardboard mode to use scanline racing. Deprecate the ability to turn off individual UI elements. Change 3235307 on 2016/12/14 by Keli.Hlodversson Filter out excluded HMD modules during FEngineLoop:PreInitHMDDevice. The final selection still happens in UEngine::InitializeHMDDevice as all HMD plugins have not been loaded during PreInit Change 3235308 on 2016/12/14 by Ryan.Vance #jira UEVR-478 Monoscopic far field improvements Shader changes are now gated behind the read only cvar vr.MonoscopicFarField. Changing this requires a shader compile. Moved the mono rendering mode to the cvar vr.MonoscopicFarFieldMode. This is writable, so users can enable/disable mono rendering on the fly if the above cvar is enabled. Only write to the alpha channel in the mobile base pass if the object is opaque and MONOSCOPIC_FAR_FIELD is defined. Addressed code review comments. Change 3235397 on 2016/12/14 by Keli.Hlodversson [Oculus] Only enable GearVR platform on Windows if Oculus service is running Original author: Loren.McQuade Change 3235762 on 2016/12/14 by Keli.Hlodversson Add explicit parentheses to placate the build bots. Change 3242318 on 2016/12/21 by Ryan.Vance Working around pixel density crash. Change 3242522 on 2016/12/21 by Ryan.Vance Missing flag clear so our adaptive test was always returning true. Change 3243173 on 2016/12/22 by Ryan.Vance Integrating post present callback implementation from 4.14.1 Change 3248633 on 2017/01/05 by Keli.Hlodversson Copying //Tasks/UE4/Dev-VR-Refactoring to Dev-VR-Minimal (//UE4/Dev-VR-Minimal) Change 3248723 on 2017/01/05 by Keli.Hlodversson Fix after merge. EnablePositionalTracking no longer exists. Change 3249484 on 2017/01/06 by Keli.Hlodversson Add missing includes Change 3249714 on 2017/01/06 by Keli.Hlodversson Remove monolithic header include Change 3249980 on 2017/01/06 by Keli.Hlodversson SteamVR: Remove leftover unused WindowMirrorMode member variable Change 3252432 on 2017/01/10 by Keli.Hlodversson Submitting change by Loren McQuade to fix monolithic builds. Unshelved from pending changelist '3251436': Change 3257373 on 2017/01/13 by Keli.Hlodversson #jira UEVR-411: Finish renaming/removing/remodelling the remaining Oculus (Rift+GearVR) commands #jira UEVR-412: Rename and merge remaining Morpheus console commands #jira UEVR-417: Remove Exec from IHeadMountedDisplay Change 3269971 on 2017/01/24 by Jeff.Fisher UEVR-498 move controller is missing world to meters UEVR-522 PS4 motion controller worldscale support. -Passing world to meters scale into getControllerOrientationAndPosition because the thing asking about it ought to be part of a world, and know what it should be. This also avoids making PS4 motion controllers dependent on the HMD. Note Google VR Controller doesn't do position, so doesnt' care about scale. Oculus already had internal threadsafe tracking of world scale, so I left that. Steam handles world scale below our input level. -Also adding PlayerIndex member to FSceneView so we can figure out which view the MotionControllerComponent should get its worldscale from for the late render thread update. #jira UEVR-498 #review-3384107 Change 3288308 on 2017/02/06 by Jeff.Fisher UEVR-517 Detect MotionController Connectivity -PS4 can only track 2 controllers and 1 hmd. Support for dealing with that is needed. -Also need to support multiple motion controller components mapped to a single controller. Licencees have done that before. -Created a new interface IMotionTrackingSystemManagement, and implements it for PS4Tracker on PS4. -Created a MotionTrackedDeviceFunctionLibrary to expose that interface to blueprint. -With those one can enable and disable tracking on ps4 controllers and query their state to stay within the controller tracking limit. -PS4Tracker also keeps a blackboard of the enable/disable state so that one can enable or disable controllers that have not been connected yet, and have them enable tracking or not when they are connected. -DS4 controller no longer jumps back to 000 if it loses tracking. #review-3384107 #jira UEVR-517 Change 3288309 on 2017/02/06 by Keli.Hlodversson Add file missing from CL#3257373. Change 3288311 on 2017/02/06 by Jeff.Fisher UEVR-517 Detect MotionController Connectivity - Test content. -tm-motionControllers has a third mode where all playstation motion controllers for player 0 are availalbe. You can toggle them to track or not with ctrl-P,G,L,R for pad, gun, leftmove, rightmove or with alt-P,G,L,R. Ctrl tests doing so via MotionControllerComponent. Alt tests doing so by player index and controller type enum. -ctrl-A disables tracking of all controllers -alt-A disables tracking of all controllers for player 0 -ctrl-D toggles enabling new controllers by default -Also fixed one button not working in one of the other test modes for the Aim (gun) controller. -The controller 'models' have an arrow out the front. It is black if disabled. Red if enabled, but no tracker is active, yellow if tracked but inertial only, and green if fully tracked by the camera. -This logic is in the QA_MoCoAll blueprint. Change 3291601 on 2017/02/07 by Jeff.Fisher UEVR-536 PSVR motion controller tracking problem with multiple controllers -Previous code called GetRelativeTransform from the render thread, but the game thread could update it at any time. This caches that transform so that it can be safely used in the render thread. #jira UEVR-536 #review-3384107 @Ryan.Vance Change 3292460 on 2017/02/08 by Jeff.Fisher PS4 sceVrTrackerGetResult() error warning logging improved, and explanatory comment added. Change 3308771 on 2017/02/17 by Keli.Hlodversson Rename GoogleVR console commands #jira UEVR-412 Change 3309156 on 2017/02/17 by Keli.Hlodversson Track changes in r.ScreenPercentage on GoogleVR and set RenderTargetSize accordingly. Change 3311999 on 2017/02/20 by Keli.Hlodversson Create a default implementation for RecordAnalytics. Also create an initial stub for FHeadMountedDisplayBase for future default implementations of common HMD functionality. Make implementing IHeadMountedDisplay::GetDeviceName mandatory instead of defaulting to "Unknown" #jira UE-21878 #jira UEVR-213 Change 3313467 on 2017/02/20 by Ryan.Vance #jira UE-41604 3278583 pCustomPresent->AllocateRenderTargetTexture may return false, if we blindly return true we can end up with an invalid render target since the fall back sceneviewport will be skipped. 3278536 Adding ovrError_NoHmd to our sanity check in OnStartGameFrame. Change 3314002 on 2017/02/21 by Keli.Hlodversson Fix compilation on PS4 and Linux Change 3326722 on 2017/03/01 by Jeff.Fisher Merging //UE4/Dev-Main to Dev-VR (//UE4/Dev-VR) Integrating 4.15 from main. Change 3327567 on 2017/03/01 by Jeff.Fisher UEVR-588 Oculus crash on "stereo on" when the proximity sensor is not triggered. Duplicating from Release-4.15 cl 3327481, 3327542 -Don't ovr_SubmitFrame when the layers need to be recreated. They stay dirty until rendering is unpaused. #jira UEVR-588 #review-3384107 Change 3328098 on 2017/03/01 by Jeff.Fisher 4.15 merge fixes -Fixed deprecated enum name function usage. -Fixed world scale usage in GoogleVRController. -Fixed compile break in PS4Tracker. Change 3328271 on 2017/03/01 by Jeff.Fisher 2.15 merge -restroging GoogleVRController::GetWorldToMetersScale... cause it is used everywhere. Change 3328307 on 2017/03/01 by Jeff.Fisher 4.15 merge -More googlevr worldscale fixes. Change 3328312 on 2017/03/01 by Jeff.Fisher 4.15 merge -removing 2 unused includes Change 3330610 on 2017/03/02 by Jeff.Fisher 4.15 merge -fixing linux build Change 3333952 on 2017/03/06 by Keli.Hlodversson Implement common stereo layer management base class and use it in SteamVR and PS4. Fixes an outstanding bug in SteamVR where texures are updated every frame regardles of whether the continous update flag is set or not. #jira UEVR-628 #jira UE-42555 Change 3334961 on 2017/03/07 by Keli.Hlodversson Add missing include to fix non-unity builds Change 3336200 on 2017/03/07 by Keli.Hlodversson Fix compilation issues. (https://ec-01.epicgames.net/commander/link/jobDetails/jobs/7568252?jobName=UE4+Dev-VR+-+CL+3334961+-+Nightly+Build&s=Jobs) * Pre VS2015 compilers don't like mixing wide and unmarked strings in concatenation. Unfortunately LOCTEXT hides the call to the TEXT macro, completely hinding the prefix (which only gets added to the first fragment.) * Switch apparently doesn't know how to format a size_t for analytics either. Also: Typo in backwards compatibility command name alias Change 3337347 on 2017/03/08 by Jeff.Fisher UE-42631 Stereo off while prox sensor uncovered causes low framerate -Setting maxfps appropriately on 'stereo on/off'. #review-3384107 #jira UE-42631 Change 3338385 on 2017/03/08 by Ryan.Vance r.DisableDistortion was only being used for the mobile renderer Change 3342301 on 2017/03/10 by patrickr.donovan Test updates to TM-VRSmoke. Increased lightmap resolution on QA_MeshTypes meshes to improve readbility and reliablility of tests involving said asset. Rebuilt lighting. Change 3348133 on 2017/03/15 by Ryan.Vance Moving mono cvars to scene rendering to avoid cross module references. There's not a good reason to have them in the hmd module anyway. Change 3348836 on 2017/03/15 by Ryan.Vance Direct multi-view support for gear vr Monoscopic far field with multi-view (blit and direct) support for gear vr Support for translucent objects on both sides of the mono clip plane (due to a sorting issue, objects that straddle the plane composite incorrectly) Fixed missing discards/clears in the multi-view blit Change 3348843 on 2017/03/15 by Ryan.Vance Fixing color/depth target size mismatch when screen percentage scaling results in a size that isn't divisible by 16. Change 3349276 on 2017/03/16 by Keli.Hlodversson Fixing compile errors in GoogleVR after merge from main. Change 3350932 on 2017/03/16 by Ryan.Vance Re-enabling the gearvr plugin on windows. Change 3351977 on 2017/03/17 by Jeff.Fisher Fixing masked member variable. Change 3352314 on 2017/03/17 by Ryan.Vance We need to ensure that we don't select different lod levels for each eye. Change 3352993 on 2017/03/17 by Nick.Whiting Integrating CL 3345824 from Android-DevVR to Dev-VR. Support for device depth pass in SceneCaptureComponent2D Change 3355185 on 2017/03/20 by Nick.Whiting Added ability to disable the autoloading splash screen, which would prevent the hide splash screen node from ever working Change 3355676 on 2017/03/20 by Nick.Whiting PR #3384: [GNUX] SteamVR, OpenGL patch. (Contributed by yaakuro), with some minor modifications Change 3357286 on 2017/03/21 by Jeff.Fisher Fixing GenerateProjectFiles, looks like the .config. was removed from these references in main some time ago. Change 3357435 on 2017/03/21 by Jeff.Fisher Fixing editor build break, looks like a merge mistake. Change 3359960 on 2017/03/23 by Keli.Hlodversson Prevent potential crash when drawing tracking sensor location. Also only fetch HMD location once instead of once per tracking sensor. Change 3361230 on 2017/03/23 by Jeff.Fisher Fixing linux build opengl include problem... maybe. Change 3361638 on 2017/03/23 by Jeff.Fisher Another guess at fixing linux build. Change 3364224 on 2017/03/24 by Keli.Hlodversson Initial implementation of UEVR-576 - Base emulated layer implementation #jira UEVR-668 - Base emulated layer implementation: Initial framework for overrideable default implementation #jira UEVR-669 - Base emulated layer implementation: Face Locked Layers Support #jira UEVR-670 - Base emulated layer implementation: Tracker Locked Layers Support #jira UEVR-671 - Base emulated layer implementation: World Locked Layers Support #jira UEVR-672 - Base emulated layer implementation: Add support for optionally rendering face locked layers into a separate layer Change 3364242 on 2017/03/24 by Keli.Hlodversson SteamVR layers do not support negatve Layer priorities Change 3364263 on 2017/03/24 by Jeff.Fisher Merging //UE4/Dev-Main to Dev-VR (//UE4/Dev-VR) Monoscopicfarfieldrendering was just 'accept source', Ryan is going to look at fixing it up. Change 3364472 on 2017/03/24 by Jeff.Fisher Merge fix Change 3364475 on 2017/03/24 by Jeff.Fisher Fixing gearvr include. Change 3364486 on 2017/03/24 by Jeff.Fisher merge fix Change 3364532 on 2017/03/24 by Ryan.Vance pso update for mono rendering and stereo layers. Change 3364599 on 2017/03/24 by Ryan.Vance Oculus changes for SI1.12 Change 3365159 on 2017/03/26 by Jeff.Fisher include fix Change 3365182 on 2017/03/26 by Jeff.Fisher include fix Change 3366087 on 2017/03/27 by Ryan.Vance Remaining files from Oculus changes for SI1.12 merge request. Fixing a bug in OnlineSubsystem. Temporarily changing the eye padding change to be a shader clear to work around a clear color binding issue. Change 3366492 on 2017/03/27 by Ryan.Vance #jira UE-43294 Moved the clear before we setup state for drawing the mirror window content. It was stomping over state after the pso changes. Going to leave the shader clear in the rift prerender for clearing the eye padding for now. Change 3366929 on 2017/03/27 by Ryan.Vance Fixing compile error Change 3368549 on 2017/03/28 by Jeff.Fisher Merging Change: 3357998 from //UE4/Partner-Google-VR/Engine/... to Dev-VR Upgrade Google VR Plugin to v1.3: *Upgraded GVR NDK to 1.30.0 *Changed some BlueprintFunction to use BlueprintPure *Add the missing bDaydream flag in UEDeployAndroid.cs #review-3384107 Change 3368975 on 2017/03/28 by Ryan.Vance CIS clean up #jira UE-43428, UE-43429, UE-43426, UE-43427 Change 3369028 on 2017/03/28 by Ryan.Vance This is not exacly 'correct', but it's at least what the code was trying to do. Change 3370203 on 2017/03/29 by Ryan.Vance Adding gear vr controller component support. Change 3370918 on 2017/03/29 by Ryan.Vance Merging 3370569 using Partner-Google-VR_to_DevVR Change 3371030 on 2017/03/29 by Ryan.Vance Fixing linux build errors #jira UE-43426 Change 3371036 on 2017/03/29 by Ryan.Vance Oculus 4.16 integration. Not terribly happy with the use of std::string. They promised to clean this up for the next release. Change 3373495 on 2017/03/30 by Jeff.Fisher Merging from Dev-Main, in preparation for 4.16 Change 3373578 on 2017/03/30 by Jeff.Fisher build break, one comma short Change 3373870 on 2017/03/31 by Jeff.Fisher Include order fix. Change 3374001 on 2017/03/31 by Keli.Hlodversson Use DefaultStereoLayers as base for Morpheus implementation. #jira UEVR-709 #jira UE-42919 #rb: Jeff.Fisher Change 3374004 on 2017/03/31 by Keli.Hlodversson Fix rendering for the default Stereo Layers implementation on mobile. Depth test was set to "Never" instead of "Always" Destination texture on GLES is flipped on the Y axis, the coordinates are reversed in the shade when compiled on the relevant platforms. Change 3375125 on 2017/03/31 by Jeff.Fisher UE-43506 Ensure using VRPreview with GoogleVR -Removed the ensure, there is code in there to handle that case, and it works. #jira UE-43506 Change 3375294 on 2017/03/31 by nick.bullard Resaving Plugin content to resovle "saved with empty engine version" #jira UE-43537 Change 3375480 on 2017/03/31 by Jeff.Fisher UEVR-9 PSVR: Social Screen Support -Experimental social screen support for 4.16. -This does the basics of driving output through the Aux port in the proper format for display on the mirror monitor. -Only supports 30fps on the mirror monitor. 60fps will require the implementation of sony system dialogs to deal with incompatable system features (video streaming, remote play). -There is a project setting in Morpheus, under experiemental bEnableSocialScreenSeparateMode. This must be set to true to use this feature. When it is false we avoid allocating the back buffers. -MorpheusFunctionLibrary blueprints now have a node "SetSocialScreenMode" which can switch between SystemMirror (hardware supported mirroring), SeparateTest (alternates black and white), SeparateTexture (displays a texture, eg a render target, specified via blueprint), and SeparateMirror(puts the hmd render buffer on screen - which is both eyes, like a debug mode). -Also finally updated the bEnabled flag in project settings to tell people it's only for PC. #jira UEVR-9 #review-3384107 Change 3375540 on 2017/03/31 by Ryan.Vance #jira UE-43504 Fixing android build break when using a 64 bit isa. Change 3375655 on 2017/03/31 by Jeff.Fisher Fixing missing RGBAToYUV shader problem -This at least unblocks our process. Will revisit before zbr. Change 3375820 on 2017/04/01 by Jeff.Fisher Fixing linux build warning about HAS_MORPHEUS Change 3376050 on 2017/04/02 by Jeff.Fisher UE-43515 Step 'UE4Editor Static Analysis Win64' - Module.OnlineSubsystemOculus.cpp Warnings -Temporary fix for static analysis annotation warnings in OnlineSubsytemOculus. Longer term plan is to eliminate the use of the headers that trigger the warnings. -Just wrap all standard headers in static analysis disables. #jira UE-43515 Change 3376609 on 2017/04/03 by Jeff.Fisher Fixing rgbatoyuvshader include. Change 3377001 on 2017/04/03 by Jeff.Fisher UE-43547 Launch On PS4 fails during Run command - Missing global shader FRGBAToYUV420CS - shader c++ must be compiled so that it can be cooked for ps4. #jira UE-43547 Change 3379858 on 2017/04/04 by Jeff.Fisher Merging //UE4/Dev-Main to Dev-VR (//UE4/Dev-VR) pulling main this should get us ps4 sdk 4.508 Change 3379938 on 2017/04/04 by Ryan.Vance #jira UE-43548 If stereo layers are not being used, don't setup overlay targets as we will never clear/initialize them. The clear happens as part of the default layers PostRenderView_RenderThread call which wont be called if layers aren't being used in the scene. Change 3381519 on 2017/04/05 by Jeff.Fisher UEVR-733 PS4 sdk 4.500 hmd connection api changes break hmd connect. -Handling failure of sceHmdGetDeviceInformation if the hmd is powered off. It now returns an error code about an invalid handle in that case, rather than reporting unready. We just treat the error code like an unready status. #jira UEVR-733 #review-3384107 Change 3382019 on 2017/04/05 by Ryan.Vance Linux: add Vulkan support from dev editor: 3381593 Change 3382021 on 2017/04/05 by Ryan.Vance SteamVR on Linux using Vulkan OpenVR rev to 1_0_6 PR #3412: [GNUX] Initial support for SteamVR using Vulkan on GNUX platform. (Contributed by yaakuro) Change 3382076 on 2017/04/05 by Ryan.Vance Fixing linux steamvr lib path. It changed to something less silly in 1.0.6 Removing the steamvr plugin from the white list for linux. It's looking for a runtime that no one will have installed. Change 3383237 on 2017/04/06 by Ryan.Vance #jira UE-43732 Fixing Android compile issues. We can't wrap portions of a macro with a definie. This should probably be some sort of recursive macro thing since there's so much overlap. Good enough for now. Change 3383353 on 2017/04/06 by Ryan.Vance Fixing include cycles. Change 3383509 on 2017/04/06 by Jeff.Fisher Merging //UE4/Dev-Main to Dev-VR (//UE4/Dev-VR) merging the stuff from dev-mobile [CL 3384106 by Ryan Vance in Main branch]
2017-04-06 22:03:51 -04:00
#include "DefaultStereoLayers.h"
#include "HeadMountedDisplayBase.h"
#include "EngineModule.h"
#include "Engine/World.h"
Copying //UE4/Dev-VR to //UE4/Dev-Main (Source: //UE4/Dev-VR @ 3636795) #lockdown Nick.Penwarden ============================ MAJOR FEATURES & CHANGES ============================ Change 2932765 by Nick.Whiting Merging updated license files for Oculus libraries Change 3480552 by Dustin.Holmes Added map and gamemode for calibration #jira UEVR-808 Change 3502253 by Nick.Whiting Trying to fix up p4's botch of the merge Change 3513736 by Keli.Hlodversson Move duplicated late update code into a common FLateUpdateManager #jira UEVR-893 Change 3514798 by Mike.Beach #4.17 Exposing a way for Blueprint users to remap the SteamVR controller's d-pad buttons (clashes with the Oculus mappings). #jira UE-42634 Change 3516042 by Dustin.Holmes Runtime handedness changes in Vive controllers are now reflected when a new device is connected. Device mappings are also reset when a device disconnects, so that if it connects again it fully reregisters instead of just assuming the role it previously had. Change 3517781 by Keli.Hlodversson Remove unused local variable bUseCustomPresentTexture Change 3517951 by Mike.Beach #4.17 Guarding against dereferencing a null pointer. Defaulting to the identity when we don't (yet) have a valid head pose to use. #jira UE-43685 Change 3518142 by Mike.Beach #4.17 Resolving fallout from bad merge (CL 3514868) - checking for teminating null in array (which was added to keep ARRAY_COUNT from acting on an empty array). Change 3523183 by Ryan.Vance #jira UE-46493, UEVR-661 Fixes GearVR only displaying a black screen on startup Fixes GearVR rendering incorrectly with mobile multi-view w/o direct mode enabled Adding mobile multi-view direct support to Daydream Change 3523718 by Nick.Whiting Adding core controller recentering delegate, and moving Google over to that system. Change 3527263 by Dan.Oconnor Mirror 3526925 for Nick Donaldson Change 3533596 by Dustin.Holmes Add garbage matte map, gamemode, and blueprints. Change 3533598 by Dustin.Holmes Expose the Set Tint Color and Opacity function for Widget Components as a Blueprint node. Change 3538139 by Mike.Beach Moving Oculus debug shader directly into Oculus plugin. #jira UE-47134 Change 3543185 by Nick.Atamas Address UEVR-891 : Merge in changes to Google Tango plugin. #jira UEVR-891 Change 3543285 by Nick.Atamas Merging using //UE4/Release-4.17/... -> //UE4/Dev-VR/... : Fixed UEVR-852: Adjusted Google Tango Plugins copyright to Copyright Google 2017. Removed Apache 2.0 license. Change 3545505 by Nick.Atamas Fix UEVR-851 : some fix-ups to MeshReconHUD and overlay material now has a material parameter for tinting the reconstructed mesh to help debug visualization. Change 3547549 by Jeff.Fisher Fixing DefaultSpectatorScreenController comment. Change 3551339 by Ryan.Vance #jira UE-44947 Editor primitives we not being handled correctly with ISR. Change 3554169 by Dustin.Holmes Reconcile missed Mixed Reality blueprint Change 3566825 by Mike.Beach Fixing some bad merges from Main (fallout from CL 3566309) Change 3567143 by Mike.Beach Copying //Tasks/UE4/Dev-MixedReality to Dev-VR-Minimal (//UE4/Dev-VR-Minimal) Change 3567572 by Mike.Beach [WIP] Adding some MR plugin dependencies to keep CIS quiet (SteamVR is just temporary, and will be removed). Change 3569116 by Jeff.Fisher Mixed reality build breaks for PS4 -Module is dependent on steamvr, so don't build it for PS4. -Removed unused class that doesn't compile with clang. Change 3569362 by Mike.Beach Organizing MR plugin content, to make way for new calibration modes. Change 3572802 by Jeff.Fisher UEVR-832 Add save/load system for calibrated camera settings -Moved MixedRealityConfigurationSaveGame to c++. #review-3571779 #jira UEVR-832 Change 3573864 by Mike.Beach [WIP] Initial work on MR cam alignment controller - records point/frustum data from user input. Change 3575900 by Jeff.Fisher Vive spectator flat rect expanded to match other platforms. -The vive 'full flat eye' rect was narrower than other platforms. Expanded it to be closer to the other platforms. Change 3578684 by Mike.Beach Static analysis fixes for CIS. #jira UE-48204, UE-48203, UE-48206 Change 3579460 by Mike.Beach [WIP] New calibration mode for camera alignment. #jira UEVR-785 Change 3581232 by Mike.Beach [WIP] Saving off alignment calibration data, and loading it on initialization. We skip alignment calibration if it has been configured. #jira UEVR-832 Change 3588411 by Mike.Beach [WIP] Adding calibration for compositing (chroma color, etc.). #jira UEVR-785 Change 3588541 by Mike.Beach [WIP] Cleaning up some display issues with the MR calibration. #jira UEVR-785 Change 3588680 by Mike.Beach Re-organizing the MR content, now that the alignment controller calibrates more than just alignment (renaming, etc.). Change 3588694 by Mike.Beach Renaming the MR calibration pawn (since it doesn't do any calibrating itself). Change 3591518 by Mike.Beach Copying //Tasks/UE4/Dev-MixedReality to Dev-VR-Minimal (//UE4/Dev-VR-Minimal) Change 3591671 by Ryan.Vance Debug stereo layer support This adds an option to render the debug canvas to a stereo layer which greatly improves console and stat readability in an hmd. Change 3591812 by Ryan.Vance Don't snap motion controllers to the origin when tracking is lost. Change 3594681 by Mike.Beach [WIP] Copying //Tasks/UE4/Dev-MixedReality to Dev-VR-Minimal (//UE4/Dev-VR-Minimal) Change 3596679 by Mike.Beach CIS fix (likely fallout from CL 3591671) - changing the order of initialization to better match the order of declaration. Change 3598191 by Jeff.Fisher UEVR-807 Setup M_MRVidProcessing to use 3D garbage matte data. -Created MixedRealityGarbageMatteCaptureComponent. An instance of this is spawned by and attached to MixedRealityCaptureComponent. Saved config data is loaded into it. It spawns a garbage matte actor. It then captures the garbage matte actor into a render target (which is set on MixedRealityCaptureComponent). #jira UEVR-807 #review-3598179 Change 3598276 by Mike.Beach Copying //Tasks/UE4/Dev-MixedReality to Dev-VR-Minimal (//UE4/Dev-VR-Minimal) Change 3598332 by Mike.Beach Guarding against a blind cast in the SteamVRChaperone component, which can be used cross platform (can't assume SteamVR). Change 3605271 by Mike.Beach Copying //Tasks/UE4/Dev-MixedReality to Dev-VR-Minimal (//UE4/Dev-VR-Minimal) Change 3608490 by Jeff.Fisher UEVR-987 Social Screen PS4 need to go to 'mirroring' for hmd setup dialog because system dialogs are not visible in separate mode. UEVR-988 SpectatorScreen Flickering UE-47234 Spectator screen: need frame delay before assigning dynamically created rendertarget to spectator texture UE-47310 Spectator Screen: crash if you release a render target which is assigned as the spectator texture -Test level content for all of these bugs. Change 3608883 by Jeff.Fisher UEVR-807 Setup M_MRVidProcessing to use 3D garbage matte data. -Set material to use the garbage matte render target. Change 3613292 by Mike.Beach Moving header fcn decl up, under the proper interface section (for organization's sake). Change 3616943 by Nick.Whiting Updating SteamVR libraries to 1.0.9, so we can bring back macOS support Change 3616970 by Nick.Whiting Adding in steamvr visible area mesh support. Can be toggled with vr.SteamVR.UseVisibleAreaMesh Change 3617866 by Mike.Beach Updating the VR template to reflect Oculus HMD device naming that we've keyed off of in these Blueprints (when determining which VR system we're running on). Change 3620108 by Mike.Beach [WIP] Adding an intermediate calibration step to tweak the MR virtual cam's alignment. Change 3620982 by Mike.Beach Tying off some loose ends with the MR calibration map: * Saving after each calibration phase * Fixing blocked input from garbage matte creation * Blocking input handling while exiting/previewing * Adding minimum radius for random screen pt Change 3621551 by Mike.Beach [MR] Leveraging camera support in the new media framework - working for limited cameras in calibration. Change 3621552 by Mike.Beach [MR calibration] - fixing it so when you first switch into compoisiting calibration it updates the property readout. Change 3621660 by Mike.Beach [MR calibration] Cleaning up how we display text (adding a struct to wrap the coresponding properties). Change 3623323 by Dustin.Holmes Fix buffer overflow when using 5+ Vive generic trackers and add more Special hand designations to cover the maximum 11 trackers Vive supports Change 3625900 by Keli.Hlodversson Remove fixed 16:9 aspect ratio for SteamVR and Oculus splash screens. Oculus was already fixed in CL#3413801, but regressed with plugin renaming and unificiation with GearVR in CL#3502152. #jira UE-40220 StereoLayer splash layers are hardcoded to 8 by 4.5 meters (16:9 aspect ratio) Change 3628409 by Mike.Beach Speculative CIS fix. #jira UE-49339 Change 3628440 by Nick.Whiting Fix for SteamVR OSX build issues Change 3628489 by Nick.Whiting Fix for win32 build break Change 3629045 by Mike.Beach Shadowed variable name fix (CIS). Change 3629202 by Arciel.Rekman Copying //UE4/Partner-Valve@3629179 to Dev-VR (//UE4/Dev-VR) Change 3629340 by Nick.Atamas Unshelved and resolved changes from Oculus. Change 3629772 by Ryan.Vance Fixing Oculus Vulkan related compile issues. This will break Oculus Vulkan support, but the code needs to be refactored anyway. Change 3629833 by Mike.Beach Fixing up CIS warning introduced by Oculus 1.17 changes - "unsafe conversion" warning #jira UE-49376 Change 3630696 by Jeff.Fisher UE-49415 //UE4/Dev-VR: Incremental UE4Editor Win64 completed with errors - 5 Errors Switching an include to a forward declaration -Not sure why the previous version didn't compile on the build machine, but fewer dependencies is good. Change 3630783 by Mike.Beach Fixing CIS compiler failures for our vehicle templates. #jira UE-49417 Change 3630802 by Mike.Beach Better fix than 3630783 - updating the vehicle template's stereoscopic check (fixing the VehicleHud.cpp logic as well) #jira UE-49417 Change 3630870 by Mike.Beach Pragma'ing out a function pointer cast warning. Good warning, but I figure we know what we're doing here and there's no other way around it. #jira UE-49376 Change 3630993 by Ryan.Vance Check to ensure we have a valid third camera before trying to use it. We could check >= 3 or if the left and right cameras are left/right stereo etc. decided to go with the simple test for now. Change 3631322 by Jeff.Fisher UEVR-909 PIP in Garbage Matte -Added ExternalGarbageMatteActor to MixedRealityGarbageMatteCaptureComponent and exposed it to blueprint though MixedRealityCaptureComponent. This lets us switch from using the normal mixed reality component save/load garbage matte data and instead use an external actor, in this case the actor we use to setup the garbage matte. Then the mask is able to capture that actor live as it is edited. -Also implemented GetViewOwner() so that we can use SetOwnerOnlySee to prevent other cameras and captures from seeing the garbage matte actor. -Calibration level now uses the external garbage matte actor to let the garbate matte mask live update. It also does a picture-in-picture preview of the mixed reality scene. 'P' can show/hide the garbage matte actor on that PIP preview. -Added SetUnmaskedPixelHighlightColor to MixedRealityCaptureComponent and the material. With this one can make unmasked video pixels more obvious in the output. The calibration level has this mapped to shift-P and makes pixels bright yellow to white. -Added blueprint to calibration level to make the garbage matte actor visible in the mixed reality capture. That is bound to ctrl-g. -GarbageMatteActors spawned by the mixed reality capture component are now attached to the vr origin. The calibration level now saves garbage matte mesh transforms relative to the vr origin. -The garbage matte mesh is now plugin content, and is referenced in the mixedrealitycomponent default object, so it is cooked in any project that includes the plugin. -Fog and AtmosphericFog no longer affect the garbage matte mask capture... there may be other things we need to turn off there. #review-3618345 #jira UEVR-909 Change 3631362 by Keli.Hlodversson #jira UE-49418 Exiting Google Instant Preview displays half of the editor viewport as black. Note convoluted fix: passing bIsStereoScopic3D to IsActiveThisFrame. ISceneViewExtension code cannot rely on StereoRenderingDevice->IsStereoEnabled to know whether to render in stereo, as the current viewport widget may disable it. This was not a problem before the refactoring, as HMD-related viewextensions were only added to the active list after establishing that stereo indeed was enabled and allowed by the current view port widget. Change 3631887 by Jeff.Fisher Fixing IsActiveThisFrame build break. Change 3632206 by Nick.Atamas Fix for UE-49413. Registering FOculusHMD as an extensions the same way as others: now creates an XRCamera that passes all the calls back to the HMD. Change 3632264 by Nick.Whiting Fix for Vive rendering getting cropped off due to invalid subrect values being submitted to the compositor. Change 3632340 by Nick.Atamas Merged in change from Loren; opted for our solution to ViewExtensions instead of the one in the changelist. Original description below. Change 3632214 by Loren.McQuade@Loren.McQuade_Dev-VR on 2017/09/07 19:51:29 *pending* [Dev-VR] Added OculusHMD_SceneViewExtension, PlayerPosition/PlayerOrientation values, FOculusHMD::GetRelativeEyePose cross-eyed madness (CL 3631541, 3631687) Change 3632353 by Ryan.Vance #jira UE-49468 Don't apply xr camera rotation on the player controller when not using xr tracking. Change 3632735 by Keli.Hlodversson Better fix for #jira UE-49413. Revert oculus xr camera code and use that one can have more than one view extension registered instead. Use GetPriority to have the OculusHMD view extension code execute after the default xr camera. The xr camera subclass did not forward the calls to ISceneViewExtension to the parent, breaking various functionality such as late update. Fixes a crash when entering VR pie twice, back to back. Change 3632752 by Keli.Hlodversson Applying change 3632592 by Loren.McQuade@Loren.McQuade_Dev-VR_Branch on 2017/09/08 02:08:22 [Dev-VR] Push //UE4/Partner-Oculus@3632591 #rb merge //UE4/Partner-Oculus to //UE4/Dev-VR/... Reverted OculusHMD_XRCamera changes, as that clas has been removed in the interim. Change 3633211 by Mike.Beach Backing out Oculus MotionController hiding that accidently got submitted - we decided not to adopt this change originally. Change 3633315 by Jeff.Fisher merge from main with dev-platform problem children -expecting SDRBackBuffer stuff to be wrong. Change 3634006 by Mike.Beach Resurecting Oculus clip plane settings which got dropped in the IXR refactor. #jira UE-49520 Change 3634639 by Keli.Hlodversson Avoid include cycle https://ec-01.epicgames.net/commander/link/jobStepDetails/jobSteps/68863219?stepName=UE4Editor%20Static%20Analysis%20Win64%20%28IncludeTool%29&jobId=7995809&jobName=UE4%20Dev-VR%20-%20CL%203632752%20-%20Nightly%20Build&tabGroup=diagnosticHeader&firstPage=1 Change 3634641 by Jeff.Fisher UE-49535 Lighting is blown out when playing in VR Preview on Vive -Need pixel format to be PF_B8G8R8A8 for vr, now the plugins all build their render target and use that format. #review-3634623 Change 3634682 by Jeff.Fisher IHeadMountedDisplay forward declarations needed. Change 3634690 by Ryan.Vance We can't override the screen percentage when rendering for stereo #jira UE-49287 Change 3635970 by Keli.Hlodversson #jira UE-49563 Crash while opening QA-Game Referencing SharedPointer.h Verify that StereoRendering is valid before calling IsStereoEnabled() Change 3635979 by Mike.Beach CIS static analysis fix - checking a ptr for null before we use it. #jira UE-49531 Change 3636059 by Mike.Beach Fixing XR system name aliasing for the -hmd command. [CL 3638830 by Ryan Vance in Main branch]
2017-09-12 11:27:30 -04:00
#include "Engine/Engine.h"
Copying //UE4/Dev-VR to //UE4/Dev-Main (Source: //UE4/Dev-VR @ 3383750) #lockdown Nick.Penwarden ========================== MAJOR FEATURES + CHANGES ========================== Change 3012064 on 2016/06/13 by Nick.Whiting Merging Main -> DevVR Change 3048060 on 2016/07/13 by Nick.Whiting Integrating CL 3045721 from //depot/Partners/Google/AndroidVR-DevVR Upgrade Android and iOS GVR SDK to the latest. Fix the flipped vignette issue when using Unreal's post processing distortion. Change the Daydream & Cardboard mode to use scanline racing. Deprecate the ability to turn off individual UI elements. Change 3235307 on 2016/12/14 by Keli.Hlodversson Filter out excluded HMD modules during FEngineLoop:PreInitHMDDevice. The final selection still happens in UEngine::InitializeHMDDevice as all HMD plugins have not been loaded during PreInit Change 3235308 on 2016/12/14 by Ryan.Vance #jira UEVR-478 Monoscopic far field improvements Shader changes are now gated behind the read only cvar vr.MonoscopicFarField. Changing this requires a shader compile. Moved the mono rendering mode to the cvar vr.MonoscopicFarFieldMode. This is writable, so users can enable/disable mono rendering on the fly if the above cvar is enabled. Only write to the alpha channel in the mobile base pass if the object is opaque and MONOSCOPIC_FAR_FIELD is defined. Addressed code review comments. Change 3235397 on 2016/12/14 by Keli.Hlodversson [Oculus] Only enable GearVR platform on Windows if Oculus service is running Original author: Loren.McQuade Change 3235762 on 2016/12/14 by Keli.Hlodversson Add explicit parentheses to placate the build bots. Change 3242318 on 2016/12/21 by Ryan.Vance Working around pixel density crash. Change 3242522 on 2016/12/21 by Ryan.Vance Missing flag clear so our adaptive test was always returning true. Change 3243173 on 2016/12/22 by Ryan.Vance Integrating post present callback implementation from 4.14.1 Change 3248633 on 2017/01/05 by Keli.Hlodversson Copying //Tasks/UE4/Dev-VR-Refactoring to Dev-VR-Minimal (//UE4/Dev-VR-Minimal) Change 3248723 on 2017/01/05 by Keli.Hlodversson Fix after merge. EnablePositionalTracking no longer exists. Change 3249484 on 2017/01/06 by Keli.Hlodversson Add missing includes Change 3249714 on 2017/01/06 by Keli.Hlodversson Remove monolithic header include Change 3249980 on 2017/01/06 by Keli.Hlodversson SteamVR: Remove leftover unused WindowMirrorMode member variable Change 3252432 on 2017/01/10 by Keli.Hlodversson Submitting change by Loren McQuade to fix monolithic builds. Unshelved from pending changelist '3251436': Change 3257373 on 2017/01/13 by Keli.Hlodversson #jira UEVR-411: Finish renaming/removing/remodelling the remaining Oculus (Rift+GearVR) commands #jira UEVR-412: Rename and merge remaining Morpheus console commands #jira UEVR-417: Remove Exec from IHeadMountedDisplay Change 3269971 on 2017/01/24 by Jeff.Fisher UEVR-498 move controller is missing world to meters UEVR-522 PS4 motion controller worldscale support. -Passing world to meters scale into getControllerOrientationAndPosition because the thing asking about it ought to be part of a world, and know what it should be. This also avoids making PS4 motion controllers dependent on the HMD. Note Google VR Controller doesn't do position, so doesnt' care about scale. Oculus already had internal threadsafe tracking of world scale, so I left that. Steam handles world scale below our input level. -Also adding PlayerIndex member to FSceneView so we can figure out which view the MotionControllerComponent should get its worldscale from for the late render thread update. #jira UEVR-498 #review-3384107 Change 3288308 on 2017/02/06 by Jeff.Fisher UEVR-517 Detect MotionController Connectivity -PS4 can only track 2 controllers and 1 hmd. Support for dealing with that is needed. -Also need to support multiple motion controller components mapped to a single controller. Licencees have done that before. -Created a new interface IMotionTrackingSystemManagement, and implements it for PS4Tracker on PS4. -Created a MotionTrackedDeviceFunctionLibrary to expose that interface to blueprint. -With those one can enable and disable tracking on ps4 controllers and query their state to stay within the controller tracking limit. -PS4Tracker also keeps a blackboard of the enable/disable state so that one can enable or disable controllers that have not been connected yet, and have them enable tracking or not when they are connected. -DS4 controller no longer jumps back to 000 if it loses tracking. #review-3384107 #jira UEVR-517 Change 3288309 on 2017/02/06 by Keli.Hlodversson Add file missing from CL#3257373. Change 3288311 on 2017/02/06 by Jeff.Fisher UEVR-517 Detect MotionController Connectivity - Test content. -tm-motionControllers has a third mode where all playstation motion controllers for player 0 are availalbe. You can toggle them to track or not with ctrl-P,G,L,R for pad, gun, leftmove, rightmove or with alt-P,G,L,R. Ctrl tests doing so via MotionControllerComponent. Alt tests doing so by player index and controller type enum. -ctrl-A disables tracking of all controllers -alt-A disables tracking of all controllers for player 0 -ctrl-D toggles enabling new controllers by default -Also fixed one button not working in one of the other test modes for the Aim (gun) controller. -The controller 'models' have an arrow out the front. It is black if disabled. Red if enabled, but no tracker is active, yellow if tracked but inertial only, and green if fully tracked by the camera. -This logic is in the QA_MoCoAll blueprint. Change 3291601 on 2017/02/07 by Jeff.Fisher UEVR-536 PSVR motion controller tracking problem with multiple controllers -Previous code called GetRelativeTransform from the render thread, but the game thread could update it at any time. This caches that transform so that it can be safely used in the render thread. #jira UEVR-536 #review-3384107 @Ryan.Vance Change 3292460 on 2017/02/08 by Jeff.Fisher PS4 sceVrTrackerGetResult() error warning logging improved, and explanatory comment added. Change 3308771 on 2017/02/17 by Keli.Hlodversson Rename GoogleVR console commands #jira UEVR-412 Change 3309156 on 2017/02/17 by Keli.Hlodversson Track changes in r.ScreenPercentage on GoogleVR and set RenderTargetSize accordingly. Change 3311999 on 2017/02/20 by Keli.Hlodversson Create a default implementation for RecordAnalytics. Also create an initial stub for FHeadMountedDisplayBase for future default implementations of common HMD functionality. Make implementing IHeadMountedDisplay::GetDeviceName mandatory instead of defaulting to "Unknown" #jira UE-21878 #jira UEVR-213 Change 3313467 on 2017/02/20 by Ryan.Vance #jira UE-41604 3278583 pCustomPresent->AllocateRenderTargetTexture may return false, if we blindly return true we can end up with an invalid render target since the fall back sceneviewport will be skipped. 3278536 Adding ovrError_NoHmd to our sanity check in OnStartGameFrame. Change 3314002 on 2017/02/21 by Keli.Hlodversson Fix compilation on PS4 and Linux Change 3326722 on 2017/03/01 by Jeff.Fisher Merging //UE4/Dev-Main to Dev-VR (//UE4/Dev-VR) Integrating 4.15 from main. Change 3327567 on 2017/03/01 by Jeff.Fisher UEVR-588 Oculus crash on "stereo on" when the proximity sensor is not triggered. Duplicating from Release-4.15 cl 3327481, 3327542 -Don't ovr_SubmitFrame when the layers need to be recreated. They stay dirty until rendering is unpaused. #jira UEVR-588 #review-3384107 Change 3328098 on 2017/03/01 by Jeff.Fisher 4.15 merge fixes -Fixed deprecated enum name function usage. -Fixed world scale usage in GoogleVRController. -Fixed compile break in PS4Tracker. Change 3328271 on 2017/03/01 by Jeff.Fisher 2.15 merge -restroging GoogleVRController::GetWorldToMetersScale... cause it is used everywhere. Change 3328307 on 2017/03/01 by Jeff.Fisher 4.15 merge -More googlevr worldscale fixes. Change 3328312 on 2017/03/01 by Jeff.Fisher 4.15 merge -removing 2 unused includes Change 3330610 on 2017/03/02 by Jeff.Fisher 4.15 merge -fixing linux build Change 3333952 on 2017/03/06 by Keli.Hlodversson Implement common stereo layer management base class and use it in SteamVR and PS4. Fixes an outstanding bug in SteamVR where texures are updated every frame regardles of whether the continous update flag is set or not. #jira UEVR-628 #jira UE-42555 Change 3334961 on 2017/03/07 by Keli.Hlodversson Add missing include to fix non-unity builds Change 3336200 on 2017/03/07 by Keli.Hlodversson Fix compilation issues. (https://ec-01.epicgames.net/commander/link/jobDetails/jobs/7568252?jobName=UE4+Dev-VR+-+CL+3334961+-+Nightly+Build&s=Jobs) * Pre VS2015 compilers don't like mixing wide and unmarked strings in concatenation. Unfortunately LOCTEXT hides the call to the TEXT macro, completely hinding the prefix (which only gets added to the first fragment.) * Switch apparently doesn't know how to format a size_t for analytics either. Also: Typo in backwards compatibility command name alias Change 3337347 on 2017/03/08 by Jeff.Fisher UE-42631 Stereo off while prox sensor uncovered causes low framerate -Setting maxfps appropriately on 'stereo on/off'. #review-3384107 #jira UE-42631 Change 3338385 on 2017/03/08 by Ryan.Vance r.DisableDistortion was only being used for the mobile renderer Change 3342301 on 2017/03/10 by patrickr.donovan Test updates to TM-VRSmoke. Increased lightmap resolution on QA_MeshTypes meshes to improve readbility and reliablility of tests involving said asset. Rebuilt lighting. Change 3348133 on 2017/03/15 by Ryan.Vance Moving mono cvars to scene rendering to avoid cross module references. There's not a good reason to have them in the hmd module anyway. Change 3348836 on 2017/03/15 by Ryan.Vance Direct multi-view support for gear vr Monoscopic far field with multi-view (blit and direct) support for gear vr Support for translucent objects on both sides of the mono clip plane (due to a sorting issue, objects that straddle the plane composite incorrectly) Fixed missing discards/clears in the multi-view blit Change 3348843 on 2017/03/15 by Ryan.Vance Fixing color/depth target size mismatch when screen percentage scaling results in a size that isn't divisible by 16. Change 3349276 on 2017/03/16 by Keli.Hlodversson Fixing compile errors in GoogleVR after merge from main. Change 3350932 on 2017/03/16 by Ryan.Vance Re-enabling the gearvr plugin on windows. Change 3351977 on 2017/03/17 by Jeff.Fisher Fixing masked member variable. Change 3352314 on 2017/03/17 by Ryan.Vance We need to ensure that we don't select different lod levels for each eye. Change 3352993 on 2017/03/17 by Nick.Whiting Integrating CL 3345824 from Android-DevVR to Dev-VR. Support for device depth pass in SceneCaptureComponent2D Change 3355185 on 2017/03/20 by Nick.Whiting Added ability to disable the autoloading splash screen, which would prevent the hide splash screen node from ever working Change 3355676 on 2017/03/20 by Nick.Whiting PR #3384: [GNUX] SteamVR, OpenGL patch. (Contributed by yaakuro), with some minor modifications Change 3357286 on 2017/03/21 by Jeff.Fisher Fixing GenerateProjectFiles, looks like the .config. was removed from these references in main some time ago. Change 3357435 on 2017/03/21 by Jeff.Fisher Fixing editor build break, looks like a merge mistake. Change 3359960 on 2017/03/23 by Keli.Hlodversson Prevent potential crash when drawing tracking sensor location. Also only fetch HMD location once instead of once per tracking sensor. Change 3361230 on 2017/03/23 by Jeff.Fisher Fixing linux build opengl include problem... maybe. Change 3361638 on 2017/03/23 by Jeff.Fisher Another guess at fixing linux build. Change 3364224 on 2017/03/24 by Keli.Hlodversson Initial implementation of UEVR-576 - Base emulated layer implementation #jira UEVR-668 - Base emulated layer implementation: Initial framework for overrideable default implementation #jira UEVR-669 - Base emulated layer implementation: Face Locked Layers Support #jira UEVR-670 - Base emulated layer implementation: Tracker Locked Layers Support #jira UEVR-671 - Base emulated layer implementation: World Locked Layers Support #jira UEVR-672 - Base emulated layer implementation: Add support for optionally rendering face locked layers into a separate layer Change 3364242 on 2017/03/24 by Keli.Hlodversson SteamVR layers do not support negatve Layer priorities Change 3364263 on 2017/03/24 by Jeff.Fisher Merging //UE4/Dev-Main to Dev-VR (//UE4/Dev-VR) Monoscopicfarfieldrendering was just 'accept source', Ryan is going to look at fixing it up. Change 3364472 on 2017/03/24 by Jeff.Fisher Merge fix Change 3364475 on 2017/03/24 by Jeff.Fisher Fixing gearvr include. Change 3364486 on 2017/03/24 by Jeff.Fisher merge fix Change 3364532 on 2017/03/24 by Ryan.Vance pso update for mono rendering and stereo layers. Change 3364599 on 2017/03/24 by Ryan.Vance Oculus changes for SI1.12 Change 3365159 on 2017/03/26 by Jeff.Fisher include fix Change 3365182 on 2017/03/26 by Jeff.Fisher include fix Change 3366087 on 2017/03/27 by Ryan.Vance Remaining files from Oculus changes for SI1.12 merge request. Fixing a bug in OnlineSubsystem. Temporarily changing the eye padding change to be a shader clear to work around a clear color binding issue. Change 3366492 on 2017/03/27 by Ryan.Vance #jira UE-43294 Moved the clear before we setup state for drawing the mirror window content. It was stomping over state after the pso changes. Going to leave the shader clear in the rift prerender for clearing the eye padding for now. Change 3366929 on 2017/03/27 by Ryan.Vance Fixing compile error Change 3368549 on 2017/03/28 by Jeff.Fisher Merging Change: 3357998 from //UE4/Partner-Google-VR/Engine/... to Dev-VR Upgrade Google VR Plugin to v1.3: *Upgraded GVR NDK to 1.30.0 *Changed some BlueprintFunction to use BlueprintPure *Add the missing bDaydream flag in UEDeployAndroid.cs #review-3384107 Change 3368975 on 2017/03/28 by Ryan.Vance CIS clean up #jira UE-43428, UE-43429, UE-43426, UE-43427 Change 3369028 on 2017/03/28 by Ryan.Vance This is not exacly 'correct', but it's at least what the code was trying to do. Change 3370203 on 2017/03/29 by Ryan.Vance Adding gear vr controller component support. Change 3370918 on 2017/03/29 by Ryan.Vance Merging 3370569 using Partner-Google-VR_to_DevVR Change 3371030 on 2017/03/29 by Ryan.Vance Fixing linux build errors #jira UE-43426 Change 3371036 on 2017/03/29 by Ryan.Vance Oculus 4.16 integration. Not terribly happy with the use of std::string. They promised to clean this up for the next release. Change 3373495 on 2017/03/30 by Jeff.Fisher Merging from Dev-Main, in preparation for 4.16 Change 3373578 on 2017/03/30 by Jeff.Fisher build break, one comma short Change 3373870 on 2017/03/31 by Jeff.Fisher Include order fix. Change 3374001 on 2017/03/31 by Keli.Hlodversson Use DefaultStereoLayers as base for Morpheus implementation. #jira UEVR-709 #jira UE-42919 #rb: Jeff.Fisher Change 3374004 on 2017/03/31 by Keli.Hlodversson Fix rendering for the default Stereo Layers implementation on mobile. Depth test was set to "Never" instead of "Always" Destination texture on GLES is flipped on the Y axis, the coordinates are reversed in the shade when compiled on the relevant platforms. Change 3375125 on 2017/03/31 by Jeff.Fisher UE-43506 Ensure using VRPreview with GoogleVR -Removed the ensure, there is code in there to handle that case, and it works. #jira UE-43506 Change 3375294 on 2017/03/31 by nick.bullard Resaving Plugin content to resovle "saved with empty engine version" #jira UE-43537 Change 3375480 on 2017/03/31 by Jeff.Fisher UEVR-9 PSVR: Social Screen Support -Experimental social screen support for 4.16. -This does the basics of driving output through the Aux port in the proper format for display on the mirror monitor. -Only supports 30fps on the mirror monitor. 60fps will require the implementation of sony system dialogs to deal with incompatable system features (video streaming, remote play). -There is a project setting in Morpheus, under experiemental bEnableSocialScreenSeparateMode. This must be set to true to use this feature. When it is false we avoid allocating the back buffers. -MorpheusFunctionLibrary blueprints now have a node "SetSocialScreenMode" which can switch between SystemMirror (hardware supported mirroring), SeparateTest (alternates black and white), SeparateTexture (displays a texture, eg a render target, specified via blueprint), and SeparateMirror(puts the hmd render buffer on screen - which is both eyes, like a debug mode). -Also finally updated the bEnabled flag in project settings to tell people it's only for PC. #jira UEVR-9 #review-3384107 Change 3375540 on 2017/03/31 by Ryan.Vance #jira UE-43504 Fixing android build break when using a 64 bit isa. Change 3375655 on 2017/03/31 by Jeff.Fisher Fixing missing RGBAToYUV shader problem -This at least unblocks our process. Will revisit before zbr. Change 3375820 on 2017/04/01 by Jeff.Fisher Fixing linux build warning about HAS_MORPHEUS Change 3376050 on 2017/04/02 by Jeff.Fisher UE-43515 Step 'UE4Editor Static Analysis Win64' - Module.OnlineSubsystemOculus.cpp Warnings -Temporary fix for static analysis annotation warnings in OnlineSubsytemOculus. Longer term plan is to eliminate the use of the headers that trigger the warnings. -Just wrap all standard headers in static analysis disables. #jira UE-43515 Change 3376609 on 2017/04/03 by Jeff.Fisher Fixing rgbatoyuvshader include. Change 3377001 on 2017/04/03 by Jeff.Fisher UE-43547 Launch On PS4 fails during Run command - Missing global shader FRGBAToYUV420CS - shader c++ must be compiled so that it can be cooked for ps4. #jira UE-43547 Change 3379858 on 2017/04/04 by Jeff.Fisher Merging //UE4/Dev-Main to Dev-VR (//UE4/Dev-VR) pulling main this should get us ps4 sdk 4.508 Change 3379938 on 2017/04/04 by Ryan.Vance #jira UE-43548 If stereo layers are not being used, don't setup overlay targets as we will never clear/initialize them. The clear happens as part of the default layers PostRenderView_RenderThread call which wont be called if layers aren't being used in the scene. Change 3381519 on 2017/04/05 by Jeff.Fisher UEVR-733 PS4 sdk 4.500 hmd connection api changes break hmd connect. -Handling failure of sceHmdGetDeviceInformation if the hmd is powered off. It now returns an error code about an invalid handle in that case, rather than reporting unready. We just treat the error code like an unready status. #jira UEVR-733 #review-3384107 Change 3382019 on 2017/04/05 by Ryan.Vance Linux: add Vulkan support from dev editor: 3381593 Change 3382021 on 2017/04/05 by Ryan.Vance SteamVR on Linux using Vulkan OpenVR rev to 1_0_6 PR #3412: [GNUX] Initial support for SteamVR using Vulkan on GNUX platform. (Contributed by yaakuro) Change 3382076 on 2017/04/05 by Ryan.Vance Fixing linux steamvr lib path. It changed to something less silly in 1.0.6 Removing the steamvr plugin from the white list for linux. It's looking for a runtime that no one will have installed. Change 3383237 on 2017/04/06 by Ryan.Vance #jira UE-43732 Fixing Android compile issues. We can't wrap portions of a macro with a definie. This should probably be some sort of recursive macro thing since there's so much overlap. Good enough for now. Change 3383353 on 2017/04/06 by Ryan.Vance Fixing include cycles. Change 3383509 on 2017/04/06 by Jeff.Fisher Merging //UE4/Dev-Main to Dev-VR (//UE4/Dev-VR) merging the stuff from dev-mobile [CL 3384106 by Ryan Vance in Main branch]
2017-04-06 22:03:51 -04:00
#include "RendererInterface.h"
#include "StereoLayerRendering.h"
#include "RHIStaticStates.h"
#include "StaticBoundShaderState.h"
#include "PipelineStateCache.h"
#include "ClearQuad.h"
#include "SceneView.h"
#include "CommonRenderResources.h"
#include "IXRLoadingScreen.h"
Copying //UE4/Dev-VR to //UE4/Dev-Main (Source: //UE4/Dev-VR @ 3383750) #lockdown Nick.Penwarden ========================== MAJOR FEATURES + CHANGES ========================== Change 3012064 on 2016/06/13 by Nick.Whiting Merging Main -> DevVR Change 3048060 on 2016/07/13 by Nick.Whiting Integrating CL 3045721 from //depot/Partners/Google/AndroidVR-DevVR Upgrade Android and iOS GVR SDK to the latest. Fix the flipped vignette issue when using Unreal's post processing distortion. Change the Daydream & Cardboard mode to use scanline racing. Deprecate the ability to turn off individual UI elements. Change 3235307 on 2016/12/14 by Keli.Hlodversson Filter out excluded HMD modules during FEngineLoop:PreInitHMDDevice. The final selection still happens in UEngine::InitializeHMDDevice as all HMD plugins have not been loaded during PreInit Change 3235308 on 2016/12/14 by Ryan.Vance #jira UEVR-478 Monoscopic far field improvements Shader changes are now gated behind the read only cvar vr.MonoscopicFarField. Changing this requires a shader compile. Moved the mono rendering mode to the cvar vr.MonoscopicFarFieldMode. This is writable, so users can enable/disable mono rendering on the fly if the above cvar is enabled. Only write to the alpha channel in the mobile base pass if the object is opaque and MONOSCOPIC_FAR_FIELD is defined. Addressed code review comments. Change 3235397 on 2016/12/14 by Keli.Hlodversson [Oculus] Only enable GearVR platform on Windows if Oculus service is running Original author: Loren.McQuade Change 3235762 on 2016/12/14 by Keli.Hlodversson Add explicit parentheses to placate the build bots. Change 3242318 on 2016/12/21 by Ryan.Vance Working around pixel density crash. Change 3242522 on 2016/12/21 by Ryan.Vance Missing flag clear so our adaptive test was always returning true. Change 3243173 on 2016/12/22 by Ryan.Vance Integrating post present callback implementation from 4.14.1 Change 3248633 on 2017/01/05 by Keli.Hlodversson Copying //Tasks/UE4/Dev-VR-Refactoring to Dev-VR-Minimal (//UE4/Dev-VR-Minimal) Change 3248723 on 2017/01/05 by Keli.Hlodversson Fix after merge. EnablePositionalTracking no longer exists. Change 3249484 on 2017/01/06 by Keli.Hlodversson Add missing includes Change 3249714 on 2017/01/06 by Keli.Hlodversson Remove monolithic header include Change 3249980 on 2017/01/06 by Keli.Hlodversson SteamVR: Remove leftover unused WindowMirrorMode member variable Change 3252432 on 2017/01/10 by Keli.Hlodversson Submitting change by Loren McQuade to fix monolithic builds. Unshelved from pending changelist '3251436': Change 3257373 on 2017/01/13 by Keli.Hlodversson #jira UEVR-411: Finish renaming/removing/remodelling the remaining Oculus (Rift+GearVR) commands #jira UEVR-412: Rename and merge remaining Morpheus console commands #jira UEVR-417: Remove Exec from IHeadMountedDisplay Change 3269971 on 2017/01/24 by Jeff.Fisher UEVR-498 move controller is missing world to meters UEVR-522 PS4 motion controller worldscale support. -Passing world to meters scale into getControllerOrientationAndPosition because the thing asking about it ought to be part of a world, and know what it should be. This also avoids making PS4 motion controllers dependent on the HMD. Note Google VR Controller doesn't do position, so doesnt' care about scale. Oculus already had internal threadsafe tracking of world scale, so I left that. Steam handles world scale below our input level. -Also adding PlayerIndex member to FSceneView so we can figure out which view the MotionControllerComponent should get its worldscale from for the late render thread update. #jira UEVR-498 #review-3384107 Change 3288308 on 2017/02/06 by Jeff.Fisher UEVR-517 Detect MotionController Connectivity -PS4 can only track 2 controllers and 1 hmd. Support for dealing with that is needed. -Also need to support multiple motion controller components mapped to a single controller. Licencees have done that before. -Created a new interface IMotionTrackingSystemManagement, and implements it for PS4Tracker on PS4. -Created a MotionTrackedDeviceFunctionLibrary to expose that interface to blueprint. -With those one can enable and disable tracking on ps4 controllers and query their state to stay within the controller tracking limit. -PS4Tracker also keeps a blackboard of the enable/disable state so that one can enable or disable controllers that have not been connected yet, and have them enable tracking or not when they are connected. -DS4 controller no longer jumps back to 000 if it loses tracking. #review-3384107 #jira UEVR-517 Change 3288309 on 2017/02/06 by Keli.Hlodversson Add file missing from CL#3257373. Change 3288311 on 2017/02/06 by Jeff.Fisher UEVR-517 Detect MotionController Connectivity - Test content. -tm-motionControllers has a third mode where all playstation motion controllers for player 0 are availalbe. You can toggle them to track or not with ctrl-P,G,L,R for pad, gun, leftmove, rightmove or with alt-P,G,L,R. Ctrl tests doing so via MotionControllerComponent. Alt tests doing so by player index and controller type enum. -ctrl-A disables tracking of all controllers -alt-A disables tracking of all controllers for player 0 -ctrl-D toggles enabling new controllers by default -Also fixed one button not working in one of the other test modes for the Aim (gun) controller. -The controller 'models' have an arrow out the front. It is black if disabled. Red if enabled, but no tracker is active, yellow if tracked but inertial only, and green if fully tracked by the camera. -This logic is in the QA_MoCoAll blueprint. Change 3291601 on 2017/02/07 by Jeff.Fisher UEVR-536 PSVR motion controller tracking problem with multiple controllers -Previous code called GetRelativeTransform from the render thread, but the game thread could update it at any time. This caches that transform so that it can be safely used in the render thread. #jira UEVR-536 #review-3384107 @Ryan.Vance Change 3292460 on 2017/02/08 by Jeff.Fisher PS4 sceVrTrackerGetResult() error warning logging improved, and explanatory comment added. Change 3308771 on 2017/02/17 by Keli.Hlodversson Rename GoogleVR console commands #jira UEVR-412 Change 3309156 on 2017/02/17 by Keli.Hlodversson Track changes in r.ScreenPercentage on GoogleVR and set RenderTargetSize accordingly. Change 3311999 on 2017/02/20 by Keli.Hlodversson Create a default implementation for RecordAnalytics. Also create an initial stub for FHeadMountedDisplayBase for future default implementations of common HMD functionality. Make implementing IHeadMountedDisplay::GetDeviceName mandatory instead of defaulting to "Unknown" #jira UE-21878 #jira UEVR-213 Change 3313467 on 2017/02/20 by Ryan.Vance #jira UE-41604 3278583 pCustomPresent->AllocateRenderTargetTexture may return false, if we blindly return true we can end up with an invalid render target since the fall back sceneviewport will be skipped. 3278536 Adding ovrError_NoHmd to our sanity check in OnStartGameFrame. Change 3314002 on 2017/02/21 by Keli.Hlodversson Fix compilation on PS4 and Linux Change 3326722 on 2017/03/01 by Jeff.Fisher Merging //UE4/Dev-Main to Dev-VR (//UE4/Dev-VR) Integrating 4.15 from main. Change 3327567 on 2017/03/01 by Jeff.Fisher UEVR-588 Oculus crash on "stereo on" when the proximity sensor is not triggered. Duplicating from Release-4.15 cl 3327481, 3327542 -Don't ovr_SubmitFrame when the layers need to be recreated. They stay dirty until rendering is unpaused. #jira UEVR-588 #review-3384107 Change 3328098 on 2017/03/01 by Jeff.Fisher 4.15 merge fixes -Fixed deprecated enum name function usage. -Fixed world scale usage in GoogleVRController. -Fixed compile break in PS4Tracker. Change 3328271 on 2017/03/01 by Jeff.Fisher 2.15 merge -restroging GoogleVRController::GetWorldToMetersScale... cause it is used everywhere. Change 3328307 on 2017/03/01 by Jeff.Fisher 4.15 merge -More googlevr worldscale fixes. Change 3328312 on 2017/03/01 by Jeff.Fisher 4.15 merge -removing 2 unused includes Change 3330610 on 2017/03/02 by Jeff.Fisher 4.15 merge -fixing linux build Change 3333952 on 2017/03/06 by Keli.Hlodversson Implement common stereo layer management base class and use it in SteamVR and PS4. Fixes an outstanding bug in SteamVR where texures are updated every frame regardles of whether the continous update flag is set or not. #jira UEVR-628 #jira UE-42555 Change 3334961 on 2017/03/07 by Keli.Hlodversson Add missing include to fix non-unity builds Change 3336200 on 2017/03/07 by Keli.Hlodversson Fix compilation issues. (https://ec-01.epicgames.net/commander/link/jobDetails/jobs/7568252?jobName=UE4+Dev-VR+-+CL+3334961+-+Nightly+Build&s=Jobs) * Pre VS2015 compilers don't like mixing wide and unmarked strings in concatenation. Unfortunately LOCTEXT hides the call to the TEXT macro, completely hinding the prefix (which only gets added to the first fragment.) * Switch apparently doesn't know how to format a size_t for analytics either. Also: Typo in backwards compatibility command name alias Change 3337347 on 2017/03/08 by Jeff.Fisher UE-42631 Stereo off while prox sensor uncovered causes low framerate -Setting maxfps appropriately on 'stereo on/off'. #review-3384107 #jira UE-42631 Change 3338385 on 2017/03/08 by Ryan.Vance r.DisableDistortion was only being used for the mobile renderer Change 3342301 on 2017/03/10 by patrickr.donovan Test updates to TM-VRSmoke. Increased lightmap resolution on QA_MeshTypes meshes to improve readbility and reliablility of tests involving said asset. Rebuilt lighting. Change 3348133 on 2017/03/15 by Ryan.Vance Moving mono cvars to scene rendering to avoid cross module references. There's not a good reason to have them in the hmd module anyway. Change 3348836 on 2017/03/15 by Ryan.Vance Direct multi-view support for gear vr Monoscopic far field with multi-view (blit and direct) support for gear vr Support for translucent objects on both sides of the mono clip plane (due to a sorting issue, objects that straddle the plane composite incorrectly) Fixed missing discards/clears in the multi-view blit Change 3348843 on 2017/03/15 by Ryan.Vance Fixing color/depth target size mismatch when screen percentage scaling results in a size that isn't divisible by 16. Change 3349276 on 2017/03/16 by Keli.Hlodversson Fixing compile errors in GoogleVR after merge from main. Change 3350932 on 2017/03/16 by Ryan.Vance Re-enabling the gearvr plugin on windows. Change 3351977 on 2017/03/17 by Jeff.Fisher Fixing masked member variable. Change 3352314 on 2017/03/17 by Ryan.Vance We need to ensure that we don't select different lod levels for each eye. Change 3352993 on 2017/03/17 by Nick.Whiting Integrating CL 3345824 from Android-DevVR to Dev-VR. Support for device depth pass in SceneCaptureComponent2D Change 3355185 on 2017/03/20 by Nick.Whiting Added ability to disable the autoloading splash screen, which would prevent the hide splash screen node from ever working Change 3355676 on 2017/03/20 by Nick.Whiting PR #3384: [GNUX] SteamVR, OpenGL patch. (Contributed by yaakuro), with some minor modifications Change 3357286 on 2017/03/21 by Jeff.Fisher Fixing GenerateProjectFiles, looks like the .config. was removed from these references in main some time ago. Change 3357435 on 2017/03/21 by Jeff.Fisher Fixing editor build break, looks like a merge mistake. Change 3359960 on 2017/03/23 by Keli.Hlodversson Prevent potential crash when drawing tracking sensor location. Also only fetch HMD location once instead of once per tracking sensor. Change 3361230 on 2017/03/23 by Jeff.Fisher Fixing linux build opengl include problem... maybe. Change 3361638 on 2017/03/23 by Jeff.Fisher Another guess at fixing linux build. Change 3364224 on 2017/03/24 by Keli.Hlodversson Initial implementation of UEVR-576 - Base emulated layer implementation #jira UEVR-668 - Base emulated layer implementation: Initial framework for overrideable default implementation #jira UEVR-669 - Base emulated layer implementation: Face Locked Layers Support #jira UEVR-670 - Base emulated layer implementation: Tracker Locked Layers Support #jira UEVR-671 - Base emulated layer implementation: World Locked Layers Support #jira UEVR-672 - Base emulated layer implementation: Add support for optionally rendering face locked layers into a separate layer Change 3364242 on 2017/03/24 by Keli.Hlodversson SteamVR layers do not support negatve Layer priorities Change 3364263 on 2017/03/24 by Jeff.Fisher Merging //UE4/Dev-Main to Dev-VR (//UE4/Dev-VR) Monoscopicfarfieldrendering was just 'accept source', Ryan is going to look at fixing it up. Change 3364472 on 2017/03/24 by Jeff.Fisher Merge fix Change 3364475 on 2017/03/24 by Jeff.Fisher Fixing gearvr include. Change 3364486 on 2017/03/24 by Jeff.Fisher merge fix Change 3364532 on 2017/03/24 by Ryan.Vance pso update for mono rendering and stereo layers. Change 3364599 on 2017/03/24 by Ryan.Vance Oculus changes for SI1.12 Change 3365159 on 2017/03/26 by Jeff.Fisher include fix Change 3365182 on 2017/03/26 by Jeff.Fisher include fix Change 3366087 on 2017/03/27 by Ryan.Vance Remaining files from Oculus changes for SI1.12 merge request. Fixing a bug in OnlineSubsystem. Temporarily changing the eye padding change to be a shader clear to work around a clear color binding issue. Change 3366492 on 2017/03/27 by Ryan.Vance #jira UE-43294 Moved the clear before we setup state for drawing the mirror window content. It was stomping over state after the pso changes. Going to leave the shader clear in the rift prerender for clearing the eye padding for now. Change 3366929 on 2017/03/27 by Ryan.Vance Fixing compile error Change 3368549 on 2017/03/28 by Jeff.Fisher Merging Change: 3357998 from //UE4/Partner-Google-VR/Engine/... to Dev-VR Upgrade Google VR Plugin to v1.3: *Upgraded GVR NDK to 1.30.0 *Changed some BlueprintFunction to use BlueprintPure *Add the missing bDaydream flag in UEDeployAndroid.cs #review-3384107 Change 3368975 on 2017/03/28 by Ryan.Vance CIS clean up #jira UE-43428, UE-43429, UE-43426, UE-43427 Change 3369028 on 2017/03/28 by Ryan.Vance This is not exacly 'correct', but it's at least what the code was trying to do. Change 3370203 on 2017/03/29 by Ryan.Vance Adding gear vr controller component support. Change 3370918 on 2017/03/29 by Ryan.Vance Merging 3370569 using Partner-Google-VR_to_DevVR Change 3371030 on 2017/03/29 by Ryan.Vance Fixing linux build errors #jira UE-43426 Change 3371036 on 2017/03/29 by Ryan.Vance Oculus 4.16 integration. Not terribly happy with the use of std::string. They promised to clean this up for the next release. Change 3373495 on 2017/03/30 by Jeff.Fisher Merging from Dev-Main, in preparation for 4.16 Change 3373578 on 2017/03/30 by Jeff.Fisher build break, one comma short Change 3373870 on 2017/03/31 by Jeff.Fisher Include order fix. Change 3374001 on 2017/03/31 by Keli.Hlodversson Use DefaultStereoLayers as base for Morpheus implementation. #jira UEVR-709 #jira UE-42919 #rb: Jeff.Fisher Change 3374004 on 2017/03/31 by Keli.Hlodversson Fix rendering for the default Stereo Layers implementation on mobile. Depth test was set to "Never" instead of "Always" Destination texture on GLES is flipped on the Y axis, the coordinates are reversed in the shade when compiled on the relevant platforms. Change 3375125 on 2017/03/31 by Jeff.Fisher UE-43506 Ensure using VRPreview with GoogleVR -Removed the ensure, there is code in there to handle that case, and it works. #jira UE-43506 Change 3375294 on 2017/03/31 by nick.bullard Resaving Plugin content to resovle "saved with empty engine version" #jira UE-43537 Change 3375480 on 2017/03/31 by Jeff.Fisher UEVR-9 PSVR: Social Screen Support -Experimental social screen support for 4.16. -This does the basics of driving output through the Aux port in the proper format for display on the mirror monitor. -Only supports 30fps on the mirror monitor. 60fps will require the implementation of sony system dialogs to deal with incompatable system features (video streaming, remote play). -There is a project setting in Morpheus, under experiemental bEnableSocialScreenSeparateMode. This must be set to true to use this feature. When it is false we avoid allocating the back buffers. -MorpheusFunctionLibrary blueprints now have a node "SetSocialScreenMode" which can switch between SystemMirror (hardware supported mirroring), SeparateTest (alternates black and white), SeparateTexture (displays a texture, eg a render target, specified via blueprint), and SeparateMirror(puts the hmd render buffer on screen - which is both eyes, like a debug mode). -Also finally updated the bEnabled flag in project settings to tell people it's only for PC. #jira UEVR-9 #review-3384107 Change 3375540 on 2017/03/31 by Ryan.Vance #jira UE-43504 Fixing android build break when using a 64 bit isa. Change 3375655 on 2017/03/31 by Jeff.Fisher Fixing missing RGBAToYUV shader problem -This at least unblocks our process. Will revisit before zbr. Change 3375820 on 2017/04/01 by Jeff.Fisher Fixing linux build warning about HAS_MORPHEUS Change 3376050 on 2017/04/02 by Jeff.Fisher UE-43515 Step 'UE4Editor Static Analysis Win64' - Module.OnlineSubsystemOculus.cpp Warnings -Temporary fix for static analysis annotation warnings in OnlineSubsytemOculus. Longer term plan is to eliminate the use of the headers that trigger the warnings. -Just wrap all standard headers in static analysis disables. #jira UE-43515 Change 3376609 on 2017/04/03 by Jeff.Fisher Fixing rgbatoyuvshader include. Change 3377001 on 2017/04/03 by Jeff.Fisher UE-43547 Launch On PS4 fails during Run command - Missing global shader FRGBAToYUV420CS - shader c++ must be compiled so that it can be cooked for ps4. #jira UE-43547 Change 3379858 on 2017/04/04 by Jeff.Fisher Merging //UE4/Dev-Main to Dev-VR (//UE4/Dev-VR) pulling main this should get us ps4 sdk 4.508 Change 3379938 on 2017/04/04 by Ryan.Vance #jira UE-43548 If stereo layers are not being used, don't setup overlay targets as we will never clear/initialize them. The clear happens as part of the default layers PostRenderView_RenderThread call which wont be called if layers aren't being used in the scene. Change 3381519 on 2017/04/05 by Jeff.Fisher UEVR-733 PS4 sdk 4.500 hmd connection api changes break hmd connect. -Handling failure of sceHmdGetDeviceInformation if the hmd is powered off. It now returns an error code about an invalid handle in that case, rather than reporting unready. We just treat the error code like an unready status. #jira UEVR-733 #review-3384107 Change 3382019 on 2017/04/05 by Ryan.Vance Linux: add Vulkan support from dev editor: 3381593 Change 3382021 on 2017/04/05 by Ryan.Vance SteamVR on Linux using Vulkan OpenVR rev to 1_0_6 PR #3412: [GNUX] Initial support for SteamVR using Vulkan on GNUX platform. (Contributed by yaakuro) Change 3382076 on 2017/04/05 by Ryan.Vance Fixing linux steamvr lib path. It changed to something less silly in 1.0.6 Removing the steamvr plugin from the white list for linux. It's looking for a runtime that no one will have installed. Change 3383237 on 2017/04/06 by Ryan.Vance #jira UE-43732 Fixing Android compile issues. We can't wrap portions of a macro with a definie. This should probably be some sort of recursive macro thing since there's so much overlap. Good enough for now. Change 3383353 on 2017/04/06 by Ryan.Vance Fixing include cycles. Change 3383509 on 2017/04/06 by Jeff.Fisher Merging //UE4/Dev-Main to Dev-VR (//UE4/Dev-VR) merging the stuff from dev-mobile [CL 3384106 by Ryan Vance in Main branch]
2017-04-06 22:03:51 -04:00
namespace
{
/*=============================================================================
*
* Helper functions
*
*/
//=============================================================================
static FMatrix ConvertTransform(const FTransform& In)
{
const FQuat InQuat = In.GetRotation();
FQuat OutQuat(-InQuat.Y, -InQuat.Z, -InQuat.X, -InQuat.W);
const FVector InPos = In.GetTranslation();
FVector OutPos(InPos.Y, InPos.Z, InPos.X);
const FVector InScale = In.GetScale3D();
FVector OutScale(InScale.Y, InScale.Z, InScale.X);
return FTransform(OutQuat, OutPos, OutScale).ToMatrixWithScale() * FMatrix(
FPlane(0, 1, 0, 0),
FPlane(0, 0, 1, 0),
FPlane(1, 0, 0, 0),
FPlane(0, 0, 0, 1));
}
}
Copying //UE4/Dev-VR to //UE4/Dev-Main (Source: //UE4/Dev-VR @ 3636795) #lockdown Nick.Penwarden ============================ MAJOR FEATURES & CHANGES ============================ Change 2932765 by Nick.Whiting Merging updated license files for Oculus libraries Change 3480552 by Dustin.Holmes Added map and gamemode for calibration #jira UEVR-808 Change 3502253 by Nick.Whiting Trying to fix up p4's botch of the merge Change 3513736 by Keli.Hlodversson Move duplicated late update code into a common FLateUpdateManager #jira UEVR-893 Change 3514798 by Mike.Beach #4.17 Exposing a way for Blueprint users to remap the SteamVR controller's d-pad buttons (clashes with the Oculus mappings). #jira UE-42634 Change 3516042 by Dustin.Holmes Runtime handedness changes in Vive controllers are now reflected when a new device is connected. Device mappings are also reset when a device disconnects, so that if it connects again it fully reregisters instead of just assuming the role it previously had. Change 3517781 by Keli.Hlodversson Remove unused local variable bUseCustomPresentTexture Change 3517951 by Mike.Beach #4.17 Guarding against dereferencing a null pointer. Defaulting to the identity when we don't (yet) have a valid head pose to use. #jira UE-43685 Change 3518142 by Mike.Beach #4.17 Resolving fallout from bad merge (CL 3514868) - checking for teminating null in array (which was added to keep ARRAY_COUNT from acting on an empty array). Change 3523183 by Ryan.Vance #jira UE-46493, UEVR-661 Fixes GearVR only displaying a black screen on startup Fixes GearVR rendering incorrectly with mobile multi-view w/o direct mode enabled Adding mobile multi-view direct support to Daydream Change 3523718 by Nick.Whiting Adding core controller recentering delegate, and moving Google over to that system. Change 3527263 by Dan.Oconnor Mirror 3526925 for Nick Donaldson Change 3533596 by Dustin.Holmes Add garbage matte map, gamemode, and blueprints. Change 3533598 by Dustin.Holmes Expose the Set Tint Color and Opacity function for Widget Components as a Blueprint node. Change 3538139 by Mike.Beach Moving Oculus debug shader directly into Oculus plugin. #jira UE-47134 Change 3543185 by Nick.Atamas Address UEVR-891 : Merge in changes to Google Tango plugin. #jira UEVR-891 Change 3543285 by Nick.Atamas Merging using //UE4/Release-4.17/... -> //UE4/Dev-VR/... : Fixed UEVR-852: Adjusted Google Tango Plugins copyright to Copyright Google 2017. Removed Apache 2.0 license. Change 3545505 by Nick.Atamas Fix UEVR-851 : some fix-ups to MeshReconHUD and overlay material now has a material parameter for tinting the reconstructed mesh to help debug visualization. Change 3547549 by Jeff.Fisher Fixing DefaultSpectatorScreenController comment. Change 3551339 by Ryan.Vance #jira UE-44947 Editor primitives we not being handled correctly with ISR. Change 3554169 by Dustin.Holmes Reconcile missed Mixed Reality blueprint Change 3566825 by Mike.Beach Fixing some bad merges from Main (fallout from CL 3566309) Change 3567143 by Mike.Beach Copying //Tasks/UE4/Dev-MixedReality to Dev-VR-Minimal (//UE4/Dev-VR-Minimal) Change 3567572 by Mike.Beach [WIP] Adding some MR plugin dependencies to keep CIS quiet (SteamVR is just temporary, and will be removed). Change 3569116 by Jeff.Fisher Mixed reality build breaks for PS4 -Module is dependent on steamvr, so don't build it for PS4. -Removed unused class that doesn't compile with clang. Change 3569362 by Mike.Beach Organizing MR plugin content, to make way for new calibration modes. Change 3572802 by Jeff.Fisher UEVR-832 Add save/load system for calibrated camera settings -Moved MixedRealityConfigurationSaveGame to c++. #review-3571779 #jira UEVR-832 Change 3573864 by Mike.Beach [WIP] Initial work on MR cam alignment controller - records point/frustum data from user input. Change 3575900 by Jeff.Fisher Vive spectator flat rect expanded to match other platforms. -The vive 'full flat eye' rect was narrower than other platforms. Expanded it to be closer to the other platforms. Change 3578684 by Mike.Beach Static analysis fixes for CIS. #jira UE-48204, UE-48203, UE-48206 Change 3579460 by Mike.Beach [WIP] New calibration mode for camera alignment. #jira UEVR-785 Change 3581232 by Mike.Beach [WIP] Saving off alignment calibration data, and loading it on initialization. We skip alignment calibration if it has been configured. #jira UEVR-832 Change 3588411 by Mike.Beach [WIP] Adding calibration for compositing (chroma color, etc.). #jira UEVR-785 Change 3588541 by Mike.Beach [WIP] Cleaning up some display issues with the MR calibration. #jira UEVR-785 Change 3588680 by Mike.Beach Re-organizing the MR content, now that the alignment controller calibrates more than just alignment (renaming, etc.). Change 3588694 by Mike.Beach Renaming the MR calibration pawn (since it doesn't do any calibrating itself). Change 3591518 by Mike.Beach Copying //Tasks/UE4/Dev-MixedReality to Dev-VR-Minimal (//UE4/Dev-VR-Minimal) Change 3591671 by Ryan.Vance Debug stereo layer support This adds an option to render the debug canvas to a stereo layer which greatly improves console and stat readability in an hmd. Change 3591812 by Ryan.Vance Don't snap motion controllers to the origin when tracking is lost. Change 3594681 by Mike.Beach [WIP] Copying //Tasks/UE4/Dev-MixedReality to Dev-VR-Minimal (//UE4/Dev-VR-Minimal) Change 3596679 by Mike.Beach CIS fix (likely fallout from CL 3591671) - changing the order of initialization to better match the order of declaration. Change 3598191 by Jeff.Fisher UEVR-807 Setup M_MRVidProcessing to use 3D garbage matte data. -Created MixedRealityGarbageMatteCaptureComponent. An instance of this is spawned by and attached to MixedRealityCaptureComponent. Saved config data is loaded into it. It spawns a garbage matte actor. It then captures the garbage matte actor into a render target (which is set on MixedRealityCaptureComponent). #jira UEVR-807 #review-3598179 Change 3598276 by Mike.Beach Copying //Tasks/UE4/Dev-MixedReality to Dev-VR-Minimal (//UE4/Dev-VR-Minimal) Change 3598332 by Mike.Beach Guarding against a blind cast in the SteamVRChaperone component, which can be used cross platform (can't assume SteamVR). Change 3605271 by Mike.Beach Copying //Tasks/UE4/Dev-MixedReality to Dev-VR-Minimal (//UE4/Dev-VR-Minimal) Change 3608490 by Jeff.Fisher UEVR-987 Social Screen PS4 need to go to 'mirroring' for hmd setup dialog because system dialogs are not visible in separate mode. UEVR-988 SpectatorScreen Flickering UE-47234 Spectator screen: need frame delay before assigning dynamically created rendertarget to spectator texture UE-47310 Spectator Screen: crash if you release a render target which is assigned as the spectator texture -Test level content for all of these bugs. Change 3608883 by Jeff.Fisher UEVR-807 Setup M_MRVidProcessing to use 3D garbage matte data. -Set material to use the garbage matte render target. Change 3613292 by Mike.Beach Moving header fcn decl up, under the proper interface section (for organization's sake). Change 3616943 by Nick.Whiting Updating SteamVR libraries to 1.0.9, so we can bring back macOS support Change 3616970 by Nick.Whiting Adding in steamvr visible area mesh support. Can be toggled with vr.SteamVR.UseVisibleAreaMesh Change 3617866 by Mike.Beach Updating the VR template to reflect Oculus HMD device naming that we've keyed off of in these Blueprints (when determining which VR system we're running on). Change 3620108 by Mike.Beach [WIP] Adding an intermediate calibration step to tweak the MR virtual cam's alignment. Change 3620982 by Mike.Beach Tying off some loose ends with the MR calibration map: * Saving after each calibration phase * Fixing blocked input from garbage matte creation * Blocking input handling while exiting/previewing * Adding minimum radius for random screen pt Change 3621551 by Mike.Beach [MR] Leveraging camera support in the new media framework - working for limited cameras in calibration. Change 3621552 by Mike.Beach [MR calibration] - fixing it so when you first switch into compoisiting calibration it updates the property readout. Change 3621660 by Mike.Beach [MR calibration] Cleaning up how we display text (adding a struct to wrap the coresponding properties). Change 3623323 by Dustin.Holmes Fix buffer overflow when using 5+ Vive generic trackers and add more Special hand designations to cover the maximum 11 trackers Vive supports Change 3625900 by Keli.Hlodversson Remove fixed 16:9 aspect ratio for SteamVR and Oculus splash screens. Oculus was already fixed in CL#3413801, but regressed with plugin renaming and unificiation with GearVR in CL#3502152. #jira UE-40220 StereoLayer splash layers are hardcoded to 8 by 4.5 meters (16:9 aspect ratio) Change 3628409 by Mike.Beach Speculative CIS fix. #jira UE-49339 Change 3628440 by Nick.Whiting Fix for SteamVR OSX build issues Change 3628489 by Nick.Whiting Fix for win32 build break Change 3629045 by Mike.Beach Shadowed variable name fix (CIS). Change 3629202 by Arciel.Rekman Copying //UE4/Partner-Valve@3629179 to Dev-VR (//UE4/Dev-VR) Change 3629340 by Nick.Atamas Unshelved and resolved changes from Oculus. Change 3629772 by Ryan.Vance Fixing Oculus Vulkan related compile issues. This will break Oculus Vulkan support, but the code needs to be refactored anyway. Change 3629833 by Mike.Beach Fixing up CIS warning introduced by Oculus 1.17 changes - "unsafe conversion" warning #jira UE-49376 Change 3630696 by Jeff.Fisher UE-49415 //UE4/Dev-VR: Incremental UE4Editor Win64 completed with errors - 5 Errors Switching an include to a forward declaration -Not sure why the previous version didn't compile on the build machine, but fewer dependencies is good. Change 3630783 by Mike.Beach Fixing CIS compiler failures for our vehicle templates. #jira UE-49417 Change 3630802 by Mike.Beach Better fix than 3630783 - updating the vehicle template's stereoscopic check (fixing the VehicleHud.cpp logic as well) #jira UE-49417 Change 3630870 by Mike.Beach Pragma'ing out a function pointer cast warning. Good warning, but I figure we know what we're doing here and there's no other way around it. #jira UE-49376 Change 3630993 by Ryan.Vance Check to ensure we have a valid third camera before trying to use it. We could check >= 3 or if the left and right cameras are left/right stereo etc. decided to go with the simple test for now. Change 3631322 by Jeff.Fisher UEVR-909 PIP in Garbage Matte -Added ExternalGarbageMatteActor to MixedRealityGarbageMatteCaptureComponent and exposed it to blueprint though MixedRealityCaptureComponent. This lets us switch from using the normal mixed reality component save/load garbage matte data and instead use an external actor, in this case the actor we use to setup the garbage matte. Then the mask is able to capture that actor live as it is edited. -Also implemented GetViewOwner() so that we can use SetOwnerOnlySee to prevent other cameras and captures from seeing the garbage matte actor. -Calibration level now uses the external garbage matte actor to let the garbate matte mask live update. It also does a picture-in-picture preview of the mixed reality scene. 'P' can show/hide the garbage matte actor on that PIP preview. -Added SetUnmaskedPixelHighlightColor to MixedRealityCaptureComponent and the material. With this one can make unmasked video pixels more obvious in the output. The calibration level has this mapped to shift-P and makes pixels bright yellow to white. -Added blueprint to calibration level to make the garbage matte actor visible in the mixed reality capture. That is bound to ctrl-g. -GarbageMatteActors spawned by the mixed reality capture component are now attached to the vr origin. The calibration level now saves garbage matte mesh transforms relative to the vr origin. -The garbage matte mesh is now plugin content, and is referenced in the mixedrealitycomponent default object, so it is cooked in any project that includes the plugin. -Fog and AtmosphericFog no longer affect the garbage matte mask capture... there may be other things we need to turn off there. #review-3618345 #jira UEVR-909 Change 3631362 by Keli.Hlodversson #jira UE-49418 Exiting Google Instant Preview displays half of the editor viewport as black. Note convoluted fix: passing bIsStereoScopic3D to IsActiveThisFrame. ISceneViewExtension code cannot rely on StereoRenderingDevice->IsStereoEnabled to know whether to render in stereo, as the current viewport widget may disable it. This was not a problem before the refactoring, as HMD-related viewextensions were only added to the active list after establishing that stereo indeed was enabled and allowed by the current view port widget. Change 3631887 by Jeff.Fisher Fixing IsActiveThisFrame build break. Change 3632206 by Nick.Atamas Fix for UE-49413. Registering FOculusHMD as an extensions the same way as others: now creates an XRCamera that passes all the calls back to the HMD. Change 3632264 by Nick.Whiting Fix for Vive rendering getting cropped off due to invalid subrect values being submitted to the compositor. Change 3632340 by Nick.Atamas Merged in change from Loren; opted for our solution to ViewExtensions instead of the one in the changelist. Original description below. Change 3632214 by Loren.McQuade@Loren.McQuade_Dev-VR on 2017/09/07 19:51:29 *pending* [Dev-VR] Added OculusHMD_SceneViewExtension, PlayerPosition/PlayerOrientation values, FOculusHMD::GetRelativeEyePose cross-eyed madness (CL 3631541, 3631687) Change 3632353 by Ryan.Vance #jira UE-49468 Don't apply xr camera rotation on the player controller when not using xr tracking. Change 3632735 by Keli.Hlodversson Better fix for #jira UE-49413. Revert oculus xr camera code and use that one can have more than one view extension registered instead. Use GetPriority to have the OculusHMD view extension code execute after the default xr camera. The xr camera subclass did not forward the calls to ISceneViewExtension to the parent, breaking various functionality such as late update. Fixes a crash when entering VR pie twice, back to back. Change 3632752 by Keli.Hlodversson Applying change 3632592 by Loren.McQuade@Loren.McQuade_Dev-VR_Branch on 2017/09/08 02:08:22 [Dev-VR] Push //UE4/Partner-Oculus@3632591 #rb merge //UE4/Partner-Oculus to //UE4/Dev-VR/... Reverted OculusHMD_XRCamera changes, as that clas has been removed in the interim. Change 3633211 by Mike.Beach Backing out Oculus MotionController hiding that accidently got submitted - we decided not to adopt this change originally. Change 3633315 by Jeff.Fisher merge from main with dev-platform problem children -expecting SDRBackBuffer stuff to be wrong. Change 3634006 by Mike.Beach Resurecting Oculus clip plane settings which got dropped in the IXR refactor. #jira UE-49520 Change 3634639 by Keli.Hlodversson Avoid include cycle https://ec-01.epicgames.net/commander/link/jobStepDetails/jobSteps/68863219?stepName=UE4Editor%20Static%20Analysis%20Win64%20%28IncludeTool%29&jobId=7995809&jobName=UE4%20Dev-VR%20-%20CL%203632752%20-%20Nightly%20Build&tabGroup=diagnosticHeader&firstPage=1 Change 3634641 by Jeff.Fisher UE-49535 Lighting is blown out when playing in VR Preview on Vive -Need pixel format to be PF_B8G8R8A8 for vr, now the plugins all build their render target and use that format. #review-3634623 Change 3634682 by Jeff.Fisher IHeadMountedDisplay forward declarations needed. Change 3634690 by Ryan.Vance We can't override the screen percentage when rendering for stereo #jira UE-49287 Change 3635970 by Keli.Hlodversson #jira UE-49563 Crash while opening QA-Game Referencing SharedPointer.h Verify that StereoRendering is valid before calling IsStereoEnabled() Change 3635979 by Mike.Beach CIS static analysis fix - checking a ptr for null before we use it. #jira UE-49531 Change 3636059 by Mike.Beach Fixing XR system name aliasing for the -hmd command. [CL 3638830 by Ryan Vance in Main branch]
2017-09-12 11:27:30 -04:00
FDefaultStereoLayers::FDefaultStereoLayers(const FAutoRegister& AutoRegister, FHeadMountedDisplayBase* InHMDDevice)
: FHMDSceneViewExtension(AutoRegister)
Copying //UE4/Dev-VR to //UE4/Dev-Main (Source: //UE4/Dev-VR @ 3636795) #lockdown Nick.Penwarden ============================ MAJOR FEATURES & CHANGES ============================ Change 2932765 by Nick.Whiting Merging updated license files for Oculus libraries Change 3480552 by Dustin.Holmes Added map and gamemode for calibration #jira UEVR-808 Change 3502253 by Nick.Whiting Trying to fix up p4's botch of the merge Change 3513736 by Keli.Hlodversson Move duplicated late update code into a common FLateUpdateManager #jira UEVR-893 Change 3514798 by Mike.Beach #4.17 Exposing a way for Blueprint users to remap the SteamVR controller's d-pad buttons (clashes with the Oculus mappings). #jira UE-42634 Change 3516042 by Dustin.Holmes Runtime handedness changes in Vive controllers are now reflected when a new device is connected. Device mappings are also reset when a device disconnects, so that if it connects again it fully reregisters instead of just assuming the role it previously had. Change 3517781 by Keli.Hlodversson Remove unused local variable bUseCustomPresentTexture Change 3517951 by Mike.Beach #4.17 Guarding against dereferencing a null pointer. Defaulting to the identity when we don't (yet) have a valid head pose to use. #jira UE-43685 Change 3518142 by Mike.Beach #4.17 Resolving fallout from bad merge (CL 3514868) - checking for teminating null in array (which was added to keep ARRAY_COUNT from acting on an empty array). Change 3523183 by Ryan.Vance #jira UE-46493, UEVR-661 Fixes GearVR only displaying a black screen on startup Fixes GearVR rendering incorrectly with mobile multi-view w/o direct mode enabled Adding mobile multi-view direct support to Daydream Change 3523718 by Nick.Whiting Adding core controller recentering delegate, and moving Google over to that system. Change 3527263 by Dan.Oconnor Mirror 3526925 for Nick Donaldson Change 3533596 by Dustin.Holmes Add garbage matte map, gamemode, and blueprints. Change 3533598 by Dustin.Holmes Expose the Set Tint Color and Opacity function for Widget Components as a Blueprint node. Change 3538139 by Mike.Beach Moving Oculus debug shader directly into Oculus plugin. #jira UE-47134 Change 3543185 by Nick.Atamas Address UEVR-891 : Merge in changes to Google Tango plugin. #jira UEVR-891 Change 3543285 by Nick.Atamas Merging using //UE4/Release-4.17/... -> //UE4/Dev-VR/... : Fixed UEVR-852: Adjusted Google Tango Plugins copyright to Copyright Google 2017. Removed Apache 2.0 license. Change 3545505 by Nick.Atamas Fix UEVR-851 : some fix-ups to MeshReconHUD and overlay material now has a material parameter for tinting the reconstructed mesh to help debug visualization. Change 3547549 by Jeff.Fisher Fixing DefaultSpectatorScreenController comment. Change 3551339 by Ryan.Vance #jira UE-44947 Editor primitives we not being handled correctly with ISR. Change 3554169 by Dustin.Holmes Reconcile missed Mixed Reality blueprint Change 3566825 by Mike.Beach Fixing some bad merges from Main (fallout from CL 3566309) Change 3567143 by Mike.Beach Copying //Tasks/UE4/Dev-MixedReality to Dev-VR-Minimal (//UE4/Dev-VR-Minimal) Change 3567572 by Mike.Beach [WIP] Adding some MR plugin dependencies to keep CIS quiet (SteamVR is just temporary, and will be removed). Change 3569116 by Jeff.Fisher Mixed reality build breaks for PS4 -Module is dependent on steamvr, so don't build it for PS4. -Removed unused class that doesn't compile with clang. Change 3569362 by Mike.Beach Organizing MR plugin content, to make way for new calibration modes. Change 3572802 by Jeff.Fisher UEVR-832 Add save/load system for calibrated camera settings -Moved MixedRealityConfigurationSaveGame to c++. #review-3571779 #jira UEVR-832 Change 3573864 by Mike.Beach [WIP] Initial work on MR cam alignment controller - records point/frustum data from user input. Change 3575900 by Jeff.Fisher Vive spectator flat rect expanded to match other platforms. -The vive 'full flat eye' rect was narrower than other platforms. Expanded it to be closer to the other platforms. Change 3578684 by Mike.Beach Static analysis fixes for CIS. #jira UE-48204, UE-48203, UE-48206 Change 3579460 by Mike.Beach [WIP] New calibration mode for camera alignment. #jira UEVR-785 Change 3581232 by Mike.Beach [WIP] Saving off alignment calibration data, and loading it on initialization. We skip alignment calibration if it has been configured. #jira UEVR-832 Change 3588411 by Mike.Beach [WIP] Adding calibration for compositing (chroma color, etc.). #jira UEVR-785 Change 3588541 by Mike.Beach [WIP] Cleaning up some display issues with the MR calibration. #jira UEVR-785 Change 3588680 by Mike.Beach Re-organizing the MR content, now that the alignment controller calibrates more than just alignment (renaming, etc.). Change 3588694 by Mike.Beach Renaming the MR calibration pawn (since it doesn't do any calibrating itself). Change 3591518 by Mike.Beach Copying //Tasks/UE4/Dev-MixedReality to Dev-VR-Minimal (//UE4/Dev-VR-Minimal) Change 3591671 by Ryan.Vance Debug stereo layer support This adds an option to render the debug canvas to a stereo layer which greatly improves console and stat readability in an hmd. Change 3591812 by Ryan.Vance Don't snap motion controllers to the origin when tracking is lost. Change 3594681 by Mike.Beach [WIP] Copying //Tasks/UE4/Dev-MixedReality to Dev-VR-Minimal (//UE4/Dev-VR-Minimal) Change 3596679 by Mike.Beach CIS fix (likely fallout from CL 3591671) - changing the order of initialization to better match the order of declaration. Change 3598191 by Jeff.Fisher UEVR-807 Setup M_MRVidProcessing to use 3D garbage matte data. -Created MixedRealityGarbageMatteCaptureComponent. An instance of this is spawned by and attached to MixedRealityCaptureComponent. Saved config data is loaded into it. It spawns a garbage matte actor. It then captures the garbage matte actor into a render target (which is set on MixedRealityCaptureComponent). #jira UEVR-807 #review-3598179 Change 3598276 by Mike.Beach Copying //Tasks/UE4/Dev-MixedReality to Dev-VR-Minimal (//UE4/Dev-VR-Minimal) Change 3598332 by Mike.Beach Guarding against a blind cast in the SteamVRChaperone component, which can be used cross platform (can't assume SteamVR). Change 3605271 by Mike.Beach Copying //Tasks/UE4/Dev-MixedReality to Dev-VR-Minimal (//UE4/Dev-VR-Minimal) Change 3608490 by Jeff.Fisher UEVR-987 Social Screen PS4 need to go to 'mirroring' for hmd setup dialog because system dialogs are not visible in separate mode. UEVR-988 SpectatorScreen Flickering UE-47234 Spectator screen: need frame delay before assigning dynamically created rendertarget to spectator texture UE-47310 Spectator Screen: crash if you release a render target which is assigned as the spectator texture -Test level content for all of these bugs. Change 3608883 by Jeff.Fisher UEVR-807 Setup M_MRVidProcessing to use 3D garbage matte data. -Set material to use the garbage matte render target. Change 3613292 by Mike.Beach Moving header fcn decl up, under the proper interface section (for organization's sake). Change 3616943 by Nick.Whiting Updating SteamVR libraries to 1.0.9, so we can bring back macOS support Change 3616970 by Nick.Whiting Adding in steamvr visible area mesh support. Can be toggled with vr.SteamVR.UseVisibleAreaMesh Change 3617866 by Mike.Beach Updating the VR template to reflect Oculus HMD device naming that we've keyed off of in these Blueprints (when determining which VR system we're running on). Change 3620108 by Mike.Beach [WIP] Adding an intermediate calibration step to tweak the MR virtual cam's alignment. Change 3620982 by Mike.Beach Tying off some loose ends with the MR calibration map: * Saving after each calibration phase * Fixing blocked input from garbage matte creation * Blocking input handling while exiting/previewing * Adding minimum radius for random screen pt Change 3621551 by Mike.Beach [MR] Leveraging camera support in the new media framework - working for limited cameras in calibration. Change 3621552 by Mike.Beach [MR calibration] - fixing it so when you first switch into compoisiting calibration it updates the property readout. Change 3621660 by Mike.Beach [MR calibration] Cleaning up how we display text (adding a struct to wrap the coresponding properties). Change 3623323 by Dustin.Holmes Fix buffer overflow when using 5+ Vive generic trackers and add more Special hand designations to cover the maximum 11 trackers Vive supports Change 3625900 by Keli.Hlodversson Remove fixed 16:9 aspect ratio for SteamVR and Oculus splash screens. Oculus was already fixed in CL#3413801, but regressed with plugin renaming and unificiation with GearVR in CL#3502152. #jira UE-40220 StereoLayer splash layers are hardcoded to 8 by 4.5 meters (16:9 aspect ratio) Change 3628409 by Mike.Beach Speculative CIS fix. #jira UE-49339 Change 3628440 by Nick.Whiting Fix for SteamVR OSX build issues Change 3628489 by Nick.Whiting Fix for win32 build break Change 3629045 by Mike.Beach Shadowed variable name fix (CIS). Change 3629202 by Arciel.Rekman Copying //UE4/Partner-Valve@3629179 to Dev-VR (//UE4/Dev-VR) Change 3629340 by Nick.Atamas Unshelved and resolved changes from Oculus. Change 3629772 by Ryan.Vance Fixing Oculus Vulkan related compile issues. This will break Oculus Vulkan support, but the code needs to be refactored anyway. Change 3629833 by Mike.Beach Fixing up CIS warning introduced by Oculus 1.17 changes - "unsafe conversion" warning #jira UE-49376 Change 3630696 by Jeff.Fisher UE-49415 //UE4/Dev-VR: Incremental UE4Editor Win64 completed with errors - 5 Errors Switching an include to a forward declaration -Not sure why the previous version didn't compile on the build machine, but fewer dependencies is good. Change 3630783 by Mike.Beach Fixing CIS compiler failures for our vehicle templates. #jira UE-49417 Change 3630802 by Mike.Beach Better fix than 3630783 - updating the vehicle template's stereoscopic check (fixing the VehicleHud.cpp logic as well) #jira UE-49417 Change 3630870 by Mike.Beach Pragma'ing out a function pointer cast warning. Good warning, but I figure we know what we're doing here and there's no other way around it. #jira UE-49376 Change 3630993 by Ryan.Vance Check to ensure we have a valid third camera before trying to use it. We could check >= 3 or if the left and right cameras are left/right stereo etc. decided to go with the simple test for now. Change 3631322 by Jeff.Fisher UEVR-909 PIP in Garbage Matte -Added ExternalGarbageMatteActor to MixedRealityGarbageMatteCaptureComponent and exposed it to blueprint though MixedRealityCaptureComponent. This lets us switch from using the normal mixed reality component save/load garbage matte data and instead use an external actor, in this case the actor we use to setup the garbage matte. Then the mask is able to capture that actor live as it is edited. -Also implemented GetViewOwner() so that we can use SetOwnerOnlySee to prevent other cameras and captures from seeing the garbage matte actor. -Calibration level now uses the external garbage matte actor to let the garbate matte mask live update. It also does a picture-in-picture preview of the mixed reality scene. 'P' can show/hide the garbage matte actor on that PIP preview. -Added SetUnmaskedPixelHighlightColor to MixedRealityCaptureComponent and the material. With this one can make unmasked video pixels more obvious in the output. The calibration level has this mapped to shift-P and makes pixels bright yellow to white. -Added blueprint to calibration level to make the garbage matte actor visible in the mixed reality capture. That is bound to ctrl-g. -GarbageMatteActors spawned by the mixed reality capture component are now attached to the vr origin. The calibration level now saves garbage matte mesh transforms relative to the vr origin. -The garbage matte mesh is now plugin content, and is referenced in the mixedrealitycomponent default object, so it is cooked in any project that includes the plugin. -Fog and AtmosphericFog no longer affect the garbage matte mask capture... there may be other things we need to turn off there. #review-3618345 #jira UEVR-909 Change 3631362 by Keli.Hlodversson #jira UE-49418 Exiting Google Instant Preview displays half of the editor viewport as black. Note convoluted fix: passing bIsStereoScopic3D to IsActiveThisFrame. ISceneViewExtension code cannot rely on StereoRenderingDevice->IsStereoEnabled to know whether to render in stereo, as the current viewport widget may disable it. This was not a problem before the refactoring, as HMD-related viewextensions were only added to the active list after establishing that stereo indeed was enabled and allowed by the current view port widget. Change 3631887 by Jeff.Fisher Fixing IsActiveThisFrame build break. Change 3632206 by Nick.Atamas Fix for UE-49413. Registering FOculusHMD as an extensions the same way as others: now creates an XRCamera that passes all the calls back to the HMD. Change 3632264 by Nick.Whiting Fix for Vive rendering getting cropped off due to invalid subrect values being submitted to the compositor. Change 3632340 by Nick.Atamas Merged in change from Loren; opted for our solution to ViewExtensions instead of the one in the changelist. Original description below. Change 3632214 by Loren.McQuade@Loren.McQuade_Dev-VR on 2017/09/07 19:51:29 *pending* [Dev-VR] Added OculusHMD_SceneViewExtension, PlayerPosition/PlayerOrientation values, FOculusHMD::GetRelativeEyePose cross-eyed madness (CL 3631541, 3631687) Change 3632353 by Ryan.Vance #jira UE-49468 Don't apply xr camera rotation on the player controller when not using xr tracking. Change 3632735 by Keli.Hlodversson Better fix for #jira UE-49413. Revert oculus xr camera code and use that one can have more than one view extension registered instead. Use GetPriority to have the OculusHMD view extension code execute after the default xr camera. The xr camera subclass did not forward the calls to ISceneViewExtension to the parent, breaking various functionality such as late update. Fixes a crash when entering VR pie twice, back to back. Change 3632752 by Keli.Hlodversson Applying change 3632592 by Loren.McQuade@Loren.McQuade_Dev-VR_Branch on 2017/09/08 02:08:22 [Dev-VR] Push //UE4/Partner-Oculus@3632591 #rb merge //UE4/Partner-Oculus to //UE4/Dev-VR/... Reverted OculusHMD_XRCamera changes, as that clas has been removed in the interim. Change 3633211 by Mike.Beach Backing out Oculus MotionController hiding that accidently got submitted - we decided not to adopt this change originally. Change 3633315 by Jeff.Fisher merge from main with dev-platform problem children -expecting SDRBackBuffer stuff to be wrong. Change 3634006 by Mike.Beach Resurecting Oculus clip plane settings which got dropped in the IXR refactor. #jira UE-49520 Change 3634639 by Keli.Hlodversson Avoid include cycle https://ec-01.epicgames.net/commander/link/jobStepDetails/jobSteps/68863219?stepName=UE4Editor%20Static%20Analysis%20Win64%20%28IncludeTool%29&jobId=7995809&jobName=UE4%20Dev-VR%20-%20CL%203632752%20-%20Nightly%20Build&tabGroup=diagnosticHeader&firstPage=1 Change 3634641 by Jeff.Fisher UE-49535 Lighting is blown out when playing in VR Preview on Vive -Need pixel format to be PF_B8G8R8A8 for vr, now the plugins all build their render target and use that format. #review-3634623 Change 3634682 by Jeff.Fisher IHeadMountedDisplay forward declarations needed. Change 3634690 by Ryan.Vance We can't override the screen percentage when rendering for stereo #jira UE-49287 Change 3635970 by Keli.Hlodversson #jira UE-49563 Crash while opening QA-Game Referencing SharedPointer.h Verify that StereoRendering is valid before calling IsStereoEnabled() Change 3635979 by Mike.Beach CIS static analysis fix - checking a ptr for null before we use it. #jira UE-49531 Change 3636059 by Mike.Beach Fixing XR system name aliasing for the -hmd command. [CL 3638830 by Ryan Vance in Main branch]
2017-09-12 11:27:30 -04:00
, HMDDevice(InHMDDevice)
Copying //UE4/Dev-VR to //UE4/Dev-Main (Source: //UE4/Dev-VR @ 3383750) #lockdown Nick.Penwarden ========================== MAJOR FEATURES + CHANGES ========================== Change 3012064 on 2016/06/13 by Nick.Whiting Merging Main -> DevVR Change 3048060 on 2016/07/13 by Nick.Whiting Integrating CL 3045721 from //depot/Partners/Google/AndroidVR-DevVR Upgrade Android and iOS GVR SDK to the latest. Fix the flipped vignette issue when using Unreal's post processing distortion. Change the Daydream & Cardboard mode to use scanline racing. Deprecate the ability to turn off individual UI elements. Change 3235307 on 2016/12/14 by Keli.Hlodversson Filter out excluded HMD modules during FEngineLoop:PreInitHMDDevice. The final selection still happens in UEngine::InitializeHMDDevice as all HMD plugins have not been loaded during PreInit Change 3235308 on 2016/12/14 by Ryan.Vance #jira UEVR-478 Monoscopic far field improvements Shader changes are now gated behind the read only cvar vr.MonoscopicFarField. Changing this requires a shader compile. Moved the mono rendering mode to the cvar vr.MonoscopicFarFieldMode. This is writable, so users can enable/disable mono rendering on the fly if the above cvar is enabled. Only write to the alpha channel in the mobile base pass if the object is opaque and MONOSCOPIC_FAR_FIELD is defined. Addressed code review comments. Change 3235397 on 2016/12/14 by Keli.Hlodversson [Oculus] Only enable GearVR platform on Windows if Oculus service is running Original author: Loren.McQuade Change 3235762 on 2016/12/14 by Keli.Hlodversson Add explicit parentheses to placate the build bots. Change 3242318 on 2016/12/21 by Ryan.Vance Working around pixel density crash. Change 3242522 on 2016/12/21 by Ryan.Vance Missing flag clear so our adaptive test was always returning true. Change 3243173 on 2016/12/22 by Ryan.Vance Integrating post present callback implementation from 4.14.1 Change 3248633 on 2017/01/05 by Keli.Hlodversson Copying //Tasks/UE4/Dev-VR-Refactoring to Dev-VR-Minimal (//UE4/Dev-VR-Minimal) Change 3248723 on 2017/01/05 by Keli.Hlodversson Fix after merge. EnablePositionalTracking no longer exists. Change 3249484 on 2017/01/06 by Keli.Hlodversson Add missing includes Change 3249714 on 2017/01/06 by Keli.Hlodversson Remove monolithic header include Change 3249980 on 2017/01/06 by Keli.Hlodversson SteamVR: Remove leftover unused WindowMirrorMode member variable Change 3252432 on 2017/01/10 by Keli.Hlodversson Submitting change by Loren McQuade to fix monolithic builds. Unshelved from pending changelist '3251436': Change 3257373 on 2017/01/13 by Keli.Hlodversson #jira UEVR-411: Finish renaming/removing/remodelling the remaining Oculus (Rift+GearVR) commands #jira UEVR-412: Rename and merge remaining Morpheus console commands #jira UEVR-417: Remove Exec from IHeadMountedDisplay Change 3269971 on 2017/01/24 by Jeff.Fisher UEVR-498 move controller is missing world to meters UEVR-522 PS4 motion controller worldscale support. -Passing world to meters scale into getControllerOrientationAndPosition because the thing asking about it ought to be part of a world, and know what it should be. This also avoids making PS4 motion controllers dependent on the HMD. Note Google VR Controller doesn't do position, so doesnt' care about scale. Oculus already had internal threadsafe tracking of world scale, so I left that. Steam handles world scale below our input level. -Also adding PlayerIndex member to FSceneView so we can figure out which view the MotionControllerComponent should get its worldscale from for the late render thread update. #jira UEVR-498 #review-3384107 Change 3288308 on 2017/02/06 by Jeff.Fisher UEVR-517 Detect MotionController Connectivity -PS4 can only track 2 controllers and 1 hmd. Support for dealing with that is needed. -Also need to support multiple motion controller components mapped to a single controller. Licencees have done that before. -Created a new interface IMotionTrackingSystemManagement, and implements it for PS4Tracker on PS4. -Created a MotionTrackedDeviceFunctionLibrary to expose that interface to blueprint. -With those one can enable and disable tracking on ps4 controllers and query their state to stay within the controller tracking limit. -PS4Tracker also keeps a blackboard of the enable/disable state so that one can enable or disable controllers that have not been connected yet, and have them enable tracking or not when they are connected. -DS4 controller no longer jumps back to 000 if it loses tracking. #review-3384107 #jira UEVR-517 Change 3288309 on 2017/02/06 by Keli.Hlodversson Add file missing from CL#3257373. Change 3288311 on 2017/02/06 by Jeff.Fisher UEVR-517 Detect MotionController Connectivity - Test content. -tm-motionControllers has a third mode where all playstation motion controllers for player 0 are availalbe. You can toggle them to track or not with ctrl-P,G,L,R for pad, gun, leftmove, rightmove or with alt-P,G,L,R. Ctrl tests doing so via MotionControllerComponent. Alt tests doing so by player index and controller type enum. -ctrl-A disables tracking of all controllers -alt-A disables tracking of all controllers for player 0 -ctrl-D toggles enabling new controllers by default -Also fixed one button not working in one of the other test modes for the Aim (gun) controller. -The controller 'models' have an arrow out the front. It is black if disabled. Red if enabled, but no tracker is active, yellow if tracked but inertial only, and green if fully tracked by the camera. -This logic is in the QA_MoCoAll blueprint. Change 3291601 on 2017/02/07 by Jeff.Fisher UEVR-536 PSVR motion controller tracking problem with multiple controllers -Previous code called GetRelativeTransform from the render thread, but the game thread could update it at any time. This caches that transform so that it can be safely used in the render thread. #jira UEVR-536 #review-3384107 @Ryan.Vance Change 3292460 on 2017/02/08 by Jeff.Fisher PS4 sceVrTrackerGetResult() error warning logging improved, and explanatory comment added. Change 3308771 on 2017/02/17 by Keli.Hlodversson Rename GoogleVR console commands #jira UEVR-412 Change 3309156 on 2017/02/17 by Keli.Hlodversson Track changes in r.ScreenPercentage on GoogleVR and set RenderTargetSize accordingly. Change 3311999 on 2017/02/20 by Keli.Hlodversson Create a default implementation for RecordAnalytics. Also create an initial stub for FHeadMountedDisplayBase for future default implementations of common HMD functionality. Make implementing IHeadMountedDisplay::GetDeviceName mandatory instead of defaulting to "Unknown" #jira UE-21878 #jira UEVR-213 Change 3313467 on 2017/02/20 by Ryan.Vance #jira UE-41604 3278583 pCustomPresent->AllocateRenderTargetTexture may return false, if we blindly return true we can end up with an invalid render target since the fall back sceneviewport will be skipped. 3278536 Adding ovrError_NoHmd to our sanity check in OnStartGameFrame. Change 3314002 on 2017/02/21 by Keli.Hlodversson Fix compilation on PS4 and Linux Change 3326722 on 2017/03/01 by Jeff.Fisher Merging //UE4/Dev-Main to Dev-VR (//UE4/Dev-VR) Integrating 4.15 from main. Change 3327567 on 2017/03/01 by Jeff.Fisher UEVR-588 Oculus crash on "stereo on" when the proximity sensor is not triggered. Duplicating from Release-4.15 cl 3327481, 3327542 -Don't ovr_SubmitFrame when the layers need to be recreated. They stay dirty until rendering is unpaused. #jira UEVR-588 #review-3384107 Change 3328098 on 2017/03/01 by Jeff.Fisher 4.15 merge fixes -Fixed deprecated enum name function usage. -Fixed world scale usage in GoogleVRController. -Fixed compile break in PS4Tracker. Change 3328271 on 2017/03/01 by Jeff.Fisher 2.15 merge -restroging GoogleVRController::GetWorldToMetersScale... cause it is used everywhere. Change 3328307 on 2017/03/01 by Jeff.Fisher 4.15 merge -More googlevr worldscale fixes. Change 3328312 on 2017/03/01 by Jeff.Fisher 4.15 merge -removing 2 unused includes Change 3330610 on 2017/03/02 by Jeff.Fisher 4.15 merge -fixing linux build Change 3333952 on 2017/03/06 by Keli.Hlodversson Implement common stereo layer management base class and use it in SteamVR and PS4. Fixes an outstanding bug in SteamVR where texures are updated every frame regardles of whether the continous update flag is set or not. #jira UEVR-628 #jira UE-42555 Change 3334961 on 2017/03/07 by Keli.Hlodversson Add missing include to fix non-unity builds Change 3336200 on 2017/03/07 by Keli.Hlodversson Fix compilation issues. (https://ec-01.epicgames.net/commander/link/jobDetails/jobs/7568252?jobName=UE4+Dev-VR+-+CL+3334961+-+Nightly+Build&s=Jobs) * Pre VS2015 compilers don't like mixing wide and unmarked strings in concatenation. Unfortunately LOCTEXT hides the call to the TEXT macro, completely hinding the prefix (which only gets added to the first fragment.) * Switch apparently doesn't know how to format a size_t for analytics either. Also: Typo in backwards compatibility command name alias Change 3337347 on 2017/03/08 by Jeff.Fisher UE-42631 Stereo off while prox sensor uncovered causes low framerate -Setting maxfps appropriately on 'stereo on/off'. #review-3384107 #jira UE-42631 Change 3338385 on 2017/03/08 by Ryan.Vance r.DisableDistortion was only being used for the mobile renderer Change 3342301 on 2017/03/10 by patrickr.donovan Test updates to TM-VRSmoke. Increased lightmap resolution on QA_MeshTypes meshes to improve readbility and reliablility of tests involving said asset. Rebuilt lighting. Change 3348133 on 2017/03/15 by Ryan.Vance Moving mono cvars to scene rendering to avoid cross module references. There's not a good reason to have them in the hmd module anyway. Change 3348836 on 2017/03/15 by Ryan.Vance Direct multi-view support for gear vr Monoscopic far field with multi-view (blit and direct) support for gear vr Support for translucent objects on both sides of the mono clip plane (due to a sorting issue, objects that straddle the plane composite incorrectly) Fixed missing discards/clears in the multi-view blit Change 3348843 on 2017/03/15 by Ryan.Vance Fixing color/depth target size mismatch when screen percentage scaling results in a size that isn't divisible by 16. Change 3349276 on 2017/03/16 by Keli.Hlodversson Fixing compile errors in GoogleVR after merge from main. Change 3350932 on 2017/03/16 by Ryan.Vance Re-enabling the gearvr plugin on windows. Change 3351977 on 2017/03/17 by Jeff.Fisher Fixing masked member variable. Change 3352314 on 2017/03/17 by Ryan.Vance We need to ensure that we don't select different lod levels for each eye. Change 3352993 on 2017/03/17 by Nick.Whiting Integrating CL 3345824 from Android-DevVR to Dev-VR. Support for device depth pass in SceneCaptureComponent2D Change 3355185 on 2017/03/20 by Nick.Whiting Added ability to disable the autoloading splash screen, which would prevent the hide splash screen node from ever working Change 3355676 on 2017/03/20 by Nick.Whiting PR #3384: [GNUX] SteamVR, OpenGL patch. (Contributed by yaakuro), with some minor modifications Change 3357286 on 2017/03/21 by Jeff.Fisher Fixing GenerateProjectFiles, looks like the .config. was removed from these references in main some time ago. Change 3357435 on 2017/03/21 by Jeff.Fisher Fixing editor build break, looks like a merge mistake. Change 3359960 on 2017/03/23 by Keli.Hlodversson Prevent potential crash when drawing tracking sensor location. Also only fetch HMD location once instead of once per tracking sensor. Change 3361230 on 2017/03/23 by Jeff.Fisher Fixing linux build opengl include problem... maybe. Change 3361638 on 2017/03/23 by Jeff.Fisher Another guess at fixing linux build. Change 3364224 on 2017/03/24 by Keli.Hlodversson Initial implementation of UEVR-576 - Base emulated layer implementation #jira UEVR-668 - Base emulated layer implementation: Initial framework for overrideable default implementation #jira UEVR-669 - Base emulated layer implementation: Face Locked Layers Support #jira UEVR-670 - Base emulated layer implementation: Tracker Locked Layers Support #jira UEVR-671 - Base emulated layer implementation: World Locked Layers Support #jira UEVR-672 - Base emulated layer implementation: Add support for optionally rendering face locked layers into a separate layer Change 3364242 on 2017/03/24 by Keli.Hlodversson SteamVR layers do not support negatve Layer priorities Change 3364263 on 2017/03/24 by Jeff.Fisher Merging //UE4/Dev-Main to Dev-VR (//UE4/Dev-VR) Monoscopicfarfieldrendering was just 'accept source', Ryan is going to look at fixing it up. Change 3364472 on 2017/03/24 by Jeff.Fisher Merge fix Change 3364475 on 2017/03/24 by Jeff.Fisher Fixing gearvr include. Change 3364486 on 2017/03/24 by Jeff.Fisher merge fix Change 3364532 on 2017/03/24 by Ryan.Vance pso update for mono rendering and stereo layers. Change 3364599 on 2017/03/24 by Ryan.Vance Oculus changes for SI1.12 Change 3365159 on 2017/03/26 by Jeff.Fisher include fix Change 3365182 on 2017/03/26 by Jeff.Fisher include fix Change 3366087 on 2017/03/27 by Ryan.Vance Remaining files from Oculus changes for SI1.12 merge request. Fixing a bug in OnlineSubsystem. Temporarily changing the eye padding change to be a shader clear to work around a clear color binding issue. Change 3366492 on 2017/03/27 by Ryan.Vance #jira UE-43294 Moved the clear before we setup state for drawing the mirror window content. It was stomping over state after the pso changes. Going to leave the shader clear in the rift prerender for clearing the eye padding for now. Change 3366929 on 2017/03/27 by Ryan.Vance Fixing compile error Change 3368549 on 2017/03/28 by Jeff.Fisher Merging Change: 3357998 from //UE4/Partner-Google-VR/Engine/... to Dev-VR Upgrade Google VR Plugin to v1.3: *Upgraded GVR NDK to 1.30.0 *Changed some BlueprintFunction to use BlueprintPure *Add the missing bDaydream flag in UEDeployAndroid.cs #review-3384107 Change 3368975 on 2017/03/28 by Ryan.Vance CIS clean up #jira UE-43428, UE-43429, UE-43426, UE-43427 Change 3369028 on 2017/03/28 by Ryan.Vance This is not exacly 'correct', but it's at least what the code was trying to do. Change 3370203 on 2017/03/29 by Ryan.Vance Adding gear vr controller component support. Change 3370918 on 2017/03/29 by Ryan.Vance Merging 3370569 using Partner-Google-VR_to_DevVR Change 3371030 on 2017/03/29 by Ryan.Vance Fixing linux build errors #jira UE-43426 Change 3371036 on 2017/03/29 by Ryan.Vance Oculus 4.16 integration. Not terribly happy with the use of std::string. They promised to clean this up for the next release. Change 3373495 on 2017/03/30 by Jeff.Fisher Merging from Dev-Main, in preparation for 4.16 Change 3373578 on 2017/03/30 by Jeff.Fisher build break, one comma short Change 3373870 on 2017/03/31 by Jeff.Fisher Include order fix. Change 3374001 on 2017/03/31 by Keli.Hlodversson Use DefaultStereoLayers as base for Morpheus implementation. #jira UEVR-709 #jira UE-42919 #rb: Jeff.Fisher Change 3374004 on 2017/03/31 by Keli.Hlodversson Fix rendering for the default Stereo Layers implementation on mobile. Depth test was set to "Never" instead of "Always" Destination texture on GLES is flipped on the Y axis, the coordinates are reversed in the shade when compiled on the relevant platforms. Change 3375125 on 2017/03/31 by Jeff.Fisher UE-43506 Ensure using VRPreview with GoogleVR -Removed the ensure, there is code in there to handle that case, and it works. #jira UE-43506 Change 3375294 on 2017/03/31 by nick.bullard Resaving Plugin content to resovle "saved with empty engine version" #jira UE-43537 Change 3375480 on 2017/03/31 by Jeff.Fisher UEVR-9 PSVR: Social Screen Support -Experimental social screen support for 4.16. -This does the basics of driving output through the Aux port in the proper format for display on the mirror monitor. -Only supports 30fps on the mirror monitor. 60fps will require the implementation of sony system dialogs to deal with incompatable system features (video streaming, remote play). -There is a project setting in Morpheus, under experiemental bEnableSocialScreenSeparateMode. This must be set to true to use this feature. When it is false we avoid allocating the back buffers. -MorpheusFunctionLibrary blueprints now have a node "SetSocialScreenMode" which can switch between SystemMirror (hardware supported mirroring), SeparateTest (alternates black and white), SeparateTexture (displays a texture, eg a render target, specified via blueprint), and SeparateMirror(puts the hmd render buffer on screen - which is both eyes, like a debug mode). -Also finally updated the bEnabled flag in project settings to tell people it's only for PC. #jira UEVR-9 #review-3384107 Change 3375540 on 2017/03/31 by Ryan.Vance #jira UE-43504 Fixing android build break when using a 64 bit isa. Change 3375655 on 2017/03/31 by Jeff.Fisher Fixing missing RGBAToYUV shader problem -This at least unblocks our process. Will revisit before zbr. Change 3375820 on 2017/04/01 by Jeff.Fisher Fixing linux build warning about HAS_MORPHEUS Change 3376050 on 2017/04/02 by Jeff.Fisher UE-43515 Step 'UE4Editor Static Analysis Win64' - Module.OnlineSubsystemOculus.cpp Warnings -Temporary fix for static analysis annotation warnings in OnlineSubsytemOculus. Longer term plan is to eliminate the use of the headers that trigger the warnings. -Just wrap all standard headers in static analysis disables. #jira UE-43515 Change 3376609 on 2017/04/03 by Jeff.Fisher Fixing rgbatoyuvshader include. Change 3377001 on 2017/04/03 by Jeff.Fisher UE-43547 Launch On PS4 fails during Run command - Missing global shader FRGBAToYUV420CS - shader c++ must be compiled so that it can be cooked for ps4. #jira UE-43547 Change 3379858 on 2017/04/04 by Jeff.Fisher Merging //UE4/Dev-Main to Dev-VR (//UE4/Dev-VR) pulling main this should get us ps4 sdk 4.508 Change 3379938 on 2017/04/04 by Ryan.Vance #jira UE-43548 If stereo layers are not being used, don't setup overlay targets as we will never clear/initialize them. The clear happens as part of the default layers PostRenderView_RenderThread call which wont be called if layers aren't being used in the scene. Change 3381519 on 2017/04/05 by Jeff.Fisher UEVR-733 PS4 sdk 4.500 hmd connection api changes break hmd connect. -Handling failure of sceHmdGetDeviceInformation if the hmd is powered off. It now returns an error code about an invalid handle in that case, rather than reporting unready. We just treat the error code like an unready status. #jira UEVR-733 #review-3384107 Change 3382019 on 2017/04/05 by Ryan.Vance Linux: add Vulkan support from dev editor: 3381593 Change 3382021 on 2017/04/05 by Ryan.Vance SteamVR on Linux using Vulkan OpenVR rev to 1_0_6 PR #3412: [GNUX] Initial support for SteamVR using Vulkan on GNUX platform. (Contributed by yaakuro) Change 3382076 on 2017/04/05 by Ryan.Vance Fixing linux steamvr lib path. It changed to something less silly in 1.0.6 Removing the steamvr plugin from the white list for linux. It's looking for a runtime that no one will have installed. Change 3383237 on 2017/04/06 by Ryan.Vance #jira UE-43732 Fixing Android compile issues. We can't wrap portions of a macro with a definie. This should probably be some sort of recursive macro thing since there's so much overlap. Good enough for now. Change 3383353 on 2017/04/06 by Ryan.Vance Fixing include cycles. Change 3383509 on 2017/04/06 by Jeff.Fisher Merging //UE4/Dev-Main to Dev-VR (//UE4/Dev-VR) merging the stuff from dev-mobile [CL 3384106 by Ryan Vance in Main branch]
2017-04-06 22:03:51 -04:00
{
}
//=============================================================================
void FDefaultStereoLayers::StereoLayerRender(FRHICommandListImmediate& RHICmdList, const TArray<uint32> & LayersToRender, const FLayerRenderParams& RenderParams) const
{
check(IsInRenderingThread());
if (!LayersToRender.Num())
{
return;
}
IRendererModule& RendererModule = GetRendererModule();
using TOpaqueBlendState = TStaticBlendState<CW_RGBA, BO_Add, BF_One, BF_Zero, BO_Add, BF_One, BF_Zero>;
using TAlphaBlendState = TStaticBlendState<CW_RGBA, BO_Add, BF_SourceAlpha, BF_InverseSourceAlpha, BO_Add, BF_One, BF_InverseSourceAlpha>;
Copying //UE4/Dev-VR to //UE4/Dev-Main (Source: //UE4/Dev-VR @ 3383750) #lockdown Nick.Penwarden ========================== MAJOR FEATURES + CHANGES ========================== Change 3012064 on 2016/06/13 by Nick.Whiting Merging Main -> DevVR Change 3048060 on 2016/07/13 by Nick.Whiting Integrating CL 3045721 from //depot/Partners/Google/AndroidVR-DevVR Upgrade Android and iOS GVR SDK to the latest. Fix the flipped vignette issue when using Unreal's post processing distortion. Change the Daydream & Cardboard mode to use scanline racing. Deprecate the ability to turn off individual UI elements. Change 3235307 on 2016/12/14 by Keli.Hlodversson Filter out excluded HMD modules during FEngineLoop:PreInitHMDDevice. The final selection still happens in UEngine::InitializeHMDDevice as all HMD plugins have not been loaded during PreInit Change 3235308 on 2016/12/14 by Ryan.Vance #jira UEVR-478 Monoscopic far field improvements Shader changes are now gated behind the read only cvar vr.MonoscopicFarField. Changing this requires a shader compile. Moved the mono rendering mode to the cvar vr.MonoscopicFarFieldMode. This is writable, so users can enable/disable mono rendering on the fly if the above cvar is enabled. Only write to the alpha channel in the mobile base pass if the object is opaque and MONOSCOPIC_FAR_FIELD is defined. Addressed code review comments. Change 3235397 on 2016/12/14 by Keli.Hlodversson [Oculus] Only enable GearVR platform on Windows if Oculus service is running Original author: Loren.McQuade Change 3235762 on 2016/12/14 by Keli.Hlodversson Add explicit parentheses to placate the build bots. Change 3242318 on 2016/12/21 by Ryan.Vance Working around pixel density crash. Change 3242522 on 2016/12/21 by Ryan.Vance Missing flag clear so our adaptive test was always returning true. Change 3243173 on 2016/12/22 by Ryan.Vance Integrating post present callback implementation from 4.14.1 Change 3248633 on 2017/01/05 by Keli.Hlodversson Copying //Tasks/UE4/Dev-VR-Refactoring to Dev-VR-Minimal (//UE4/Dev-VR-Minimal) Change 3248723 on 2017/01/05 by Keli.Hlodversson Fix after merge. EnablePositionalTracking no longer exists. Change 3249484 on 2017/01/06 by Keli.Hlodversson Add missing includes Change 3249714 on 2017/01/06 by Keli.Hlodversson Remove monolithic header include Change 3249980 on 2017/01/06 by Keli.Hlodversson SteamVR: Remove leftover unused WindowMirrorMode member variable Change 3252432 on 2017/01/10 by Keli.Hlodversson Submitting change by Loren McQuade to fix monolithic builds. Unshelved from pending changelist '3251436': Change 3257373 on 2017/01/13 by Keli.Hlodversson #jira UEVR-411: Finish renaming/removing/remodelling the remaining Oculus (Rift+GearVR) commands #jira UEVR-412: Rename and merge remaining Morpheus console commands #jira UEVR-417: Remove Exec from IHeadMountedDisplay Change 3269971 on 2017/01/24 by Jeff.Fisher UEVR-498 move controller is missing world to meters UEVR-522 PS4 motion controller worldscale support. -Passing world to meters scale into getControllerOrientationAndPosition because the thing asking about it ought to be part of a world, and know what it should be. This also avoids making PS4 motion controllers dependent on the HMD. Note Google VR Controller doesn't do position, so doesnt' care about scale. Oculus already had internal threadsafe tracking of world scale, so I left that. Steam handles world scale below our input level. -Also adding PlayerIndex member to FSceneView so we can figure out which view the MotionControllerComponent should get its worldscale from for the late render thread update. #jira UEVR-498 #review-3384107 Change 3288308 on 2017/02/06 by Jeff.Fisher UEVR-517 Detect MotionController Connectivity -PS4 can only track 2 controllers and 1 hmd. Support for dealing with that is needed. -Also need to support multiple motion controller components mapped to a single controller. Licencees have done that before. -Created a new interface IMotionTrackingSystemManagement, and implements it for PS4Tracker on PS4. -Created a MotionTrackedDeviceFunctionLibrary to expose that interface to blueprint. -With those one can enable and disable tracking on ps4 controllers and query their state to stay within the controller tracking limit. -PS4Tracker also keeps a blackboard of the enable/disable state so that one can enable or disable controllers that have not been connected yet, and have them enable tracking or not when they are connected. -DS4 controller no longer jumps back to 000 if it loses tracking. #review-3384107 #jira UEVR-517 Change 3288309 on 2017/02/06 by Keli.Hlodversson Add file missing from CL#3257373. Change 3288311 on 2017/02/06 by Jeff.Fisher UEVR-517 Detect MotionController Connectivity - Test content. -tm-motionControllers has a third mode where all playstation motion controllers for player 0 are availalbe. You can toggle them to track or not with ctrl-P,G,L,R for pad, gun, leftmove, rightmove or with alt-P,G,L,R. Ctrl tests doing so via MotionControllerComponent. Alt tests doing so by player index and controller type enum. -ctrl-A disables tracking of all controllers -alt-A disables tracking of all controllers for player 0 -ctrl-D toggles enabling new controllers by default -Also fixed one button not working in one of the other test modes for the Aim (gun) controller. -The controller 'models' have an arrow out the front. It is black if disabled. Red if enabled, but no tracker is active, yellow if tracked but inertial only, and green if fully tracked by the camera. -This logic is in the QA_MoCoAll blueprint. Change 3291601 on 2017/02/07 by Jeff.Fisher UEVR-536 PSVR motion controller tracking problem with multiple controllers -Previous code called GetRelativeTransform from the render thread, but the game thread could update it at any time. This caches that transform so that it can be safely used in the render thread. #jira UEVR-536 #review-3384107 @Ryan.Vance Change 3292460 on 2017/02/08 by Jeff.Fisher PS4 sceVrTrackerGetResult() error warning logging improved, and explanatory comment added. Change 3308771 on 2017/02/17 by Keli.Hlodversson Rename GoogleVR console commands #jira UEVR-412 Change 3309156 on 2017/02/17 by Keli.Hlodversson Track changes in r.ScreenPercentage on GoogleVR and set RenderTargetSize accordingly. Change 3311999 on 2017/02/20 by Keli.Hlodversson Create a default implementation for RecordAnalytics. Also create an initial stub for FHeadMountedDisplayBase for future default implementations of common HMD functionality. Make implementing IHeadMountedDisplay::GetDeviceName mandatory instead of defaulting to "Unknown" #jira UE-21878 #jira UEVR-213 Change 3313467 on 2017/02/20 by Ryan.Vance #jira UE-41604 3278583 pCustomPresent->AllocateRenderTargetTexture may return false, if we blindly return true we can end up with an invalid render target since the fall back sceneviewport will be skipped. 3278536 Adding ovrError_NoHmd to our sanity check in OnStartGameFrame. Change 3314002 on 2017/02/21 by Keli.Hlodversson Fix compilation on PS4 and Linux Change 3326722 on 2017/03/01 by Jeff.Fisher Merging //UE4/Dev-Main to Dev-VR (//UE4/Dev-VR) Integrating 4.15 from main. Change 3327567 on 2017/03/01 by Jeff.Fisher UEVR-588 Oculus crash on "stereo on" when the proximity sensor is not triggered. Duplicating from Release-4.15 cl 3327481, 3327542 -Don't ovr_SubmitFrame when the layers need to be recreated. They stay dirty until rendering is unpaused. #jira UEVR-588 #review-3384107 Change 3328098 on 2017/03/01 by Jeff.Fisher 4.15 merge fixes -Fixed deprecated enum name function usage. -Fixed world scale usage in GoogleVRController. -Fixed compile break in PS4Tracker. Change 3328271 on 2017/03/01 by Jeff.Fisher 2.15 merge -restroging GoogleVRController::GetWorldToMetersScale... cause it is used everywhere. Change 3328307 on 2017/03/01 by Jeff.Fisher 4.15 merge -More googlevr worldscale fixes. Change 3328312 on 2017/03/01 by Jeff.Fisher 4.15 merge -removing 2 unused includes Change 3330610 on 2017/03/02 by Jeff.Fisher 4.15 merge -fixing linux build Change 3333952 on 2017/03/06 by Keli.Hlodversson Implement common stereo layer management base class and use it in SteamVR and PS4. Fixes an outstanding bug in SteamVR where texures are updated every frame regardles of whether the continous update flag is set or not. #jira UEVR-628 #jira UE-42555 Change 3334961 on 2017/03/07 by Keli.Hlodversson Add missing include to fix non-unity builds Change 3336200 on 2017/03/07 by Keli.Hlodversson Fix compilation issues. (https://ec-01.epicgames.net/commander/link/jobDetails/jobs/7568252?jobName=UE4+Dev-VR+-+CL+3334961+-+Nightly+Build&s=Jobs) * Pre VS2015 compilers don't like mixing wide and unmarked strings in concatenation. Unfortunately LOCTEXT hides the call to the TEXT macro, completely hinding the prefix (which only gets added to the first fragment.) * Switch apparently doesn't know how to format a size_t for analytics either. Also: Typo in backwards compatibility command name alias Change 3337347 on 2017/03/08 by Jeff.Fisher UE-42631 Stereo off while prox sensor uncovered causes low framerate -Setting maxfps appropriately on 'stereo on/off'. #review-3384107 #jira UE-42631 Change 3338385 on 2017/03/08 by Ryan.Vance r.DisableDistortion was only being used for the mobile renderer Change 3342301 on 2017/03/10 by patrickr.donovan Test updates to TM-VRSmoke. Increased lightmap resolution on QA_MeshTypes meshes to improve readbility and reliablility of tests involving said asset. Rebuilt lighting. Change 3348133 on 2017/03/15 by Ryan.Vance Moving mono cvars to scene rendering to avoid cross module references. There's not a good reason to have them in the hmd module anyway. Change 3348836 on 2017/03/15 by Ryan.Vance Direct multi-view support for gear vr Monoscopic far field with multi-view (blit and direct) support for gear vr Support for translucent objects on both sides of the mono clip plane (due to a sorting issue, objects that straddle the plane composite incorrectly) Fixed missing discards/clears in the multi-view blit Change 3348843 on 2017/03/15 by Ryan.Vance Fixing color/depth target size mismatch when screen percentage scaling results in a size that isn't divisible by 16. Change 3349276 on 2017/03/16 by Keli.Hlodversson Fixing compile errors in GoogleVR after merge from main. Change 3350932 on 2017/03/16 by Ryan.Vance Re-enabling the gearvr plugin on windows. Change 3351977 on 2017/03/17 by Jeff.Fisher Fixing masked member variable. Change 3352314 on 2017/03/17 by Ryan.Vance We need to ensure that we don't select different lod levels for each eye. Change 3352993 on 2017/03/17 by Nick.Whiting Integrating CL 3345824 from Android-DevVR to Dev-VR. Support for device depth pass in SceneCaptureComponent2D Change 3355185 on 2017/03/20 by Nick.Whiting Added ability to disable the autoloading splash screen, which would prevent the hide splash screen node from ever working Change 3355676 on 2017/03/20 by Nick.Whiting PR #3384: [GNUX] SteamVR, OpenGL patch. (Contributed by yaakuro), with some minor modifications Change 3357286 on 2017/03/21 by Jeff.Fisher Fixing GenerateProjectFiles, looks like the .config. was removed from these references in main some time ago. Change 3357435 on 2017/03/21 by Jeff.Fisher Fixing editor build break, looks like a merge mistake. Change 3359960 on 2017/03/23 by Keli.Hlodversson Prevent potential crash when drawing tracking sensor location. Also only fetch HMD location once instead of once per tracking sensor. Change 3361230 on 2017/03/23 by Jeff.Fisher Fixing linux build opengl include problem... maybe. Change 3361638 on 2017/03/23 by Jeff.Fisher Another guess at fixing linux build. Change 3364224 on 2017/03/24 by Keli.Hlodversson Initial implementation of UEVR-576 - Base emulated layer implementation #jira UEVR-668 - Base emulated layer implementation: Initial framework for overrideable default implementation #jira UEVR-669 - Base emulated layer implementation: Face Locked Layers Support #jira UEVR-670 - Base emulated layer implementation: Tracker Locked Layers Support #jira UEVR-671 - Base emulated layer implementation: World Locked Layers Support #jira UEVR-672 - Base emulated layer implementation: Add support for optionally rendering face locked layers into a separate layer Change 3364242 on 2017/03/24 by Keli.Hlodversson SteamVR layers do not support negatve Layer priorities Change 3364263 on 2017/03/24 by Jeff.Fisher Merging //UE4/Dev-Main to Dev-VR (//UE4/Dev-VR) Monoscopicfarfieldrendering was just 'accept source', Ryan is going to look at fixing it up. Change 3364472 on 2017/03/24 by Jeff.Fisher Merge fix Change 3364475 on 2017/03/24 by Jeff.Fisher Fixing gearvr include. Change 3364486 on 2017/03/24 by Jeff.Fisher merge fix Change 3364532 on 2017/03/24 by Ryan.Vance pso update for mono rendering and stereo layers. Change 3364599 on 2017/03/24 by Ryan.Vance Oculus changes for SI1.12 Change 3365159 on 2017/03/26 by Jeff.Fisher include fix Change 3365182 on 2017/03/26 by Jeff.Fisher include fix Change 3366087 on 2017/03/27 by Ryan.Vance Remaining files from Oculus changes for SI1.12 merge request. Fixing a bug in OnlineSubsystem. Temporarily changing the eye padding change to be a shader clear to work around a clear color binding issue. Change 3366492 on 2017/03/27 by Ryan.Vance #jira UE-43294 Moved the clear before we setup state for drawing the mirror window content. It was stomping over state after the pso changes. Going to leave the shader clear in the rift prerender for clearing the eye padding for now. Change 3366929 on 2017/03/27 by Ryan.Vance Fixing compile error Change 3368549 on 2017/03/28 by Jeff.Fisher Merging Change: 3357998 from //UE4/Partner-Google-VR/Engine/... to Dev-VR Upgrade Google VR Plugin to v1.3: *Upgraded GVR NDK to 1.30.0 *Changed some BlueprintFunction to use BlueprintPure *Add the missing bDaydream flag in UEDeployAndroid.cs #review-3384107 Change 3368975 on 2017/03/28 by Ryan.Vance CIS clean up #jira UE-43428, UE-43429, UE-43426, UE-43427 Change 3369028 on 2017/03/28 by Ryan.Vance This is not exacly 'correct', but it's at least what the code was trying to do. Change 3370203 on 2017/03/29 by Ryan.Vance Adding gear vr controller component support. Change 3370918 on 2017/03/29 by Ryan.Vance Merging 3370569 using Partner-Google-VR_to_DevVR Change 3371030 on 2017/03/29 by Ryan.Vance Fixing linux build errors #jira UE-43426 Change 3371036 on 2017/03/29 by Ryan.Vance Oculus 4.16 integration. Not terribly happy with the use of std::string. They promised to clean this up for the next release. Change 3373495 on 2017/03/30 by Jeff.Fisher Merging from Dev-Main, in preparation for 4.16 Change 3373578 on 2017/03/30 by Jeff.Fisher build break, one comma short Change 3373870 on 2017/03/31 by Jeff.Fisher Include order fix. Change 3374001 on 2017/03/31 by Keli.Hlodversson Use DefaultStereoLayers as base for Morpheus implementation. #jira UEVR-709 #jira UE-42919 #rb: Jeff.Fisher Change 3374004 on 2017/03/31 by Keli.Hlodversson Fix rendering for the default Stereo Layers implementation on mobile. Depth test was set to "Never" instead of "Always" Destination texture on GLES is flipped on the Y axis, the coordinates are reversed in the shade when compiled on the relevant platforms. Change 3375125 on 2017/03/31 by Jeff.Fisher UE-43506 Ensure using VRPreview with GoogleVR -Removed the ensure, there is code in there to handle that case, and it works. #jira UE-43506 Change 3375294 on 2017/03/31 by nick.bullard Resaving Plugin content to resovle "saved with empty engine version" #jira UE-43537 Change 3375480 on 2017/03/31 by Jeff.Fisher UEVR-9 PSVR: Social Screen Support -Experimental social screen support for 4.16. -This does the basics of driving output through the Aux port in the proper format for display on the mirror monitor. -Only supports 30fps on the mirror monitor. 60fps will require the implementation of sony system dialogs to deal with incompatable system features (video streaming, remote play). -There is a project setting in Morpheus, under experiemental bEnableSocialScreenSeparateMode. This must be set to true to use this feature. When it is false we avoid allocating the back buffers. -MorpheusFunctionLibrary blueprints now have a node "SetSocialScreenMode" which can switch between SystemMirror (hardware supported mirroring), SeparateTest (alternates black and white), SeparateTexture (displays a texture, eg a render target, specified via blueprint), and SeparateMirror(puts the hmd render buffer on screen - which is both eyes, like a debug mode). -Also finally updated the bEnabled flag in project settings to tell people it's only for PC. #jira UEVR-9 #review-3384107 Change 3375540 on 2017/03/31 by Ryan.Vance #jira UE-43504 Fixing android build break when using a 64 bit isa. Change 3375655 on 2017/03/31 by Jeff.Fisher Fixing missing RGBAToYUV shader problem -This at least unblocks our process. Will revisit before zbr. Change 3375820 on 2017/04/01 by Jeff.Fisher Fixing linux build warning about HAS_MORPHEUS Change 3376050 on 2017/04/02 by Jeff.Fisher UE-43515 Step 'UE4Editor Static Analysis Win64' - Module.OnlineSubsystemOculus.cpp Warnings -Temporary fix for static analysis annotation warnings in OnlineSubsytemOculus. Longer term plan is to eliminate the use of the headers that trigger the warnings. -Just wrap all standard headers in static analysis disables. #jira UE-43515 Change 3376609 on 2017/04/03 by Jeff.Fisher Fixing rgbatoyuvshader include. Change 3377001 on 2017/04/03 by Jeff.Fisher UE-43547 Launch On PS4 fails during Run command - Missing global shader FRGBAToYUV420CS - shader c++ must be compiled so that it can be cooked for ps4. #jira UE-43547 Change 3379858 on 2017/04/04 by Jeff.Fisher Merging //UE4/Dev-Main to Dev-VR (//UE4/Dev-VR) pulling main this should get us ps4 sdk 4.508 Change 3379938 on 2017/04/04 by Ryan.Vance #jira UE-43548 If stereo layers are not being used, don't setup overlay targets as we will never clear/initialize them. The clear happens as part of the default layers PostRenderView_RenderThread call which wont be called if layers aren't being used in the scene. Change 3381519 on 2017/04/05 by Jeff.Fisher UEVR-733 PS4 sdk 4.500 hmd connection api changes break hmd connect. -Handling failure of sceHmdGetDeviceInformation if the hmd is powered off. It now returns an error code about an invalid handle in that case, rather than reporting unready. We just treat the error code like an unready status. #jira UEVR-733 #review-3384107 Change 3382019 on 2017/04/05 by Ryan.Vance Linux: add Vulkan support from dev editor: 3381593 Change 3382021 on 2017/04/05 by Ryan.Vance SteamVR on Linux using Vulkan OpenVR rev to 1_0_6 PR #3412: [GNUX] Initial support for SteamVR using Vulkan on GNUX platform. (Contributed by yaakuro) Change 3382076 on 2017/04/05 by Ryan.Vance Fixing linux steamvr lib path. It changed to something less silly in 1.0.6 Removing the steamvr plugin from the white list for linux. It's looking for a runtime that no one will have installed. Change 3383237 on 2017/04/06 by Ryan.Vance #jira UE-43732 Fixing Android compile issues. We can't wrap portions of a macro with a definie. This should probably be some sort of recursive macro thing since there's so much overlap. Good enough for now. Change 3383353 on 2017/04/06 by Ryan.Vance Fixing include cycles. Change 3383509 on 2017/04/06 by Jeff.Fisher Merging //UE4/Dev-Main to Dev-VR (//UE4/Dev-VR) merging the stuff from dev-mobile [CL 3384106 by Ryan Vance in Main branch]
2017-04-06 22:03:51 -04:00
// Set render state
FGraphicsPipelineStateInitializer GraphicsPSOInit;
RHICmdList.ApplyCachedRenderTargets(GraphicsPSOInit);
Copying //UE4/Dev-VR to //UE4/Dev-Main (Source: //UE4/Dev-VR @ 3443236) #lockdown Nick.Penwarden #rb none ========================== MAJOR FEATURES + CHANGES ========================== Change 3385304 on 2017/04/07 by Ryan.Vance #jira UEVR-694 GL_TEXTURE_EXTERNAL_OES support hlslcc changes to support the TextureExternal keyword RHI changes to support RHICreateTextureExternal2D Fall back to a standard 2d texture on platforms without extension support Did not implement a shader cache solution as the resource is expected to be shared across processes, so recreating it from the shader cache would be a bad thing Change 3391376 on 2017/04/12 by Ben.Marsh Build: Add additional UE4Game targets for Dev-VR, to catch build failures in plugins that are disabled for games. Change 3392546 on 2017/04/13 by Jeff.Fisher Duplicating in Dev-VR (from Release-4.16) UEVR-734 PSVR sdk 4.5 tracking improvements UEVR-738 PSVR prediction time dynamic adjustment -New tracker profile and camera config to activate ps4 tracking improvements. -Calculating prediction time based on flip timings rather than assuming it will be a particular value. This makes the prediction time nearly perfect as long as we meet framerate and lets it adapt to the timing of when the prediction is made in the frame. -Changed reprojection fliparg to be the frame number, rather than a separate incrementor, so its more useful for debugging. #jira UEVR-734 #review-3391147 Change 3394508 on 2017/04/14 by Jeff.Fisher merge fix ShaderCacheTypes.h Change 3399628 on 2017/04/19 by Jeff.Fisher UEVR-582 PSVR not applying WorldToMeters for position accessor -Changed to apply WorldToMeters scale when we get the position data from PS4Tracker, so that the positions stored in MorpheusHMD are always in world space. #jira UEVR-582 #review-3398683 Change 3404200 on 2017/04/21 by Jeff.Fisher UEVR-239 GearVR headset worn/notworn notifications -Implemented the IHeadMountedDisplay accessor for this, and also hooked up the delegates that fire on PS4. -Implemented the IHeadMountedDisplay accessor for PS4. #jira UEVR-239 #review-3404174 @keli.hloedversson Change 3412688 on 2017/04/27 by Jeff.Fisher UEVR-766 PSVR test level improvements -VR/TM-MotionControllers --Hooked up QA_MoCoAll to the cycle of playercontrllers. --Added instructions for motion tracked device management controls, if the platform supports. -QA_MoCoAll --Switched tracking state colors to tracking spheres, becuase the arrows need to be not rendered in game for some configuration. --Added duplicate motion controller component to pad and another duplicate with disabled low latency tracking. -QA_MoCoDualShock --removed gun controller from this playercontroller, its redundant to the one in QA_MoCoAll -QA_MoCoComponents --world scale from controllers mode added ctrl-w, this is a good way to torture test world scale. #jira UEVR-766 Change 3413801 on 2017/04/28 by Keli.Hlodversson #jira UE-40220 StereoLayer splash layers are hardcoded to 8 by 4.5 meters (16:9 aspect ratio) on OculusRift Change 3429305 on 2017/05/08 by Keli.Hlodversson SteamVR Layers don't honor the (absence of) LAYER_FLAG_QUAD_PRESERVE_TEX_RATIO flag Avoid potential divide by zero in the DefaultStereoLayers implementation of the same flag. #jira UE-42855 Change 3429362 on 2017/05/08 by Ryan.Vance Integrating 3416918 for #jira UE-44404 Change 3429426 on 2017/05/08 by Keli.Hlodversson Set up a Test case for Layers in QA Game so that we can determine differences between platforms #jira UEVR-741 Change 3430829 on 2017/05/09 by Keli.Hlodversson Implement World-locked layer position type on SteamVR #jira UE-42940 Also fixes LAYER_FLAG_TEX_CONTINUOUS_UPDATE flag on SteamVR Change 3432895 on 2017/05/10 by Nick.Whiting Skipping recording of analytics if there is no device connected on startup, to prevent false reports when Oculus / SteamVR runtimes are installed on the user's machine #jira UE-37166 Change 3435917 on 2017/05/11 by Jeff.Fisher UE-44941 LoadErrors produced in log when opening TM-MotionControllers -LoadErrors:Error: Error /Game/Blueprints/QA_MoCoAll : Can't find file for asset. /Game/NewTextureRenderTarget2D -Removed the component that was referencing that. It was temporary test content, not meant to be submitted. #jira UE-44941 Change 3435938 on 2017/05/11 by Ryan.Vance Incorrect VertexDeclarationRHI for the hidden area mask pso. Change 3437197 on 2017/05/12 by Keli.Hlodversson Remove a irrelevant comment. Change 3437221 on 2017/05/12 by Keli.Hlodversson ... and now actually include the change that was supposed to go in CL#3437197 Remove a irrelevant comment. Change 3439359 on 2017/05/15 by Keli.Hlodversson Implement NoAlpha flag in DefauiltStereoLayers. #jira UEVR-777 Change 3439422 on 2017/05/15 by Keli.Hlodversson Fixes for CL#3439359 after review: Implement NoAlpha flag in DefauiltStereoLayers. #jira UEVR-777 Change 3439599 on 2017/05/15 by Jeff.Fisher UE-44962 Motion controller input not registered in TM-MotionControllers package -Pre-exising blueprint assumed only one textrenderactor in the level, but I added two more. It was working or not depending on the order in which they were constructed. -Now searching up the correct actor by Tag. #jira UE-44962 Change 3441176 on 2017/05/16 by Mike.Beach Can now explicitly hide components from a specific player through the player controller. Change 3441242 on 2017/05/16 by Mike.Beach Making it so any component can invoke a preview viewport in the editor (want it to be extended by scene capture components). Change 3441571 on 2017/05/16 by Mike.Beach Fixing CIS shadowed variable name issue (fallout from CL 3441176). Change 3443223 on 2017/05/17 by Mike.Beach Fixing root of shadowed variable name warning (now only in UT, fallout from 3441176) - renaming new base class variable so it doesn't conflict with third parties either. #jira UE-45120 [CL 3443810 by Mike Beach in Main branch]
2017-05-17 12:45:38 -04:00
Copying //UE4/Dev-VR to //UE4/Dev-Main (Source: //UE4/Dev-VR @ 3636795) #lockdown Nick.Penwarden ============================ MAJOR FEATURES & CHANGES ============================ Change 2932765 by Nick.Whiting Merging updated license files for Oculus libraries Change 3480552 by Dustin.Holmes Added map and gamemode for calibration #jira UEVR-808 Change 3502253 by Nick.Whiting Trying to fix up p4's botch of the merge Change 3513736 by Keli.Hlodversson Move duplicated late update code into a common FLateUpdateManager #jira UEVR-893 Change 3514798 by Mike.Beach #4.17 Exposing a way for Blueprint users to remap the SteamVR controller's d-pad buttons (clashes with the Oculus mappings). #jira UE-42634 Change 3516042 by Dustin.Holmes Runtime handedness changes in Vive controllers are now reflected when a new device is connected. Device mappings are also reset when a device disconnects, so that if it connects again it fully reregisters instead of just assuming the role it previously had. Change 3517781 by Keli.Hlodversson Remove unused local variable bUseCustomPresentTexture Change 3517951 by Mike.Beach #4.17 Guarding against dereferencing a null pointer. Defaulting to the identity when we don't (yet) have a valid head pose to use. #jira UE-43685 Change 3518142 by Mike.Beach #4.17 Resolving fallout from bad merge (CL 3514868) - checking for teminating null in array (which was added to keep ARRAY_COUNT from acting on an empty array). Change 3523183 by Ryan.Vance #jira UE-46493, UEVR-661 Fixes GearVR only displaying a black screen on startup Fixes GearVR rendering incorrectly with mobile multi-view w/o direct mode enabled Adding mobile multi-view direct support to Daydream Change 3523718 by Nick.Whiting Adding core controller recentering delegate, and moving Google over to that system. Change 3527263 by Dan.Oconnor Mirror 3526925 for Nick Donaldson Change 3533596 by Dustin.Holmes Add garbage matte map, gamemode, and blueprints. Change 3533598 by Dustin.Holmes Expose the Set Tint Color and Opacity function for Widget Components as a Blueprint node. Change 3538139 by Mike.Beach Moving Oculus debug shader directly into Oculus plugin. #jira UE-47134 Change 3543185 by Nick.Atamas Address UEVR-891 : Merge in changes to Google Tango plugin. #jira UEVR-891 Change 3543285 by Nick.Atamas Merging using //UE4/Release-4.17/... -> //UE4/Dev-VR/... : Fixed UEVR-852: Adjusted Google Tango Plugins copyright to Copyright Google 2017. Removed Apache 2.0 license. Change 3545505 by Nick.Atamas Fix UEVR-851 : some fix-ups to MeshReconHUD and overlay material now has a material parameter for tinting the reconstructed mesh to help debug visualization. Change 3547549 by Jeff.Fisher Fixing DefaultSpectatorScreenController comment. Change 3551339 by Ryan.Vance #jira UE-44947 Editor primitives we not being handled correctly with ISR. Change 3554169 by Dustin.Holmes Reconcile missed Mixed Reality blueprint Change 3566825 by Mike.Beach Fixing some bad merges from Main (fallout from CL 3566309) Change 3567143 by Mike.Beach Copying //Tasks/UE4/Dev-MixedReality to Dev-VR-Minimal (//UE4/Dev-VR-Minimal) Change 3567572 by Mike.Beach [WIP] Adding some MR plugin dependencies to keep CIS quiet (SteamVR is just temporary, and will be removed). Change 3569116 by Jeff.Fisher Mixed reality build breaks for PS4 -Module is dependent on steamvr, so don't build it for PS4. -Removed unused class that doesn't compile with clang. Change 3569362 by Mike.Beach Organizing MR plugin content, to make way for new calibration modes. Change 3572802 by Jeff.Fisher UEVR-832 Add save/load system for calibrated camera settings -Moved MixedRealityConfigurationSaveGame to c++. #review-3571779 #jira UEVR-832 Change 3573864 by Mike.Beach [WIP] Initial work on MR cam alignment controller - records point/frustum data from user input. Change 3575900 by Jeff.Fisher Vive spectator flat rect expanded to match other platforms. -The vive 'full flat eye' rect was narrower than other platforms. Expanded it to be closer to the other platforms. Change 3578684 by Mike.Beach Static analysis fixes for CIS. #jira UE-48204, UE-48203, UE-48206 Change 3579460 by Mike.Beach [WIP] New calibration mode for camera alignment. #jira UEVR-785 Change 3581232 by Mike.Beach [WIP] Saving off alignment calibration data, and loading it on initialization. We skip alignment calibration if it has been configured. #jira UEVR-832 Change 3588411 by Mike.Beach [WIP] Adding calibration for compositing (chroma color, etc.). #jira UEVR-785 Change 3588541 by Mike.Beach [WIP] Cleaning up some display issues with the MR calibration. #jira UEVR-785 Change 3588680 by Mike.Beach Re-organizing the MR content, now that the alignment controller calibrates more than just alignment (renaming, etc.). Change 3588694 by Mike.Beach Renaming the MR calibration pawn (since it doesn't do any calibrating itself). Change 3591518 by Mike.Beach Copying //Tasks/UE4/Dev-MixedReality to Dev-VR-Minimal (//UE4/Dev-VR-Minimal) Change 3591671 by Ryan.Vance Debug stereo layer support This adds an option to render the debug canvas to a stereo layer which greatly improves console and stat readability in an hmd. Change 3591812 by Ryan.Vance Don't snap motion controllers to the origin when tracking is lost. Change 3594681 by Mike.Beach [WIP] Copying //Tasks/UE4/Dev-MixedReality to Dev-VR-Minimal (//UE4/Dev-VR-Minimal) Change 3596679 by Mike.Beach CIS fix (likely fallout from CL 3591671) - changing the order of initialization to better match the order of declaration. Change 3598191 by Jeff.Fisher UEVR-807 Setup M_MRVidProcessing to use 3D garbage matte data. -Created MixedRealityGarbageMatteCaptureComponent. An instance of this is spawned by and attached to MixedRealityCaptureComponent. Saved config data is loaded into it. It spawns a garbage matte actor. It then captures the garbage matte actor into a render target (which is set on MixedRealityCaptureComponent). #jira UEVR-807 #review-3598179 Change 3598276 by Mike.Beach Copying //Tasks/UE4/Dev-MixedReality to Dev-VR-Minimal (//UE4/Dev-VR-Minimal) Change 3598332 by Mike.Beach Guarding against a blind cast in the SteamVRChaperone component, which can be used cross platform (can't assume SteamVR). Change 3605271 by Mike.Beach Copying //Tasks/UE4/Dev-MixedReality to Dev-VR-Minimal (//UE4/Dev-VR-Minimal) Change 3608490 by Jeff.Fisher UEVR-987 Social Screen PS4 need to go to 'mirroring' for hmd setup dialog because system dialogs are not visible in separate mode. UEVR-988 SpectatorScreen Flickering UE-47234 Spectator screen: need frame delay before assigning dynamically created rendertarget to spectator texture UE-47310 Spectator Screen: crash if you release a render target which is assigned as the spectator texture -Test level content for all of these bugs. Change 3608883 by Jeff.Fisher UEVR-807 Setup M_MRVidProcessing to use 3D garbage matte data. -Set material to use the garbage matte render target. Change 3613292 by Mike.Beach Moving header fcn decl up, under the proper interface section (for organization's sake). Change 3616943 by Nick.Whiting Updating SteamVR libraries to 1.0.9, so we can bring back macOS support Change 3616970 by Nick.Whiting Adding in steamvr visible area mesh support. Can be toggled with vr.SteamVR.UseVisibleAreaMesh Change 3617866 by Mike.Beach Updating the VR template to reflect Oculus HMD device naming that we've keyed off of in these Blueprints (when determining which VR system we're running on). Change 3620108 by Mike.Beach [WIP] Adding an intermediate calibration step to tweak the MR virtual cam's alignment. Change 3620982 by Mike.Beach Tying off some loose ends with the MR calibration map: * Saving after each calibration phase * Fixing blocked input from garbage matte creation * Blocking input handling while exiting/previewing * Adding minimum radius for random screen pt Change 3621551 by Mike.Beach [MR] Leveraging camera support in the new media framework - working for limited cameras in calibration. Change 3621552 by Mike.Beach [MR calibration] - fixing it so when you first switch into compoisiting calibration it updates the property readout. Change 3621660 by Mike.Beach [MR calibration] Cleaning up how we display text (adding a struct to wrap the coresponding properties). Change 3623323 by Dustin.Holmes Fix buffer overflow when using 5+ Vive generic trackers and add more Special hand designations to cover the maximum 11 trackers Vive supports Change 3625900 by Keli.Hlodversson Remove fixed 16:9 aspect ratio for SteamVR and Oculus splash screens. Oculus was already fixed in CL#3413801, but regressed with plugin renaming and unificiation with GearVR in CL#3502152. #jira UE-40220 StereoLayer splash layers are hardcoded to 8 by 4.5 meters (16:9 aspect ratio) Change 3628409 by Mike.Beach Speculative CIS fix. #jira UE-49339 Change 3628440 by Nick.Whiting Fix for SteamVR OSX build issues Change 3628489 by Nick.Whiting Fix for win32 build break Change 3629045 by Mike.Beach Shadowed variable name fix (CIS). Change 3629202 by Arciel.Rekman Copying //UE4/Partner-Valve@3629179 to Dev-VR (//UE4/Dev-VR) Change 3629340 by Nick.Atamas Unshelved and resolved changes from Oculus. Change 3629772 by Ryan.Vance Fixing Oculus Vulkan related compile issues. This will break Oculus Vulkan support, but the code needs to be refactored anyway. Change 3629833 by Mike.Beach Fixing up CIS warning introduced by Oculus 1.17 changes - "unsafe conversion" warning #jira UE-49376 Change 3630696 by Jeff.Fisher UE-49415 //UE4/Dev-VR: Incremental UE4Editor Win64 completed with errors - 5 Errors Switching an include to a forward declaration -Not sure why the previous version didn't compile on the build machine, but fewer dependencies is good. Change 3630783 by Mike.Beach Fixing CIS compiler failures for our vehicle templates. #jira UE-49417 Change 3630802 by Mike.Beach Better fix than 3630783 - updating the vehicle template's stereoscopic check (fixing the VehicleHud.cpp logic as well) #jira UE-49417 Change 3630870 by Mike.Beach Pragma'ing out a function pointer cast warning. Good warning, but I figure we know what we're doing here and there's no other way around it. #jira UE-49376 Change 3630993 by Ryan.Vance Check to ensure we have a valid third camera before trying to use it. We could check >= 3 or if the left and right cameras are left/right stereo etc. decided to go with the simple test for now. Change 3631322 by Jeff.Fisher UEVR-909 PIP in Garbage Matte -Added ExternalGarbageMatteActor to MixedRealityGarbageMatteCaptureComponent and exposed it to blueprint though MixedRealityCaptureComponent. This lets us switch from using the normal mixed reality component save/load garbage matte data and instead use an external actor, in this case the actor we use to setup the garbage matte. Then the mask is able to capture that actor live as it is edited. -Also implemented GetViewOwner() so that we can use SetOwnerOnlySee to prevent other cameras and captures from seeing the garbage matte actor. -Calibration level now uses the external garbage matte actor to let the garbate matte mask live update. It also does a picture-in-picture preview of the mixed reality scene. 'P' can show/hide the garbage matte actor on that PIP preview. -Added SetUnmaskedPixelHighlightColor to MixedRealityCaptureComponent and the material. With this one can make unmasked video pixels more obvious in the output. The calibration level has this mapped to shift-P and makes pixels bright yellow to white. -Added blueprint to calibration level to make the garbage matte actor visible in the mixed reality capture. That is bound to ctrl-g. -GarbageMatteActors spawned by the mixed reality capture component are now attached to the vr origin. The calibration level now saves garbage matte mesh transforms relative to the vr origin. -The garbage matte mesh is now plugin content, and is referenced in the mixedrealitycomponent default object, so it is cooked in any project that includes the plugin. -Fog and AtmosphericFog no longer affect the garbage matte mask capture... there may be other things we need to turn off there. #review-3618345 #jira UEVR-909 Change 3631362 by Keli.Hlodversson #jira UE-49418 Exiting Google Instant Preview displays half of the editor viewport as black. Note convoluted fix: passing bIsStereoScopic3D to IsActiveThisFrame. ISceneViewExtension code cannot rely on StereoRenderingDevice->IsStereoEnabled to know whether to render in stereo, as the current viewport widget may disable it. This was not a problem before the refactoring, as HMD-related viewextensions were only added to the active list after establishing that stereo indeed was enabled and allowed by the current view port widget. Change 3631887 by Jeff.Fisher Fixing IsActiveThisFrame build break. Change 3632206 by Nick.Atamas Fix for UE-49413. Registering FOculusHMD as an extensions the same way as others: now creates an XRCamera that passes all the calls back to the HMD. Change 3632264 by Nick.Whiting Fix for Vive rendering getting cropped off due to invalid subrect values being submitted to the compositor. Change 3632340 by Nick.Atamas Merged in change from Loren; opted for our solution to ViewExtensions instead of the one in the changelist. Original description below. Change 3632214 by Loren.McQuade@Loren.McQuade_Dev-VR on 2017/09/07 19:51:29 *pending* [Dev-VR] Added OculusHMD_SceneViewExtension, PlayerPosition/PlayerOrientation values, FOculusHMD::GetRelativeEyePose cross-eyed madness (CL 3631541, 3631687) Change 3632353 by Ryan.Vance #jira UE-49468 Don't apply xr camera rotation on the player controller when not using xr tracking. Change 3632735 by Keli.Hlodversson Better fix for #jira UE-49413. Revert oculus xr camera code and use that one can have more than one view extension registered instead. Use GetPriority to have the OculusHMD view extension code execute after the default xr camera. The xr camera subclass did not forward the calls to ISceneViewExtension to the parent, breaking various functionality such as late update. Fixes a crash when entering VR pie twice, back to back. Change 3632752 by Keli.Hlodversson Applying change 3632592 by Loren.McQuade@Loren.McQuade_Dev-VR_Branch on 2017/09/08 02:08:22 [Dev-VR] Push //UE4/Partner-Oculus@3632591 #rb merge //UE4/Partner-Oculus to //UE4/Dev-VR/... Reverted OculusHMD_XRCamera changes, as that clas has been removed in the interim. Change 3633211 by Mike.Beach Backing out Oculus MotionController hiding that accidently got submitted - we decided not to adopt this change originally. Change 3633315 by Jeff.Fisher merge from main with dev-platform problem children -expecting SDRBackBuffer stuff to be wrong. Change 3634006 by Mike.Beach Resurecting Oculus clip plane settings which got dropped in the IXR refactor. #jira UE-49520 Change 3634639 by Keli.Hlodversson Avoid include cycle https://ec-01.epicgames.net/commander/link/jobStepDetails/jobSteps/68863219?stepName=UE4Editor%20Static%20Analysis%20Win64%20%28IncludeTool%29&jobId=7995809&jobName=UE4%20Dev-VR%20-%20CL%203632752%20-%20Nightly%20Build&tabGroup=diagnosticHeader&firstPage=1 Change 3634641 by Jeff.Fisher UE-49535 Lighting is blown out when playing in VR Preview on Vive -Need pixel format to be PF_B8G8R8A8 for vr, now the plugins all build their render target and use that format. #review-3634623 Change 3634682 by Jeff.Fisher IHeadMountedDisplay forward declarations needed. Change 3634690 by Ryan.Vance We can't override the screen percentage when rendering for stereo #jira UE-49287 Change 3635970 by Keli.Hlodversson #jira UE-49563 Crash while opening QA-Game Referencing SharedPointer.h Verify that StereoRendering is valid before calling IsStereoEnabled() Change 3635979 by Mike.Beach CIS static analysis fix - checking a ptr for null before we use it. #jira UE-49531 Change 3636059 by Mike.Beach Fixing XR system name aliasing for the -hmd command. [CL 3638830 by Ryan Vance in Main branch]
2017-09-12 11:27:30 -04:00
GraphicsPSOInit.RasterizerState = TStaticRasterizerState<FM_Solid, CM_None, true, false>::GetRHI();
Copying //UE4/Dev-VR to //UE4/Dev-Main (Source: //UE4/Dev-VR @ 3383750) #lockdown Nick.Penwarden ========================== MAJOR FEATURES + CHANGES ========================== Change 3012064 on 2016/06/13 by Nick.Whiting Merging Main -> DevVR Change 3048060 on 2016/07/13 by Nick.Whiting Integrating CL 3045721 from //depot/Partners/Google/AndroidVR-DevVR Upgrade Android and iOS GVR SDK to the latest. Fix the flipped vignette issue when using Unreal's post processing distortion. Change the Daydream & Cardboard mode to use scanline racing. Deprecate the ability to turn off individual UI elements. Change 3235307 on 2016/12/14 by Keli.Hlodversson Filter out excluded HMD modules during FEngineLoop:PreInitHMDDevice. The final selection still happens in UEngine::InitializeHMDDevice as all HMD plugins have not been loaded during PreInit Change 3235308 on 2016/12/14 by Ryan.Vance #jira UEVR-478 Monoscopic far field improvements Shader changes are now gated behind the read only cvar vr.MonoscopicFarField. Changing this requires a shader compile. Moved the mono rendering mode to the cvar vr.MonoscopicFarFieldMode. This is writable, so users can enable/disable mono rendering on the fly if the above cvar is enabled. Only write to the alpha channel in the mobile base pass if the object is opaque and MONOSCOPIC_FAR_FIELD is defined. Addressed code review comments. Change 3235397 on 2016/12/14 by Keli.Hlodversson [Oculus] Only enable GearVR platform on Windows if Oculus service is running Original author: Loren.McQuade Change 3235762 on 2016/12/14 by Keli.Hlodversson Add explicit parentheses to placate the build bots. Change 3242318 on 2016/12/21 by Ryan.Vance Working around pixel density crash. Change 3242522 on 2016/12/21 by Ryan.Vance Missing flag clear so our adaptive test was always returning true. Change 3243173 on 2016/12/22 by Ryan.Vance Integrating post present callback implementation from 4.14.1 Change 3248633 on 2017/01/05 by Keli.Hlodversson Copying //Tasks/UE4/Dev-VR-Refactoring to Dev-VR-Minimal (//UE4/Dev-VR-Minimal) Change 3248723 on 2017/01/05 by Keli.Hlodversson Fix after merge. EnablePositionalTracking no longer exists. Change 3249484 on 2017/01/06 by Keli.Hlodversson Add missing includes Change 3249714 on 2017/01/06 by Keli.Hlodversson Remove monolithic header include Change 3249980 on 2017/01/06 by Keli.Hlodversson SteamVR: Remove leftover unused WindowMirrorMode member variable Change 3252432 on 2017/01/10 by Keli.Hlodversson Submitting change by Loren McQuade to fix monolithic builds. Unshelved from pending changelist '3251436': Change 3257373 on 2017/01/13 by Keli.Hlodversson #jira UEVR-411: Finish renaming/removing/remodelling the remaining Oculus (Rift+GearVR) commands #jira UEVR-412: Rename and merge remaining Morpheus console commands #jira UEVR-417: Remove Exec from IHeadMountedDisplay Change 3269971 on 2017/01/24 by Jeff.Fisher UEVR-498 move controller is missing world to meters UEVR-522 PS4 motion controller worldscale support. -Passing world to meters scale into getControllerOrientationAndPosition because the thing asking about it ought to be part of a world, and know what it should be. This also avoids making PS4 motion controllers dependent on the HMD. Note Google VR Controller doesn't do position, so doesnt' care about scale. Oculus already had internal threadsafe tracking of world scale, so I left that. Steam handles world scale below our input level. -Also adding PlayerIndex member to FSceneView so we can figure out which view the MotionControllerComponent should get its worldscale from for the late render thread update. #jira UEVR-498 #review-3384107 Change 3288308 on 2017/02/06 by Jeff.Fisher UEVR-517 Detect MotionController Connectivity -PS4 can only track 2 controllers and 1 hmd. Support for dealing with that is needed. -Also need to support multiple motion controller components mapped to a single controller. Licencees have done that before. -Created a new interface IMotionTrackingSystemManagement, and implements it for PS4Tracker on PS4. -Created a MotionTrackedDeviceFunctionLibrary to expose that interface to blueprint. -With those one can enable and disable tracking on ps4 controllers and query their state to stay within the controller tracking limit. -PS4Tracker also keeps a blackboard of the enable/disable state so that one can enable or disable controllers that have not been connected yet, and have them enable tracking or not when they are connected. -DS4 controller no longer jumps back to 000 if it loses tracking. #review-3384107 #jira UEVR-517 Change 3288309 on 2017/02/06 by Keli.Hlodversson Add file missing from CL#3257373. Change 3288311 on 2017/02/06 by Jeff.Fisher UEVR-517 Detect MotionController Connectivity - Test content. -tm-motionControllers has a third mode where all playstation motion controllers for player 0 are availalbe. You can toggle them to track or not with ctrl-P,G,L,R for pad, gun, leftmove, rightmove or with alt-P,G,L,R. Ctrl tests doing so via MotionControllerComponent. Alt tests doing so by player index and controller type enum. -ctrl-A disables tracking of all controllers -alt-A disables tracking of all controllers for player 0 -ctrl-D toggles enabling new controllers by default -Also fixed one button not working in one of the other test modes for the Aim (gun) controller. -The controller 'models' have an arrow out the front. It is black if disabled. Red if enabled, but no tracker is active, yellow if tracked but inertial only, and green if fully tracked by the camera. -This logic is in the QA_MoCoAll blueprint. Change 3291601 on 2017/02/07 by Jeff.Fisher UEVR-536 PSVR motion controller tracking problem with multiple controllers -Previous code called GetRelativeTransform from the render thread, but the game thread could update it at any time. This caches that transform so that it can be safely used in the render thread. #jira UEVR-536 #review-3384107 @Ryan.Vance Change 3292460 on 2017/02/08 by Jeff.Fisher PS4 sceVrTrackerGetResult() error warning logging improved, and explanatory comment added. Change 3308771 on 2017/02/17 by Keli.Hlodversson Rename GoogleVR console commands #jira UEVR-412 Change 3309156 on 2017/02/17 by Keli.Hlodversson Track changes in r.ScreenPercentage on GoogleVR and set RenderTargetSize accordingly. Change 3311999 on 2017/02/20 by Keli.Hlodversson Create a default implementation for RecordAnalytics. Also create an initial stub for FHeadMountedDisplayBase for future default implementations of common HMD functionality. Make implementing IHeadMountedDisplay::GetDeviceName mandatory instead of defaulting to "Unknown" #jira UE-21878 #jira UEVR-213 Change 3313467 on 2017/02/20 by Ryan.Vance #jira UE-41604 3278583 pCustomPresent->AllocateRenderTargetTexture may return false, if we blindly return true we can end up with an invalid render target since the fall back sceneviewport will be skipped. 3278536 Adding ovrError_NoHmd to our sanity check in OnStartGameFrame. Change 3314002 on 2017/02/21 by Keli.Hlodversson Fix compilation on PS4 and Linux Change 3326722 on 2017/03/01 by Jeff.Fisher Merging //UE4/Dev-Main to Dev-VR (//UE4/Dev-VR) Integrating 4.15 from main. Change 3327567 on 2017/03/01 by Jeff.Fisher UEVR-588 Oculus crash on "stereo on" when the proximity sensor is not triggered. Duplicating from Release-4.15 cl 3327481, 3327542 -Don't ovr_SubmitFrame when the layers need to be recreated. They stay dirty until rendering is unpaused. #jira UEVR-588 #review-3384107 Change 3328098 on 2017/03/01 by Jeff.Fisher 4.15 merge fixes -Fixed deprecated enum name function usage. -Fixed world scale usage in GoogleVRController. -Fixed compile break in PS4Tracker. Change 3328271 on 2017/03/01 by Jeff.Fisher 2.15 merge -restroging GoogleVRController::GetWorldToMetersScale... cause it is used everywhere. Change 3328307 on 2017/03/01 by Jeff.Fisher 4.15 merge -More googlevr worldscale fixes. Change 3328312 on 2017/03/01 by Jeff.Fisher 4.15 merge -removing 2 unused includes Change 3330610 on 2017/03/02 by Jeff.Fisher 4.15 merge -fixing linux build Change 3333952 on 2017/03/06 by Keli.Hlodversson Implement common stereo layer management base class and use it in SteamVR and PS4. Fixes an outstanding bug in SteamVR where texures are updated every frame regardles of whether the continous update flag is set or not. #jira UEVR-628 #jira UE-42555 Change 3334961 on 2017/03/07 by Keli.Hlodversson Add missing include to fix non-unity builds Change 3336200 on 2017/03/07 by Keli.Hlodversson Fix compilation issues. (https://ec-01.epicgames.net/commander/link/jobDetails/jobs/7568252?jobName=UE4+Dev-VR+-+CL+3334961+-+Nightly+Build&s=Jobs) * Pre VS2015 compilers don't like mixing wide and unmarked strings in concatenation. Unfortunately LOCTEXT hides the call to the TEXT macro, completely hinding the prefix (which only gets added to the first fragment.) * Switch apparently doesn't know how to format a size_t for analytics either. Also: Typo in backwards compatibility command name alias Change 3337347 on 2017/03/08 by Jeff.Fisher UE-42631 Stereo off while prox sensor uncovered causes low framerate -Setting maxfps appropriately on 'stereo on/off'. #review-3384107 #jira UE-42631 Change 3338385 on 2017/03/08 by Ryan.Vance r.DisableDistortion was only being used for the mobile renderer Change 3342301 on 2017/03/10 by patrickr.donovan Test updates to TM-VRSmoke. Increased lightmap resolution on QA_MeshTypes meshes to improve readbility and reliablility of tests involving said asset. Rebuilt lighting. Change 3348133 on 2017/03/15 by Ryan.Vance Moving mono cvars to scene rendering to avoid cross module references. There's not a good reason to have them in the hmd module anyway. Change 3348836 on 2017/03/15 by Ryan.Vance Direct multi-view support for gear vr Monoscopic far field with multi-view (blit and direct) support for gear vr Support for translucent objects on both sides of the mono clip plane (due to a sorting issue, objects that straddle the plane composite incorrectly) Fixed missing discards/clears in the multi-view blit Change 3348843 on 2017/03/15 by Ryan.Vance Fixing color/depth target size mismatch when screen percentage scaling results in a size that isn't divisible by 16. Change 3349276 on 2017/03/16 by Keli.Hlodversson Fixing compile errors in GoogleVR after merge from main. Change 3350932 on 2017/03/16 by Ryan.Vance Re-enabling the gearvr plugin on windows. Change 3351977 on 2017/03/17 by Jeff.Fisher Fixing masked member variable. Change 3352314 on 2017/03/17 by Ryan.Vance We need to ensure that we don't select different lod levels for each eye. Change 3352993 on 2017/03/17 by Nick.Whiting Integrating CL 3345824 from Android-DevVR to Dev-VR. Support for device depth pass in SceneCaptureComponent2D Change 3355185 on 2017/03/20 by Nick.Whiting Added ability to disable the autoloading splash screen, which would prevent the hide splash screen node from ever working Change 3355676 on 2017/03/20 by Nick.Whiting PR #3384: [GNUX] SteamVR, OpenGL patch. (Contributed by yaakuro), with some minor modifications Change 3357286 on 2017/03/21 by Jeff.Fisher Fixing GenerateProjectFiles, looks like the .config. was removed from these references in main some time ago. Change 3357435 on 2017/03/21 by Jeff.Fisher Fixing editor build break, looks like a merge mistake. Change 3359960 on 2017/03/23 by Keli.Hlodversson Prevent potential crash when drawing tracking sensor location. Also only fetch HMD location once instead of once per tracking sensor. Change 3361230 on 2017/03/23 by Jeff.Fisher Fixing linux build opengl include problem... maybe. Change 3361638 on 2017/03/23 by Jeff.Fisher Another guess at fixing linux build. Change 3364224 on 2017/03/24 by Keli.Hlodversson Initial implementation of UEVR-576 - Base emulated layer implementation #jira UEVR-668 - Base emulated layer implementation: Initial framework for overrideable default implementation #jira UEVR-669 - Base emulated layer implementation: Face Locked Layers Support #jira UEVR-670 - Base emulated layer implementation: Tracker Locked Layers Support #jira UEVR-671 - Base emulated layer implementation: World Locked Layers Support #jira UEVR-672 - Base emulated layer implementation: Add support for optionally rendering face locked layers into a separate layer Change 3364242 on 2017/03/24 by Keli.Hlodversson SteamVR layers do not support negatve Layer priorities Change 3364263 on 2017/03/24 by Jeff.Fisher Merging //UE4/Dev-Main to Dev-VR (//UE4/Dev-VR) Monoscopicfarfieldrendering was just 'accept source', Ryan is going to look at fixing it up. Change 3364472 on 2017/03/24 by Jeff.Fisher Merge fix Change 3364475 on 2017/03/24 by Jeff.Fisher Fixing gearvr include. Change 3364486 on 2017/03/24 by Jeff.Fisher merge fix Change 3364532 on 2017/03/24 by Ryan.Vance pso update for mono rendering and stereo layers. Change 3364599 on 2017/03/24 by Ryan.Vance Oculus changes for SI1.12 Change 3365159 on 2017/03/26 by Jeff.Fisher include fix Change 3365182 on 2017/03/26 by Jeff.Fisher include fix Change 3366087 on 2017/03/27 by Ryan.Vance Remaining files from Oculus changes for SI1.12 merge request. Fixing a bug in OnlineSubsystem. Temporarily changing the eye padding change to be a shader clear to work around a clear color binding issue. Change 3366492 on 2017/03/27 by Ryan.Vance #jira UE-43294 Moved the clear before we setup state for drawing the mirror window content. It was stomping over state after the pso changes. Going to leave the shader clear in the rift prerender for clearing the eye padding for now. Change 3366929 on 2017/03/27 by Ryan.Vance Fixing compile error Change 3368549 on 2017/03/28 by Jeff.Fisher Merging Change: 3357998 from //UE4/Partner-Google-VR/Engine/... to Dev-VR Upgrade Google VR Plugin to v1.3: *Upgraded GVR NDK to 1.30.0 *Changed some BlueprintFunction to use BlueprintPure *Add the missing bDaydream flag in UEDeployAndroid.cs #review-3384107 Change 3368975 on 2017/03/28 by Ryan.Vance CIS clean up #jira UE-43428, UE-43429, UE-43426, UE-43427 Change 3369028 on 2017/03/28 by Ryan.Vance This is not exacly 'correct', but it's at least what the code was trying to do. Change 3370203 on 2017/03/29 by Ryan.Vance Adding gear vr controller component support. Change 3370918 on 2017/03/29 by Ryan.Vance Merging 3370569 using Partner-Google-VR_to_DevVR Change 3371030 on 2017/03/29 by Ryan.Vance Fixing linux build errors #jira UE-43426 Change 3371036 on 2017/03/29 by Ryan.Vance Oculus 4.16 integration. Not terribly happy with the use of std::string. They promised to clean this up for the next release. Change 3373495 on 2017/03/30 by Jeff.Fisher Merging from Dev-Main, in preparation for 4.16 Change 3373578 on 2017/03/30 by Jeff.Fisher build break, one comma short Change 3373870 on 2017/03/31 by Jeff.Fisher Include order fix. Change 3374001 on 2017/03/31 by Keli.Hlodversson Use DefaultStereoLayers as base for Morpheus implementation. #jira UEVR-709 #jira UE-42919 #rb: Jeff.Fisher Change 3374004 on 2017/03/31 by Keli.Hlodversson Fix rendering for the default Stereo Layers implementation on mobile. Depth test was set to "Never" instead of "Always" Destination texture on GLES is flipped on the Y axis, the coordinates are reversed in the shade when compiled on the relevant platforms. Change 3375125 on 2017/03/31 by Jeff.Fisher UE-43506 Ensure using VRPreview with GoogleVR -Removed the ensure, there is code in there to handle that case, and it works. #jira UE-43506 Change 3375294 on 2017/03/31 by nick.bullard Resaving Plugin content to resovle "saved with empty engine version" #jira UE-43537 Change 3375480 on 2017/03/31 by Jeff.Fisher UEVR-9 PSVR: Social Screen Support -Experimental social screen support for 4.16. -This does the basics of driving output through the Aux port in the proper format for display on the mirror monitor. -Only supports 30fps on the mirror monitor. 60fps will require the implementation of sony system dialogs to deal with incompatable system features (video streaming, remote play). -There is a project setting in Morpheus, under experiemental bEnableSocialScreenSeparateMode. This must be set to true to use this feature. When it is false we avoid allocating the back buffers. -MorpheusFunctionLibrary blueprints now have a node "SetSocialScreenMode" which can switch between SystemMirror (hardware supported mirroring), SeparateTest (alternates black and white), SeparateTexture (displays a texture, eg a render target, specified via blueprint), and SeparateMirror(puts the hmd render buffer on screen - which is both eyes, like a debug mode). -Also finally updated the bEnabled flag in project settings to tell people it's only for PC. #jira UEVR-9 #review-3384107 Change 3375540 on 2017/03/31 by Ryan.Vance #jira UE-43504 Fixing android build break when using a 64 bit isa. Change 3375655 on 2017/03/31 by Jeff.Fisher Fixing missing RGBAToYUV shader problem -This at least unblocks our process. Will revisit before zbr. Change 3375820 on 2017/04/01 by Jeff.Fisher Fixing linux build warning about HAS_MORPHEUS Change 3376050 on 2017/04/02 by Jeff.Fisher UE-43515 Step 'UE4Editor Static Analysis Win64' - Module.OnlineSubsystemOculus.cpp Warnings -Temporary fix for static analysis annotation warnings in OnlineSubsytemOculus. Longer term plan is to eliminate the use of the headers that trigger the warnings. -Just wrap all standard headers in static analysis disables. #jira UE-43515 Change 3376609 on 2017/04/03 by Jeff.Fisher Fixing rgbatoyuvshader include. Change 3377001 on 2017/04/03 by Jeff.Fisher UE-43547 Launch On PS4 fails during Run command - Missing global shader FRGBAToYUV420CS - shader c++ must be compiled so that it can be cooked for ps4. #jira UE-43547 Change 3379858 on 2017/04/04 by Jeff.Fisher Merging //UE4/Dev-Main to Dev-VR (//UE4/Dev-VR) pulling main this should get us ps4 sdk 4.508 Change 3379938 on 2017/04/04 by Ryan.Vance #jira UE-43548 If stereo layers are not being used, don't setup overlay targets as we will never clear/initialize them. The clear happens as part of the default layers PostRenderView_RenderThread call which wont be called if layers aren't being used in the scene. Change 3381519 on 2017/04/05 by Jeff.Fisher UEVR-733 PS4 sdk 4.500 hmd connection api changes break hmd connect. -Handling failure of sceHmdGetDeviceInformation if the hmd is powered off. It now returns an error code about an invalid handle in that case, rather than reporting unready. We just treat the error code like an unready status. #jira UEVR-733 #review-3384107 Change 3382019 on 2017/04/05 by Ryan.Vance Linux: add Vulkan support from dev editor: 3381593 Change 3382021 on 2017/04/05 by Ryan.Vance SteamVR on Linux using Vulkan OpenVR rev to 1_0_6 PR #3412: [GNUX] Initial support for SteamVR using Vulkan on GNUX platform. (Contributed by yaakuro) Change 3382076 on 2017/04/05 by Ryan.Vance Fixing linux steamvr lib path. It changed to something less silly in 1.0.6 Removing the steamvr plugin from the white list for linux. It's looking for a runtime that no one will have installed. Change 3383237 on 2017/04/06 by Ryan.Vance #jira UE-43732 Fixing Android compile issues. We can't wrap portions of a macro with a definie. This should probably be some sort of recursive macro thing since there's so much overlap. Good enough for now. Change 3383353 on 2017/04/06 by Ryan.Vance Fixing include cycles. Change 3383509 on 2017/04/06 by Jeff.Fisher Merging //UE4/Dev-Main to Dev-VR (//UE4/Dev-VR) merging the stuff from dev-mobile [CL 3384106 by Ryan Vance in Main branch]
2017-04-06 22:03:51 -04:00
GraphicsPSOInit.DepthStencilState = TStaticDepthStencilState<false, CF_Always>::GetRHI();
RHICmdList.SetScissorRect(false, 0, 0, 0, 0);
RHICmdList.SetViewport((float)RenderParams.Viewport.Min.X, (float)RenderParams.Viewport.Min.Y, 0, (float)RenderParams.Viewport.Max.X, (float)RenderParams.Viewport.Max.Y, 1.0f);
Copying //UE4/Dev-VR to //UE4/Dev-Main (Source: //UE4/Dev-VR @ 3383750) #lockdown Nick.Penwarden ========================== MAJOR FEATURES + CHANGES ========================== Change 3012064 on 2016/06/13 by Nick.Whiting Merging Main -> DevVR Change 3048060 on 2016/07/13 by Nick.Whiting Integrating CL 3045721 from //depot/Partners/Google/AndroidVR-DevVR Upgrade Android and iOS GVR SDK to the latest. Fix the flipped vignette issue when using Unreal's post processing distortion. Change the Daydream & Cardboard mode to use scanline racing. Deprecate the ability to turn off individual UI elements. Change 3235307 on 2016/12/14 by Keli.Hlodversson Filter out excluded HMD modules during FEngineLoop:PreInitHMDDevice. The final selection still happens in UEngine::InitializeHMDDevice as all HMD plugins have not been loaded during PreInit Change 3235308 on 2016/12/14 by Ryan.Vance #jira UEVR-478 Monoscopic far field improvements Shader changes are now gated behind the read only cvar vr.MonoscopicFarField. Changing this requires a shader compile. Moved the mono rendering mode to the cvar vr.MonoscopicFarFieldMode. This is writable, so users can enable/disable mono rendering on the fly if the above cvar is enabled. Only write to the alpha channel in the mobile base pass if the object is opaque and MONOSCOPIC_FAR_FIELD is defined. Addressed code review comments. Change 3235397 on 2016/12/14 by Keli.Hlodversson [Oculus] Only enable GearVR platform on Windows if Oculus service is running Original author: Loren.McQuade Change 3235762 on 2016/12/14 by Keli.Hlodversson Add explicit parentheses to placate the build bots. Change 3242318 on 2016/12/21 by Ryan.Vance Working around pixel density crash. Change 3242522 on 2016/12/21 by Ryan.Vance Missing flag clear so our adaptive test was always returning true. Change 3243173 on 2016/12/22 by Ryan.Vance Integrating post present callback implementation from 4.14.1 Change 3248633 on 2017/01/05 by Keli.Hlodversson Copying //Tasks/UE4/Dev-VR-Refactoring to Dev-VR-Minimal (//UE4/Dev-VR-Minimal) Change 3248723 on 2017/01/05 by Keli.Hlodversson Fix after merge. EnablePositionalTracking no longer exists. Change 3249484 on 2017/01/06 by Keli.Hlodversson Add missing includes Change 3249714 on 2017/01/06 by Keli.Hlodversson Remove monolithic header include Change 3249980 on 2017/01/06 by Keli.Hlodversson SteamVR: Remove leftover unused WindowMirrorMode member variable Change 3252432 on 2017/01/10 by Keli.Hlodversson Submitting change by Loren McQuade to fix monolithic builds. Unshelved from pending changelist '3251436': Change 3257373 on 2017/01/13 by Keli.Hlodversson #jira UEVR-411: Finish renaming/removing/remodelling the remaining Oculus (Rift+GearVR) commands #jira UEVR-412: Rename and merge remaining Morpheus console commands #jira UEVR-417: Remove Exec from IHeadMountedDisplay Change 3269971 on 2017/01/24 by Jeff.Fisher UEVR-498 move controller is missing world to meters UEVR-522 PS4 motion controller worldscale support. -Passing world to meters scale into getControllerOrientationAndPosition because the thing asking about it ought to be part of a world, and know what it should be. This also avoids making PS4 motion controllers dependent on the HMD. Note Google VR Controller doesn't do position, so doesnt' care about scale. Oculus already had internal threadsafe tracking of world scale, so I left that. Steam handles world scale below our input level. -Also adding PlayerIndex member to FSceneView so we can figure out which view the MotionControllerComponent should get its worldscale from for the late render thread update. #jira UEVR-498 #review-3384107 Change 3288308 on 2017/02/06 by Jeff.Fisher UEVR-517 Detect MotionController Connectivity -PS4 can only track 2 controllers and 1 hmd. Support for dealing with that is needed. -Also need to support multiple motion controller components mapped to a single controller. Licencees have done that before. -Created a new interface IMotionTrackingSystemManagement, and implements it for PS4Tracker on PS4. -Created a MotionTrackedDeviceFunctionLibrary to expose that interface to blueprint. -With those one can enable and disable tracking on ps4 controllers and query their state to stay within the controller tracking limit. -PS4Tracker also keeps a blackboard of the enable/disable state so that one can enable or disable controllers that have not been connected yet, and have them enable tracking or not when they are connected. -DS4 controller no longer jumps back to 000 if it loses tracking. #review-3384107 #jira UEVR-517 Change 3288309 on 2017/02/06 by Keli.Hlodversson Add file missing from CL#3257373. Change 3288311 on 2017/02/06 by Jeff.Fisher UEVR-517 Detect MotionController Connectivity - Test content. -tm-motionControllers has a third mode where all playstation motion controllers for player 0 are availalbe. You can toggle them to track or not with ctrl-P,G,L,R for pad, gun, leftmove, rightmove or with alt-P,G,L,R. Ctrl tests doing so via MotionControllerComponent. Alt tests doing so by player index and controller type enum. -ctrl-A disables tracking of all controllers -alt-A disables tracking of all controllers for player 0 -ctrl-D toggles enabling new controllers by default -Also fixed one button not working in one of the other test modes for the Aim (gun) controller. -The controller 'models' have an arrow out the front. It is black if disabled. Red if enabled, but no tracker is active, yellow if tracked but inertial only, and green if fully tracked by the camera. -This logic is in the QA_MoCoAll blueprint. Change 3291601 on 2017/02/07 by Jeff.Fisher UEVR-536 PSVR motion controller tracking problem with multiple controllers -Previous code called GetRelativeTransform from the render thread, but the game thread could update it at any time. This caches that transform so that it can be safely used in the render thread. #jira UEVR-536 #review-3384107 @Ryan.Vance Change 3292460 on 2017/02/08 by Jeff.Fisher PS4 sceVrTrackerGetResult() error warning logging improved, and explanatory comment added. Change 3308771 on 2017/02/17 by Keli.Hlodversson Rename GoogleVR console commands #jira UEVR-412 Change 3309156 on 2017/02/17 by Keli.Hlodversson Track changes in r.ScreenPercentage on GoogleVR and set RenderTargetSize accordingly. Change 3311999 on 2017/02/20 by Keli.Hlodversson Create a default implementation for RecordAnalytics. Also create an initial stub for FHeadMountedDisplayBase for future default implementations of common HMD functionality. Make implementing IHeadMountedDisplay::GetDeviceName mandatory instead of defaulting to "Unknown" #jira UE-21878 #jira UEVR-213 Change 3313467 on 2017/02/20 by Ryan.Vance #jira UE-41604 3278583 pCustomPresent->AllocateRenderTargetTexture may return false, if we blindly return true we can end up with an invalid render target since the fall back sceneviewport will be skipped. 3278536 Adding ovrError_NoHmd to our sanity check in OnStartGameFrame. Change 3314002 on 2017/02/21 by Keli.Hlodversson Fix compilation on PS4 and Linux Change 3326722 on 2017/03/01 by Jeff.Fisher Merging //UE4/Dev-Main to Dev-VR (//UE4/Dev-VR) Integrating 4.15 from main. Change 3327567 on 2017/03/01 by Jeff.Fisher UEVR-588 Oculus crash on "stereo on" when the proximity sensor is not triggered. Duplicating from Release-4.15 cl 3327481, 3327542 -Don't ovr_SubmitFrame when the layers need to be recreated. They stay dirty until rendering is unpaused. #jira UEVR-588 #review-3384107 Change 3328098 on 2017/03/01 by Jeff.Fisher 4.15 merge fixes -Fixed deprecated enum name function usage. -Fixed world scale usage in GoogleVRController. -Fixed compile break in PS4Tracker. Change 3328271 on 2017/03/01 by Jeff.Fisher 2.15 merge -restroging GoogleVRController::GetWorldToMetersScale... cause it is used everywhere. Change 3328307 on 2017/03/01 by Jeff.Fisher 4.15 merge -More googlevr worldscale fixes. Change 3328312 on 2017/03/01 by Jeff.Fisher 4.15 merge -removing 2 unused includes Change 3330610 on 2017/03/02 by Jeff.Fisher 4.15 merge -fixing linux build Change 3333952 on 2017/03/06 by Keli.Hlodversson Implement common stereo layer management base class and use it in SteamVR and PS4. Fixes an outstanding bug in SteamVR where texures are updated every frame regardles of whether the continous update flag is set or not. #jira UEVR-628 #jira UE-42555 Change 3334961 on 2017/03/07 by Keli.Hlodversson Add missing include to fix non-unity builds Change 3336200 on 2017/03/07 by Keli.Hlodversson Fix compilation issues. (https://ec-01.epicgames.net/commander/link/jobDetails/jobs/7568252?jobName=UE4+Dev-VR+-+CL+3334961+-+Nightly+Build&s=Jobs) * Pre VS2015 compilers don't like mixing wide and unmarked strings in concatenation. Unfortunately LOCTEXT hides the call to the TEXT macro, completely hinding the prefix (which only gets added to the first fragment.) * Switch apparently doesn't know how to format a size_t for analytics either. Also: Typo in backwards compatibility command name alias Change 3337347 on 2017/03/08 by Jeff.Fisher UE-42631 Stereo off while prox sensor uncovered causes low framerate -Setting maxfps appropriately on 'stereo on/off'. #review-3384107 #jira UE-42631 Change 3338385 on 2017/03/08 by Ryan.Vance r.DisableDistortion was only being used for the mobile renderer Change 3342301 on 2017/03/10 by patrickr.donovan Test updates to TM-VRSmoke. Increased lightmap resolution on QA_MeshTypes meshes to improve readbility and reliablility of tests involving said asset. Rebuilt lighting. Change 3348133 on 2017/03/15 by Ryan.Vance Moving mono cvars to scene rendering to avoid cross module references. There's not a good reason to have them in the hmd module anyway. Change 3348836 on 2017/03/15 by Ryan.Vance Direct multi-view support for gear vr Monoscopic far field with multi-view (blit and direct) support for gear vr Support for translucent objects on both sides of the mono clip plane (due to a sorting issue, objects that straddle the plane composite incorrectly) Fixed missing discards/clears in the multi-view blit Change 3348843 on 2017/03/15 by Ryan.Vance Fixing color/depth target size mismatch when screen percentage scaling results in a size that isn't divisible by 16. Change 3349276 on 2017/03/16 by Keli.Hlodversson Fixing compile errors in GoogleVR after merge from main. Change 3350932 on 2017/03/16 by Ryan.Vance Re-enabling the gearvr plugin on windows. Change 3351977 on 2017/03/17 by Jeff.Fisher Fixing masked member variable. Change 3352314 on 2017/03/17 by Ryan.Vance We need to ensure that we don't select different lod levels for each eye. Change 3352993 on 2017/03/17 by Nick.Whiting Integrating CL 3345824 from Android-DevVR to Dev-VR. Support for device depth pass in SceneCaptureComponent2D Change 3355185 on 2017/03/20 by Nick.Whiting Added ability to disable the autoloading splash screen, which would prevent the hide splash screen node from ever working Change 3355676 on 2017/03/20 by Nick.Whiting PR #3384: [GNUX] SteamVR, OpenGL patch. (Contributed by yaakuro), with some minor modifications Change 3357286 on 2017/03/21 by Jeff.Fisher Fixing GenerateProjectFiles, looks like the .config. was removed from these references in main some time ago. Change 3357435 on 2017/03/21 by Jeff.Fisher Fixing editor build break, looks like a merge mistake. Change 3359960 on 2017/03/23 by Keli.Hlodversson Prevent potential crash when drawing tracking sensor location. Also only fetch HMD location once instead of once per tracking sensor. Change 3361230 on 2017/03/23 by Jeff.Fisher Fixing linux build opengl include problem... maybe. Change 3361638 on 2017/03/23 by Jeff.Fisher Another guess at fixing linux build. Change 3364224 on 2017/03/24 by Keli.Hlodversson Initial implementation of UEVR-576 - Base emulated layer implementation #jira UEVR-668 - Base emulated layer implementation: Initial framework for overrideable default implementation #jira UEVR-669 - Base emulated layer implementation: Face Locked Layers Support #jira UEVR-670 - Base emulated layer implementation: Tracker Locked Layers Support #jira UEVR-671 - Base emulated layer implementation: World Locked Layers Support #jira UEVR-672 - Base emulated layer implementation: Add support for optionally rendering face locked layers into a separate layer Change 3364242 on 2017/03/24 by Keli.Hlodversson SteamVR layers do not support negatve Layer priorities Change 3364263 on 2017/03/24 by Jeff.Fisher Merging //UE4/Dev-Main to Dev-VR (//UE4/Dev-VR) Monoscopicfarfieldrendering was just 'accept source', Ryan is going to look at fixing it up. Change 3364472 on 2017/03/24 by Jeff.Fisher Merge fix Change 3364475 on 2017/03/24 by Jeff.Fisher Fixing gearvr include. Change 3364486 on 2017/03/24 by Jeff.Fisher merge fix Change 3364532 on 2017/03/24 by Ryan.Vance pso update for mono rendering and stereo layers. Change 3364599 on 2017/03/24 by Ryan.Vance Oculus changes for SI1.12 Change 3365159 on 2017/03/26 by Jeff.Fisher include fix Change 3365182 on 2017/03/26 by Jeff.Fisher include fix Change 3366087 on 2017/03/27 by Ryan.Vance Remaining files from Oculus changes for SI1.12 merge request. Fixing a bug in OnlineSubsystem. Temporarily changing the eye padding change to be a shader clear to work around a clear color binding issue. Change 3366492 on 2017/03/27 by Ryan.Vance #jira UE-43294 Moved the clear before we setup state for drawing the mirror window content. It was stomping over state after the pso changes. Going to leave the shader clear in the rift prerender for clearing the eye padding for now. Change 3366929 on 2017/03/27 by Ryan.Vance Fixing compile error Change 3368549 on 2017/03/28 by Jeff.Fisher Merging Change: 3357998 from //UE4/Partner-Google-VR/Engine/... to Dev-VR Upgrade Google VR Plugin to v1.3: *Upgraded GVR NDK to 1.30.0 *Changed some BlueprintFunction to use BlueprintPure *Add the missing bDaydream flag in UEDeployAndroid.cs #review-3384107 Change 3368975 on 2017/03/28 by Ryan.Vance CIS clean up #jira UE-43428, UE-43429, UE-43426, UE-43427 Change 3369028 on 2017/03/28 by Ryan.Vance This is not exacly 'correct', but it's at least what the code was trying to do. Change 3370203 on 2017/03/29 by Ryan.Vance Adding gear vr controller component support. Change 3370918 on 2017/03/29 by Ryan.Vance Merging 3370569 using Partner-Google-VR_to_DevVR Change 3371030 on 2017/03/29 by Ryan.Vance Fixing linux build errors #jira UE-43426 Change 3371036 on 2017/03/29 by Ryan.Vance Oculus 4.16 integration. Not terribly happy with the use of std::string. They promised to clean this up for the next release. Change 3373495 on 2017/03/30 by Jeff.Fisher Merging from Dev-Main, in preparation for 4.16 Change 3373578 on 2017/03/30 by Jeff.Fisher build break, one comma short Change 3373870 on 2017/03/31 by Jeff.Fisher Include order fix. Change 3374001 on 2017/03/31 by Keli.Hlodversson Use DefaultStereoLayers as base for Morpheus implementation. #jira UEVR-709 #jira UE-42919 #rb: Jeff.Fisher Change 3374004 on 2017/03/31 by Keli.Hlodversson Fix rendering for the default Stereo Layers implementation on mobile. Depth test was set to "Never" instead of "Always" Destination texture on GLES is flipped on the Y axis, the coordinates are reversed in the shade when compiled on the relevant platforms. Change 3375125 on 2017/03/31 by Jeff.Fisher UE-43506 Ensure using VRPreview with GoogleVR -Removed the ensure, there is code in there to handle that case, and it works. #jira UE-43506 Change 3375294 on 2017/03/31 by nick.bullard Resaving Plugin content to resovle "saved with empty engine version" #jira UE-43537 Change 3375480 on 2017/03/31 by Jeff.Fisher UEVR-9 PSVR: Social Screen Support -Experimental social screen support for 4.16. -This does the basics of driving output through the Aux port in the proper format for display on the mirror monitor. -Only supports 30fps on the mirror monitor. 60fps will require the implementation of sony system dialogs to deal with incompatable system features (video streaming, remote play). -There is a project setting in Morpheus, under experiemental bEnableSocialScreenSeparateMode. This must be set to true to use this feature. When it is false we avoid allocating the back buffers. -MorpheusFunctionLibrary blueprints now have a node "SetSocialScreenMode" which can switch between SystemMirror (hardware supported mirroring), SeparateTest (alternates black and white), SeparateTexture (displays a texture, eg a render target, specified via blueprint), and SeparateMirror(puts the hmd render buffer on screen - which is both eyes, like a debug mode). -Also finally updated the bEnabled flag in project settings to tell people it's only for PC. #jira UEVR-9 #review-3384107 Change 3375540 on 2017/03/31 by Ryan.Vance #jira UE-43504 Fixing android build break when using a 64 bit isa. Change 3375655 on 2017/03/31 by Jeff.Fisher Fixing missing RGBAToYUV shader problem -This at least unblocks our process. Will revisit before zbr. Change 3375820 on 2017/04/01 by Jeff.Fisher Fixing linux build warning about HAS_MORPHEUS Change 3376050 on 2017/04/02 by Jeff.Fisher UE-43515 Step 'UE4Editor Static Analysis Win64' - Module.OnlineSubsystemOculus.cpp Warnings -Temporary fix for static analysis annotation warnings in OnlineSubsytemOculus. Longer term plan is to eliminate the use of the headers that trigger the warnings. -Just wrap all standard headers in static analysis disables. #jira UE-43515 Change 3376609 on 2017/04/03 by Jeff.Fisher Fixing rgbatoyuvshader include. Change 3377001 on 2017/04/03 by Jeff.Fisher UE-43547 Launch On PS4 fails during Run command - Missing global shader FRGBAToYUV420CS - shader c++ must be compiled so that it can be cooked for ps4. #jira UE-43547 Change 3379858 on 2017/04/04 by Jeff.Fisher Merging //UE4/Dev-Main to Dev-VR (//UE4/Dev-VR) pulling main this should get us ps4 sdk 4.508 Change 3379938 on 2017/04/04 by Ryan.Vance #jira UE-43548 If stereo layers are not being used, don't setup overlay targets as we will never clear/initialize them. The clear happens as part of the default layers PostRenderView_RenderThread call which wont be called if layers aren't being used in the scene. Change 3381519 on 2017/04/05 by Jeff.Fisher UEVR-733 PS4 sdk 4.500 hmd connection api changes break hmd connect. -Handling failure of sceHmdGetDeviceInformation if the hmd is powered off. It now returns an error code about an invalid handle in that case, rather than reporting unready. We just treat the error code like an unready status. #jira UEVR-733 #review-3384107 Change 3382019 on 2017/04/05 by Ryan.Vance Linux: add Vulkan support from dev editor: 3381593 Change 3382021 on 2017/04/05 by Ryan.Vance SteamVR on Linux using Vulkan OpenVR rev to 1_0_6 PR #3412: [GNUX] Initial support for SteamVR using Vulkan on GNUX platform. (Contributed by yaakuro) Change 3382076 on 2017/04/05 by Ryan.Vance Fixing linux steamvr lib path. It changed to something less silly in 1.0.6 Removing the steamvr plugin from the white list for linux. It's looking for a runtime that no one will have installed. Change 3383237 on 2017/04/06 by Ryan.Vance #jira UE-43732 Fixing Android compile issues. We can't wrap portions of a macro with a definie. This should probably be some sort of recursive macro thing since there's so much overlap. Good enough for now. Change 3383353 on 2017/04/06 by Ryan.Vance Fixing include cycles. Change 3383509 on 2017/04/06 by Jeff.Fisher Merging //UE4/Dev-Main to Dev-VR (//UE4/Dev-VR) merging the stuff from dev-mobile [CL 3384106 by Ryan Vance in Main branch]
2017-04-06 22:03:51 -04:00
// Set initial shader state
Copying //UE4/Dev-VR to //UE4/Dev-Main (Source: //UE4/Dev-VR @ 3383750) #lockdown Nick.Penwarden ========================== MAJOR FEATURES + CHANGES ========================== Change 3012064 on 2016/06/13 by Nick.Whiting Merging Main -> DevVR Change 3048060 on 2016/07/13 by Nick.Whiting Integrating CL 3045721 from //depot/Partners/Google/AndroidVR-DevVR Upgrade Android and iOS GVR SDK to the latest. Fix the flipped vignette issue when using Unreal's post processing distortion. Change the Daydream & Cardboard mode to use scanline racing. Deprecate the ability to turn off individual UI elements. Change 3235307 on 2016/12/14 by Keli.Hlodversson Filter out excluded HMD modules during FEngineLoop:PreInitHMDDevice. The final selection still happens in UEngine::InitializeHMDDevice as all HMD plugins have not been loaded during PreInit Change 3235308 on 2016/12/14 by Ryan.Vance #jira UEVR-478 Monoscopic far field improvements Shader changes are now gated behind the read only cvar vr.MonoscopicFarField. Changing this requires a shader compile. Moved the mono rendering mode to the cvar vr.MonoscopicFarFieldMode. This is writable, so users can enable/disable mono rendering on the fly if the above cvar is enabled. Only write to the alpha channel in the mobile base pass if the object is opaque and MONOSCOPIC_FAR_FIELD is defined. Addressed code review comments. Change 3235397 on 2016/12/14 by Keli.Hlodversson [Oculus] Only enable GearVR platform on Windows if Oculus service is running Original author: Loren.McQuade Change 3235762 on 2016/12/14 by Keli.Hlodversson Add explicit parentheses to placate the build bots. Change 3242318 on 2016/12/21 by Ryan.Vance Working around pixel density crash. Change 3242522 on 2016/12/21 by Ryan.Vance Missing flag clear so our adaptive test was always returning true. Change 3243173 on 2016/12/22 by Ryan.Vance Integrating post present callback implementation from 4.14.1 Change 3248633 on 2017/01/05 by Keli.Hlodversson Copying //Tasks/UE4/Dev-VR-Refactoring to Dev-VR-Minimal (//UE4/Dev-VR-Minimal) Change 3248723 on 2017/01/05 by Keli.Hlodversson Fix after merge. EnablePositionalTracking no longer exists. Change 3249484 on 2017/01/06 by Keli.Hlodversson Add missing includes Change 3249714 on 2017/01/06 by Keli.Hlodversson Remove monolithic header include Change 3249980 on 2017/01/06 by Keli.Hlodversson SteamVR: Remove leftover unused WindowMirrorMode member variable Change 3252432 on 2017/01/10 by Keli.Hlodversson Submitting change by Loren McQuade to fix monolithic builds. Unshelved from pending changelist '3251436': Change 3257373 on 2017/01/13 by Keli.Hlodversson #jira UEVR-411: Finish renaming/removing/remodelling the remaining Oculus (Rift+GearVR) commands #jira UEVR-412: Rename and merge remaining Morpheus console commands #jira UEVR-417: Remove Exec from IHeadMountedDisplay Change 3269971 on 2017/01/24 by Jeff.Fisher UEVR-498 move controller is missing world to meters UEVR-522 PS4 motion controller worldscale support. -Passing world to meters scale into getControllerOrientationAndPosition because the thing asking about it ought to be part of a world, and know what it should be. This also avoids making PS4 motion controllers dependent on the HMD. Note Google VR Controller doesn't do position, so doesnt' care about scale. Oculus already had internal threadsafe tracking of world scale, so I left that. Steam handles world scale below our input level. -Also adding PlayerIndex member to FSceneView so we can figure out which view the MotionControllerComponent should get its worldscale from for the late render thread update. #jira UEVR-498 #review-3384107 Change 3288308 on 2017/02/06 by Jeff.Fisher UEVR-517 Detect MotionController Connectivity -PS4 can only track 2 controllers and 1 hmd. Support for dealing with that is needed. -Also need to support multiple motion controller components mapped to a single controller. Licencees have done that before. -Created a new interface IMotionTrackingSystemManagement, and implements it for PS4Tracker on PS4. -Created a MotionTrackedDeviceFunctionLibrary to expose that interface to blueprint. -With those one can enable and disable tracking on ps4 controllers and query their state to stay within the controller tracking limit. -PS4Tracker also keeps a blackboard of the enable/disable state so that one can enable or disable controllers that have not been connected yet, and have them enable tracking or not when they are connected. -DS4 controller no longer jumps back to 000 if it loses tracking. #review-3384107 #jira UEVR-517 Change 3288309 on 2017/02/06 by Keli.Hlodversson Add file missing from CL#3257373. Change 3288311 on 2017/02/06 by Jeff.Fisher UEVR-517 Detect MotionController Connectivity - Test content. -tm-motionControllers has a third mode where all playstation motion controllers for player 0 are availalbe. You can toggle them to track or not with ctrl-P,G,L,R for pad, gun, leftmove, rightmove or with alt-P,G,L,R. Ctrl tests doing so via MotionControllerComponent. Alt tests doing so by player index and controller type enum. -ctrl-A disables tracking of all controllers -alt-A disables tracking of all controllers for player 0 -ctrl-D toggles enabling new controllers by default -Also fixed one button not working in one of the other test modes for the Aim (gun) controller. -The controller 'models' have an arrow out the front. It is black if disabled. Red if enabled, but no tracker is active, yellow if tracked but inertial only, and green if fully tracked by the camera. -This logic is in the QA_MoCoAll blueprint. Change 3291601 on 2017/02/07 by Jeff.Fisher UEVR-536 PSVR motion controller tracking problem with multiple controllers -Previous code called GetRelativeTransform from the render thread, but the game thread could update it at any time. This caches that transform so that it can be safely used in the render thread. #jira UEVR-536 #review-3384107 @Ryan.Vance Change 3292460 on 2017/02/08 by Jeff.Fisher PS4 sceVrTrackerGetResult() error warning logging improved, and explanatory comment added. Change 3308771 on 2017/02/17 by Keli.Hlodversson Rename GoogleVR console commands #jira UEVR-412 Change 3309156 on 2017/02/17 by Keli.Hlodversson Track changes in r.ScreenPercentage on GoogleVR and set RenderTargetSize accordingly. Change 3311999 on 2017/02/20 by Keli.Hlodversson Create a default implementation for RecordAnalytics. Also create an initial stub for FHeadMountedDisplayBase for future default implementations of common HMD functionality. Make implementing IHeadMountedDisplay::GetDeviceName mandatory instead of defaulting to "Unknown" #jira UE-21878 #jira UEVR-213 Change 3313467 on 2017/02/20 by Ryan.Vance #jira UE-41604 3278583 pCustomPresent->AllocateRenderTargetTexture may return false, if we blindly return true we can end up with an invalid render target since the fall back sceneviewport will be skipped. 3278536 Adding ovrError_NoHmd to our sanity check in OnStartGameFrame. Change 3314002 on 2017/02/21 by Keli.Hlodversson Fix compilation on PS4 and Linux Change 3326722 on 2017/03/01 by Jeff.Fisher Merging //UE4/Dev-Main to Dev-VR (//UE4/Dev-VR) Integrating 4.15 from main. Change 3327567 on 2017/03/01 by Jeff.Fisher UEVR-588 Oculus crash on "stereo on" when the proximity sensor is not triggered. Duplicating from Release-4.15 cl 3327481, 3327542 -Don't ovr_SubmitFrame when the layers need to be recreated. They stay dirty until rendering is unpaused. #jira UEVR-588 #review-3384107 Change 3328098 on 2017/03/01 by Jeff.Fisher 4.15 merge fixes -Fixed deprecated enum name function usage. -Fixed world scale usage in GoogleVRController. -Fixed compile break in PS4Tracker. Change 3328271 on 2017/03/01 by Jeff.Fisher 2.15 merge -restroging GoogleVRController::GetWorldToMetersScale... cause it is used everywhere. Change 3328307 on 2017/03/01 by Jeff.Fisher 4.15 merge -More googlevr worldscale fixes. Change 3328312 on 2017/03/01 by Jeff.Fisher 4.15 merge -removing 2 unused includes Change 3330610 on 2017/03/02 by Jeff.Fisher 4.15 merge -fixing linux build Change 3333952 on 2017/03/06 by Keli.Hlodversson Implement common stereo layer management base class and use it in SteamVR and PS4. Fixes an outstanding bug in SteamVR where texures are updated every frame regardles of whether the continous update flag is set or not. #jira UEVR-628 #jira UE-42555 Change 3334961 on 2017/03/07 by Keli.Hlodversson Add missing include to fix non-unity builds Change 3336200 on 2017/03/07 by Keli.Hlodversson Fix compilation issues. (https://ec-01.epicgames.net/commander/link/jobDetails/jobs/7568252?jobName=UE4+Dev-VR+-+CL+3334961+-+Nightly+Build&s=Jobs) * Pre VS2015 compilers don't like mixing wide and unmarked strings in concatenation. Unfortunately LOCTEXT hides the call to the TEXT macro, completely hinding the prefix (which only gets added to the first fragment.) * Switch apparently doesn't know how to format a size_t for analytics either. Also: Typo in backwards compatibility command name alias Change 3337347 on 2017/03/08 by Jeff.Fisher UE-42631 Stereo off while prox sensor uncovered causes low framerate -Setting maxfps appropriately on 'stereo on/off'. #review-3384107 #jira UE-42631 Change 3338385 on 2017/03/08 by Ryan.Vance r.DisableDistortion was only being used for the mobile renderer Change 3342301 on 2017/03/10 by patrickr.donovan Test updates to TM-VRSmoke. Increased lightmap resolution on QA_MeshTypes meshes to improve readbility and reliablility of tests involving said asset. Rebuilt lighting. Change 3348133 on 2017/03/15 by Ryan.Vance Moving mono cvars to scene rendering to avoid cross module references. There's not a good reason to have them in the hmd module anyway. Change 3348836 on 2017/03/15 by Ryan.Vance Direct multi-view support for gear vr Monoscopic far field with multi-view (blit and direct) support for gear vr Support for translucent objects on both sides of the mono clip plane (due to a sorting issue, objects that straddle the plane composite incorrectly) Fixed missing discards/clears in the multi-view blit Change 3348843 on 2017/03/15 by Ryan.Vance Fixing color/depth target size mismatch when screen percentage scaling results in a size that isn't divisible by 16. Change 3349276 on 2017/03/16 by Keli.Hlodversson Fixing compile errors in GoogleVR after merge from main. Change 3350932 on 2017/03/16 by Ryan.Vance Re-enabling the gearvr plugin on windows. Change 3351977 on 2017/03/17 by Jeff.Fisher Fixing masked member variable. Change 3352314 on 2017/03/17 by Ryan.Vance We need to ensure that we don't select different lod levels for each eye. Change 3352993 on 2017/03/17 by Nick.Whiting Integrating CL 3345824 from Android-DevVR to Dev-VR. Support for device depth pass in SceneCaptureComponent2D Change 3355185 on 2017/03/20 by Nick.Whiting Added ability to disable the autoloading splash screen, which would prevent the hide splash screen node from ever working Change 3355676 on 2017/03/20 by Nick.Whiting PR #3384: [GNUX] SteamVR, OpenGL patch. (Contributed by yaakuro), with some minor modifications Change 3357286 on 2017/03/21 by Jeff.Fisher Fixing GenerateProjectFiles, looks like the .config. was removed from these references in main some time ago. Change 3357435 on 2017/03/21 by Jeff.Fisher Fixing editor build break, looks like a merge mistake. Change 3359960 on 2017/03/23 by Keli.Hlodversson Prevent potential crash when drawing tracking sensor location. Also only fetch HMD location once instead of once per tracking sensor. Change 3361230 on 2017/03/23 by Jeff.Fisher Fixing linux build opengl include problem... maybe. Change 3361638 on 2017/03/23 by Jeff.Fisher Another guess at fixing linux build. Change 3364224 on 2017/03/24 by Keli.Hlodversson Initial implementation of UEVR-576 - Base emulated layer implementation #jira UEVR-668 - Base emulated layer implementation: Initial framework for overrideable default implementation #jira UEVR-669 - Base emulated layer implementation: Face Locked Layers Support #jira UEVR-670 - Base emulated layer implementation: Tracker Locked Layers Support #jira UEVR-671 - Base emulated layer implementation: World Locked Layers Support #jira UEVR-672 - Base emulated layer implementation: Add support for optionally rendering face locked layers into a separate layer Change 3364242 on 2017/03/24 by Keli.Hlodversson SteamVR layers do not support negatve Layer priorities Change 3364263 on 2017/03/24 by Jeff.Fisher Merging //UE4/Dev-Main to Dev-VR (//UE4/Dev-VR) Monoscopicfarfieldrendering was just 'accept source', Ryan is going to look at fixing it up. Change 3364472 on 2017/03/24 by Jeff.Fisher Merge fix Change 3364475 on 2017/03/24 by Jeff.Fisher Fixing gearvr include. Change 3364486 on 2017/03/24 by Jeff.Fisher merge fix Change 3364532 on 2017/03/24 by Ryan.Vance pso update for mono rendering and stereo layers. Change 3364599 on 2017/03/24 by Ryan.Vance Oculus changes for SI1.12 Change 3365159 on 2017/03/26 by Jeff.Fisher include fix Change 3365182 on 2017/03/26 by Jeff.Fisher include fix Change 3366087 on 2017/03/27 by Ryan.Vance Remaining files from Oculus changes for SI1.12 merge request. Fixing a bug in OnlineSubsystem. Temporarily changing the eye padding change to be a shader clear to work around a clear color binding issue. Change 3366492 on 2017/03/27 by Ryan.Vance #jira UE-43294 Moved the clear before we setup state for drawing the mirror window content. It was stomping over state after the pso changes. Going to leave the shader clear in the rift prerender for clearing the eye padding for now. Change 3366929 on 2017/03/27 by Ryan.Vance Fixing compile error Change 3368549 on 2017/03/28 by Jeff.Fisher Merging Change: 3357998 from //UE4/Partner-Google-VR/Engine/... to Dev-VR Upgrade Google VR Plugin to v1.3: *Upgraded GVR NDK to 1.30.0 *Changed some BlueprintFunction to use BlueprintPure *Add the missing bDaydream flag in UEDeployAndroid.cs #review-3384107 Change 3368975 on 2017/03/28 by Ryan.Vance CIS clean up #jira UE-43428, UE-43429, UE-43426, UE-43427 Change 3369028 on 2017/03/28 by Ryan.Vance This is not exacly 'correct', but it's at least what the code was trying to do. Change 3370203 on 2017/03/29 by Ryan.Vance Adding gear vr controller component support. Change 3370918 on 2017/03/29 by Ryan.Vance Merging 3370569 using Partner-Google-VR_to_DevVR Change 3371030 on 2017/03/29 by Ryan.Vance Fixing linux build errors #jira UE-43426 Change 3371036 on 2017/03/29 by Ryan.Vance Oculus 4.16 integration. Not terribly happy with the use of std::string. They promised to clean this up for the next release. Change 3373495 on 2017/03/30 by Jeff.Fisher Merging from Dev-Main, in preparation for 4.16 Change 3373578 on 2017/03/30 by Jeff.Fisher build break, one comma short Change 3373870 on 2017/03/31 by Jeff.Fisher Include order fix. Change 3374001 on 2017/03/31 by Keli.Hlodversson Use DefaultStereoLayers as base for Morpheus implementation. #jira UEVR-709 #jira UE-42919 #rb: Jeff.Fisher Change 3374004 on 2017/03/31 by Keli.Hlodversson Fix rendering for the default Stereo Layers implementation on mobile. Depth test was set to "Never" instead of "Always" Destination texture on GLES is flipped on the Y axis, the coordinates are reversed in the shade when compiled on the relevant platforms. Change 3375125 on 2017/03/31 by Jeff.Fisher UE-43506 Ensure using VRPreview with GoogleVR -Removed the ensure, there is code in there to handle that case, and it works. #jira UE-43506 Change 3375294 on 2017/03/31 by nick.bullard Resaving Plugin content to resovle "saved with empty engine version" #jira UE-43537 Change 3375480 on 2017/03/31 by Jeff.Fisher UEVR-9 PSVR: Social Screen Support -Experimental social screen support for 4.16. -This does the basics of driving output through the Aux port in the proper format for display on the mirror monitor. -Only supports 30fps on the mirror monitor. 60fps will require the implementation of sony system dialogs to deal with incompatable system features (video streaming, remote play). -There is a project setting in Morpheus, under experiemental bEnableSocialScreenSeparateMode. This must be set to true to use this feature. When it is false we avoid allocating the back buffers. -MorpheusFunctionLibrary blueprints now have a node "SetSocialScreenMode" which can switch between SystemMirror (hardware supported mirroring), SeparateTest (alternates black and white), SeparateTexture (displays a texture, eg a render target, specified via blueprint), and SeparateMirror(puts the hmd render buffer on screen - which is both eyes, like a debug mode). -Also finally updated the bEnabled flag in project settings to tell people it's only for PC. #jira UEVR-9 #review-3384107 Change 3375540 on 2017/03/31 by Ryan.Vance #jira UE-43504 Fixing android build break when using a 64 bit isa. Change 3375655 on 2017/03/31 by Jeff.Fisher Fixing missing RGBAToYUV shader problem -This at least unblocks our process. Will revisit before zbr. Change 3375820 on 2017/04/01 by Jeff.Fisher Fixing linux build warning about HAS_MORPHEUS Change 3376050 on 2017/04/02 by Jeff.Fisher UE-43515 Step 'UE4Editor Static Analysis Win64' - Module.OnlineSubsystemOculus.cpp Warnings -Temporary fix for static analysis annotation warnings in OnlineSubsytemOculus. Longer term plan is to eliminate the use of the headers that trigger the warnings. -Just wrap all standard headers in static analysis disables. #jira UE-43515 Change 3376609 on 2017/04/03 by Jeff.Fisher Fixing rgbatoyuvshader include. Change 3377001 on 2017/04/03 by Jeff.Fisher UE-43547 Launch On PS4 fails during Run command - Missing global shader FRGBAToYUV420CS - shader c++ must be compiled so that it can be cooked for ps4. #jira UE-43547 Change 3379858 on 2017/04/04 by Jeff.Fisher Merging //UE4/Dev-Main to Dev-VR (//UE4/Dev-VR) pulling main this should get us ps4 sdk 4.508 Change 3379938 on 2017/04/04 by Ryan.Vance #jira UE-43548 If stereo layers are not being used, don't setup overlay targets as we will never clear/initialize them. The clear happens as part of the default layers PostRenderView_RenderThread call which wont be called if layers aren't being used in the scene. Change 3381519 on 2017/04/05 by Jeff.Fisher UEVR-733 PS4 sdk 4.500 hmd connection api changes break hmd connect. -Handling failure of sceHmdGetDeviceInformation if the hmd is powered off. It now returns an error code about an invalid handle in that case, rather than reporting unready. We just treat the error code like an unready status. #jira UEVR-733 #review-3384107 Change 3382019 on 2017/04/05 by Ryan.Vance Linux: add Vulkan support from dev editor: 3381593 Change 3382021 on 2017/04/05 by Ryan.Vance SteamVR on Linux using Vulkan OpenVR rev to 1_0_6 PR #3412: [GNUX] Initial support for SteamVR using Vulkan on GNUX platform. (Contributed by yaakuro) Change 3382076 on 2017/04/05 by Ryan.Vance Fixing linux steamvr lib path. It changed to something less silly in 1.0.6 Removing the steamvr plugin from the white list for linux. It's looking for a runtime that no one will have installed. Change 3383237 on 2017/04/06 by Ryan.Vance #jira UE-43732 Fixing Android compile issues. We can't wrap portions of a macro with a definie. This should probably be some sort of recursive macro thing since there's so much overlap. Good enough for now. Change 3383353 on 2017/04/06 by Ryan.Vance Fixing include cycles. Change 3383509 on 2017/04/06 by Jeff.Fisher Merging //UE4/Dev-Main to Dev-VR (//UE4/Dev-VR) merging the stuff from dev-mobile [CL 3384106 by Ryan Vance in Main branch]
2017-04-06 22:03:51 -04:00
auto ShaderMap = GetGlobalShaderMap(GMaxRHIFeatureLevel);
TShaderMapRef<FStereoLayerVS> VertexShader(ShaderMap);
TShaderMapRef<FStereoLayerPS> PixelShader(ShaderMap);
TShaderMapRef<FStereoLayerPS_External> PixelShader_External(ShaderMap);
Copying //UE4/Dev-VR to //UE4/Dev-Main (Source: //UE4/Dev-VR @ 3383750) #lockdown Nick.Penwarden ========================== MAJOR FEATURES + CHANGES ========================== Change 3012064 on 2016/06/13 by Nick.Whiting Merging Main -> DevVR Change 3048060 on 2016/07/13 by Nick.Whiting Integrating CL 3045721 from //depot/Partners/Google/AndroidVR-DevVR Upgrade Android and iOS GVR SDK to the latest. Fix the flipped vignette issue when using Unreal's post processing distortion. Change the Daydream & Cardboard mode to use scanline racing. Deprecate the ability to turn off individual UI elements. Change 3235307 on 2016/12/14 by Keli.Hlodversson Filter out excluded HMD modules during FEngineLoop:PreInitHMDDevice. The final selection still happens in UEngine::InitializeHMDDevice as all HMD plugins have not been loaded during PreInit Change 3235308 on 2016/12/14 by Ryan.Vance #jira UEVR-478 Monoscopic far field improvements Shader changes are now gated behind the read only cvar vr.MonoscopicFarField. Changing this requires a shader compile. Moved the mono rendering mode to the cvar vr.MonoscopicFarFieldMode. This is writable, so users can enable/disable mono rendering on the fly if the above cvar is enabled. Only write to the alpha channel in the mobile base pass if the object is opaque and MONOSCOPIC_FAR_FIELD is defined. Addressed code review comments. Change 3235397 on 2016/12/14 by Keli.Hlodversson [Oculus] Only enable GearVR platform on Windows if Oculus service is running Original author: Loren.McQuade Change 3235762 on 2016/12/14 by Keli.Hlodversson Add explicit parentheses to placate the build bots. Change 3242318 on 2016/12/21 by Ryan.Vance Working around pixel density crash. Change 3242522 on 2016/12/21 by Ryan.Vance Missing flag clear so our adaptive test was always returning true. Change 3243173 on 2016/12/22 by Ryan.Vance Integrating post present callback implementation from 4.14.1 Change 3248633 on 2017/01/05 by Keli.Hlodversson Copying //Tasks/UE4/Dev-VR-Refactoring to Dev-VR-Minimal (//UE4/Dev-VR-Minimal) Change 3248723 on 2017/01/05 by Keli.Hlodversson Fix after merge. EnablePositionalTracking no longer exists. Change 3249484 on 2017/01/06 by Keli.Hlodversson Add missing includes Change 3249714 on 2017/01/06 by Keli.Hlodversson Remove monolithic header include Change 3249980 on 2017/01/06 by Keli.Hlodversson SteamVR: Remove leftover unused WindowMirrorMode member variable Change 3252432 on 2017/01/10 by Keli.Hlodversson Submitting change by Loren McQuade to fix monolithic builds. Unshelved from pending changelist '3251436': Change 3257373 on 2017/01/13 by Keli.Hlodversson #jira UEVR-411: Finish renaming/removing/remodelling the remaining Oculus (Rift+GearVR) commands #jira UEVR-412: Rename and merge remaining Morpheus console commands #jira UEVR-417: Remove Exec from IHeadMountedDisplay Change 3269971 on 2017/01/24 by Jeff.Fisher UEVR-498 move controller is missing world to meters UEVR-522 PS4 motion controller worldscale support. -Passing world to meters scale into getControllerOrientationAndPosition because the thing asking about it ought to be part of a world, and know what it should be. This also avoids making PS4 motion controllers dependent on the HMD. Note Google VR Controller doesn't do position, so doesnt' care about scale. Oculus already had internal threadsafe tracking of world scale, so I left that. Steam handles world scale below our input level. -Also adding PlayerIndex member to FSceneView so we can figure out which view the MotionControllerComponent should get its worldscale from for the late render thread update. #jira UEVR-498 #review-3384107 Change 3288308 on 2017/02/06 by Jeff.Fisher UEVR-517 Detect MotionController Connectivity -PS4 can only track 2 controllers and 1 hmd. Support for dealing with that is needed. -Also need to support multiple motion controller components mapped to a single controller. Licencees have done that before. -Created a new interface IMotionTrackingSystemManagement, and implements it for PS4Tracker on PS4. -Created a MotionTrackedDeviceFunctionLibrary to expose that interface to blueprint. -With those one can enable and disable tracking on ps4 controllers and query their state to stay within the controller tracking limit. -PS4Tracker also keeps a blackboard of the enable/disable state so that one can enable or disable controllers that have not been connected yet, and have them enable tracking or not when they are connected. -DS4 controller no longer jumps back to 000 if it loses tracking. #review-3384107 #jira UEVR-517 Change 3288309 on 2017/02/06 by Keli.Hlodversson Add file missing from CL#3257373. Change 3288311 on 2017/02/06 by Jeff.Fisher UEVR-517 Detect MotionController Connectivity - Test content. -tm-motionControllers has a third mode where all playstation motion controllers for player 0 are availalbe. You can toggle them to track or not with ctrl-P,G,L,R for pad, gun, leftmove, rightmove or with alt-P,G,L,R. Ctrl tests doing so via MotionControllerComponent. Alt tests doing so by player index and controller type enum. -ctrl-A disables tracking of all controllers -alt-A disables tracking of all controllers for player 0 -ctrl-D toggles enabling new controllers by default -Also fixed one button not working in one of the other test modes for the Aim (gun) controller. -The controller 'models' have an arrow out the front. It is black if disabled. Red if enabled, but no tracker is active, yellow if tracked but inertial only, and green if fully tracked by the camera. -This logic is in the QA_MoCoAll blueprint. Change 3291601 on 2017/02/07 by Jeff.Fisher UEVR-536 PSVR motion controller tracking problem with multiple controllers -Previous code called GetRelativeTransform from the render thread, but the game thread could update it at any time. This caches that transform so that it can be safely used in the render thread. #jira UEVR-536 #review-3384107 @Ryan.Vance Change 3292460 on 2017/02/08 by Jeff.Fisher PS4 sceVrTrackerGetResult() error warning logging improved, and explanatory comment added. Change 3308771 on 2017/02/17 by Keli.Hlodversson Rename GoogleVR console commands #jira UEVR-412 Change 3309156 on 2017/02/17 by Keli.Hlodversson Track changes in r.ScreenPercentage on GoogleVR and set RenderTargetSize accordingly. Change 3311999 on 2017/02/20 by Keli.Hlodversson Create a default implementation for RecordAnalytics. Also create an initial stub for FHeadMountedDisplayBase for future default implementations of common HMD functionality. Make implementing IHeadMountedDisplay::GetDeviceName mandatory instead of defaulting to "Unknown" #jira UE-21878 #jira UEVR-213 Change 3313467 on 2017/02/20 by Ryan.Vance #jira UE-41604 3278583 pCustomPresent->AllocateRenderTargetTexture may return false, if we blindly return true we can end up with an invalid render target since the fall back sceneviewport will be skipped. 3278536 Adding ovrError_NoHmd to our sanity check in OnStartGameFrame. Change 3314002 on 2017/02/21 by Keli.Hlodversson Fix compilation on PS4 and Linux Change 3326722 on 2017/03/01 by Jeff.Fisher Merging //UE4/Dev-Main to Dev-VR (//UE4/Dev-VR) Integrating 4.15 from main. Change 3327567 on 2017/03/01 by Jeff.Fisher UEVR-588 Oculus crash on "stereo on" when the proximity sensor is not triggered. Duplicating from Release-4.15 cl 3327481, 3327542 -Don't ovr_SubmitFrame when the layers need to be recreated. They stay dirty until rendering is unpaused. #jira UEVR-588 #review-3384107 Change 3328098 on 2017/03/01 by Jeff.Fisher 4.15 merge fixes -Fixed deprecated enum name function usage. -Fixed world scale usage in GoogleVRController. -Fixed compile break in PS4Tracker. Change 3328271 on 2017/03/01 by Jeff.Fisher 2.15 merge -restroging GoogleVRController::GetWorldToMetersScale... cause it is used everywhere. Change 3328307 on 2017/03/01 by Jeff.Fisher 4.15 merge -More googlevr worldscale fixes. Change 3328312 on 2017/03/01 by Jeff.Fisher 4.15 merge -removing 2 unused includes Change 3330610 on 2017/03/02 by Jeff.Fisher 4.15 merge -fixing linux build Change 3333952 on 2017/03/06 by Keli.Hlodversson Implement common stereo layer management base class and use it in SteamVR and PS4. Fixes an outstanding bug in SteamVR where texures are updated every frame regardles of whether the continous update flag is set or not. #jira UEVR-628 #jira UE-42555 Change 3334961 on 2017/03/07 by Keli.Hlodversson Add missing include to fix non-unity builds Change 3336200 on 2017/03/07 by Keli.Hlodversson Fix compilation issues. (https://ec-01.epicgames.net/commander/link/jobDetails/jobs/7568252?jobName=UE4+Dev-VR+-+CL+3334961+-+Nightly+Build&s=Jobs) * Pre VS2015 compilers don't like mixing wide and unmarked strings in concatenation. Unfortunately LOCTEXT hides the call to the TEXT macro, completely hinding the prefix (which only gets added to the first fragment.) * Switch apparently doesn't know how to format a size_t for analytics either. Also: Typo in backwards compatibility command name alias Change 3337347 on 2017/03/08 by Jeff.Fisher UE-42631 Stereo off while prox sensor uncovered causes low framerate -Setting maxfps appropriately on 'stereo on/off'. #review-3384107 #jira UE-42631 Change 3338385 on 2017/03/08 by Ryan.Vance r.DisableDistortion was only being used for the mobile renderer Change 3342301 on 2017/03/10 by patrickr.donovan Test updates to TM-VRSmoke. Increased lightmap resolution on QA_MeshTypes meshes to improve readbility and reliablility of tests involving said asset. Rebuilt lighting. Change 3348133 on 2017/03/15 by Ryan.Vance Moving mono cvars to scene rendering to avoid cross module references. There's not a good reason to have them in the hmd module anyway. Change 3348836 on 2017/03/15 by Ryan.Vance Direct multi-view support for gear vr Monoscopic far field with multi-view (blit and direct) support for gear vr Support for translucent objects on both sides of the mono clip plane (due to a sorting issue, objects that straddle the plane composite incorrectly) Fixed missing discards/clears in the multi-view blit Change 3348843 on 2017/03/15 by Ryan.Vance Fixing color/depth target size mismatch when screen percentage scaling results in a size that isn't divisible by 16. Change 3349276 on 2017/03/16 by Keli.Hlodversson Fixing compile errors in GoogleVR after merge from main. Change 3350932 on 2017/03/16 by Ryan.Vance Re-enabling the gearvr plugin on windows. Change 3351977 on 2017/03/17 by Jeff.Fisher Fixing masked member variable. Change 3352314 on 2017/03/17 by Ryan.Vance We need to ensure that we don't select different lod levels for each eye. Change 3352993 on 2017/03/17 by Nick.Whiting Integrating CL 3345824 from Android-DevVR to Dev-VR. Support for device depth pass in SceneCaptureComponent2D Change 3355185 on 2017/03/20 by Nick.Whiting Added ability to disable the autoloading splash screen, which would prevent the hide splash screen node from ever working Change 3355676 on 2017/03/20 by Nick.Whiting PR #3384: [GNUX] SteamVR, OpenGL patch. (Contributed by yaakuro), with some minor modifications Change 3357286 on 2017/03/21 by Jeff.Fisher Fixing GenerateProjectFiles, looks like the .config. was removed from these references in main some time ago. Change 3357435 on 2017/03/21 by Jeff.Fisher Fixing editor build break, looks like a merge mistake. Change 3359960 on 2017/03/23 by Keli.Hlodversson Prevent potential crash when drawing tracking sensor location. Also only fetch HMD location once instead of once per tracking sensor. Change 3361230 on 2017/03/23 by Jeff.Fisher Fixing linux build opengl include problem... maybe. Change 3361638 on 2017/03/23 by Jeff.Fisher Another guess at fixing linux build. Change 3364224 on 2017/03/24 by Keli.Hlodversson Initial implementation of UEVR-576 - Base emulated layer implementation #jira UEVR-668 - Base emulated layer implementation: Initial framework for overrideable default implementation #jira UEVR-669 - Base emulated layer implementation: Face Locked Layers Support #jira UEVR-670 - Base emulated layer implementation: Tracker Locked Layers Support #jira UEVR-671 - Base emulated layer implementation: World Locked Layers Support #jira UEVR-672 - Base emulated layer implementation: Add support for optionally rendering face locked layers into a separate layer Change 3364242 on 2017/03/24 by Keli.Hlodversson SteamVR layers do not support negatve Layer priorities Change 3364263 on 2017/03/24 by Jeff.Fisher Merging //UE4/Dev-Main to Dev-VR (//UE4/Dev-VR) Monoscopicfarfieldrendering was just 'accept source', Ryan is going to look at fixing it up. Change 3364472 on 2017/03/24 by Jeff.Fisher Merge fix Change 3364475 on 2017/03/24 by Jeff.Fisher Fixing gearvr include. Change 3364486 on 2017/03/24 by Jeff.Fisher merge fix Change 3364532 on 2017/03/24 by Ryan.Vance pso update for mono rendering and stereo layers. Change 3364599 on 2017/03/24 by Ryan.Vance Oculus changes for SI1.12 Change 3365159 on 2017/03/26 by Jeff.Fisher include fix Change 3365182 on 2017/03/26 by Jeff.Fisher include fix Change 3366087 on 2017/03/27 by Ryan.Vance Remaining files from Oculus changes for SI1.12 merge request. Fixing a bug in OnlineSubsystem. Temporarily changing the eye padding change to be a shader clear to work around a clear color binding issue. Change 3366492 on 2017/03/27 by Ryan.Vance #jira UE-43294 Moved the clear before we setup state for drawing the mirror window content. It was stomping over state after the pso changes. Going to leave the shader clear in the rift prerender for clearing the eye padding for now. Change 3366929 on 2017/03/27 by Ryan.Vance Fixing compile error Change 3368549 on 2017/03/28 by Jeff.Fisher Merging Change: 3357998 from //UE4/Partner-Google-VR/Engine/... to Dev-VR Upgrade Google VR Plugin to v1.3: *Upgraded GVR NDK to 1.30.0 *Changed some BlueprintFunction to use BlueprintPure *Add the missing bDaydream flag in UEDeployAndroid.cs #review-3384107 Change 3368975 on 2017/03/28 by Ryan.Vance CIS clean up #jira UE-43428, UE-43429, UE-43426, UE-43427 Change 3369028 on 2017/03/28 by Ryan.Vance This is not exacly 'correct', but it's at least what the code was trying to do. Change 3370203 on 2017/03/29 by Ryan.Vance Adding gear vr controller component support. Change 3370918 on 2017/03/29 by Ryan.Vance Merging 3370569 using Partner-Google-VR_to_DevVR Change 3371030 on 2017/03/29 by Ryan.Vance Fixing linux build errors #jira UE-43426 Change 3371036 on 2017/03/29 by Ryan.Vance Oculus 4.16 integration. Not terribly happy with the use of std::string. They promised to clean this up for the next release. Change 3373495 on 2017/03/30 by Jeff.Fisher Merging from Dev-Main, in preparation for 4.16 Change 3373578 on 2017/03/30 by Jeff.Fisher build break, one comma short Change 3373870 on 2017/03/31 by Jeff.Fisher Include order fix. Change 3374001 on 2017/03/31 by Keli.Hlodversson Use DefaultStereoLayers as base for Morpheus implementation. #jira UEVR-709 #jira UE-42919 #rb: Jeff.Fisher Change 3374004 on 2017/03/31 by Keli.Hlodversson Fix rendering for the default Stereo Layers implementation on mobile. Depth test was set to "Never" instead of "Always" Destination texture on GLES is flipped on the Y axis, the coordinates are reversed in the shade when compiled on the relevant platforms. Change 3375125 on 2017/03/31 by Jeff.Fisher UE-43506 Ensure using VRPreview with GoogleVR -Removed the ensure, there is code in there to handle that case, and it works. #jira UE-43506 Change 3375294 on 2017/03/31 by nick.bullard Resaving Plugin content to resovle "saved with empty engine version" #jira UE-43537 Change 3375480 on 2017/03/31 by Jeff.Fisher UEVR-9 PSVR: Social Screen Support -Experimental social screen support for 4.16. -This does the basics of driving output through the Aux port in the proper format for display on the mirror monitor. -Only supports 30fps on the mirror monitor. 60fps will require the implementation of sony system dialogs to deal with incompatable system features (video streaming, remote play). -There is a project setting in Morpheus, under experiemental bEnableSocialScreenSeparateMode. This must be set to true to use this feature. When it is false we avoid allocating the back buffers. -MorpheusFunctionLibrary blueprints now have a node "SetSocialScreenMode" which can switch between SystemMirror (hardware supported mirroring), SeparateTest (alternates black and white), SeparateTexture (displays a texture, eg a render target, specified via blueprint), and SeparateMirror(puts the hmd render buffer on screen - which is both eyes, like a debug mode). -Also finally updated the bEnabled flag in project settings to tell people it's only for PC. #jira UEVR-9 #review-3384107 Change 3375540 on 2017/03/31 by Ryan.Vance #jira UE-43504 Fixing android build break when using a 64 bit isa. Change 3375655 on 2017/03/31 by Jeff.Fisher Fixing missing RGBAToYUV shader problem -This at least unblocks our process. Will revisit before zbr. Change 3375820 on 2017/04/01 by Jeff.Fisher Fixing linux build warning about HAS_MORPHEUS Change 3376050 on 2017/04/02 by Jeff.Fisher UE-43515 Step 'UE4Editor Static Analysis Win64' - Module.OnlineSubsystemOculus.cpp Warnings -Temporary fix for static analysis annotation warnings in OnlineSubsytemOculus. Longer term plan is to eliminate the use of the headers that trigger the warnings. -Just wrap all standard headers in static analysis disables. #jira UE-43515 Change 3376609 on 2017/04/03 by Jeff.Fisher Fixing rgbatoyuvshader include. Change 3377001 on 2017/04/03 by Jeff.Fisher UE-43547 Launch On PS4 fails during Run command - Missing global shader FRGBAToYUV420CS - shader c++ must be compiled so that it can be cooked for ps4. #jira UE-43547 Change 3379858 on 2017/04/04 by Jeff.Fisher Merging //UE4/Dev-Main to Dev-VR (//UE4/Dev-VR) pulling main this should get us ps4 sdk 4.508 Change 3379938 on 2017/04/04 by Ryan.Vance #jira UE-43548 If stereo layers are not being used, don't setup overlay targets as we will never clear/initialize them. The clear happens as part of the default layers PostRenderView_RenderThread call which wont be called if layers aren't being used in the scene. Change 3381519 on 2017/04/05 by Jeff.Fisher UEVR-733 PS4 sdk 4.500 hmd connection api changes break hmd connect. -Handling failure of sceHmdGetDeviceInformation if the hmd is powered off. It now returns an error code about an invalid handle in that case, rather than reporting unready. We just treat the error code like an unready status. #jira UEVR-733 #review-3384107 Change 3382019 on 2017/04/05 by Ryan.Vance Linux: add Vulkan support from dev editor: 3381593 Change 3382021 on 2017/04/05 by Ryan.Vance SteamVR on Linux using Vulkan OpenVR rev to 1_0_6 PR #3412: [GNUX] Initial support for SteamVR using Vulkan on GNUX platform. (Contributed by yaakuro) Change 3382076 on 2017/04/05 by Ryan.Vance Fixing linux steamvr lib path. It changed to something less silly in 1.0.6 Removing the steamvr plugin from the white list for linux. It's looking for a runtime that no one will have installed. Change 3383237 on 2017/04/06 by Ryan.Vance #jira UE-43732 Fixing Android compile issues. We can't wrap portions of a macro with a definie. This should probably be some sort of recursive macro thing since there's so much overlap. Good enough for now. Change 3383353 on 2017/04/06 by Ryan.Vance Fixing include cycles. Change 3383509 on 2017/04/06 by Jeff.Fisher Merging //UE4/Dev-Main to Dev-VR (//UE4/Dev-VR) merging the stuff from dev-mobile [CL 3384106 by Ryan Vance in Main branch]
2017-04-06 22:03:51 -04:00
GraphicsPSOInit.BoundShaderState.VertexDeclarationRHI = GFilterVertexDeclaration.VertexDeclarationRHI;
GraphicsPSOInit.BoundShaderState.VertexShaderRHI = VertexShader.GetVertexShader();
Copying //UE4/Dev-VR to //UE4/Dev-Main (Source: //UE4/Dev-VR @ 3383750) #lockdown Nick.Penwarden ========================== MAJOR FEATURES + CHANGES ========================== Change 3012064 on 2016/06/13 by Nick.Whiting Merging Main -> DevVR Change 3048060 on 2016/07/13 by Nick.Whiting Integrating CL 3045721 from //depot/Partners/Google/AndroidVR-DevVR Upgrade Android and iOS GVR SDK to the latest. Fix the flipped vignette issue when using Unreal's post processing distortion. Change the Daydream & Cardboard mode to use scanline racing. Deprecate the ability to turn off individual UI elements. Change 3235307 on 2016/12/14 by Keli.Hlodversson Filter out excluded HMD modules during FEngineLoop:PreInitHMDDevice. The final selection still happens in UEngine::InitializeHMDDevice as all HMD plugins have not been loaded during PreInit Change 3235308 on 2016/12/14 by Ryan.Vance #jira UEVR-478 Monoscopic far field improvements Shader changes are now gated behind the read only cvar vr.MonoscopicFarField. Changing this requires a shader compile. Moved the mono rendering mode to the cvar vr.MonoscopicFarFieldMode. This is writable, so users can enable/disable mono rendering on the fly if the above cvar is enabled. Only write to the alpha channel in the mobile base pass if the object is opaque and MONOSCOPIC_FAR_FIELD is defined. Addressed code review comments. Change 3235397 on 2016/12/14 by Keli.Hlodversson [Oculus] Only enable GearVR platform on Windows if Oculus service is running Original author: Loren.McQuade Change 3235762 on 2016/12/14 by Keli.Hlodversson Add explicit parentheses to placate the build bots. Change 3242318 on 2016/12/21 by Ryan.Vance Working around pixel density crash. Change 3242522 on 2016/12/21 by Ryan.Vance Missing flag clear so our adaptive test was always returning true. Change 3243173 on 2016/12/22 by Ryan.Vance Integrating post present callback implementation from 4.14.1 Change 3248633 on 2017/01/05 by Keli.Hlodversson Copying //Tasks/UE4/Dev-VR-Refactoring to Dev-VR-Minimal (//UE4/Dev-VR-Minimal) Change 3248723 on 2017/01/05 by Keli.Hlodversson Fix after merge. EnablePositionalTracking no longer exists. Change 3249484 on 2017/01/06 by Keli.Hlodversson Add missing includes Change 3249714 on 2017/01/06 by Keli.Hlodversson Remove monolithic header include Change 3249980 on 2017/01/06 by Keli.Hlodversson SteamVR: Remove leftover unused WindowMirrorMode member variable Change 3252432 on 2017/01/10 by Keli.Hlodversson Submitting change by Loren McQuade to fix monolithic builds. Unshelved from pending changelist '3251436': Change 3257373 on 2017/01/13 by Keli.Hlodversson #jira UEVR-411: Finish renaming/removing/remodelling the remaining Oculus (Rift+GearVR) commands #jira UEVR-412: Rename and merge remaining Morpheus console commands #jira UEVR-417: Remove Exec from IHeadMountedDisplay Change 3269971 on 2017/01/24 by Jeff.Fisher UEVR-498 move controller is missing world to meters UEVR-522 PS4 motion controller worldscale support. -Passing world to meters scale into getControllerOrientationAndPosition because the thing asking about it ought to be part of a world, and know what it should be. This also avoids making PS4 motion controllers dependent on the HMD. Note Google VR Controller doesn't do position, so doesnt' care about scale. Oculus already had internal threadsafe tracking of world scale, so I left that. Steam handles world scale below our input level. -Also adding PlayerIndex member to FSceneView so we can figure out which view the MotionControllerComponent should get its worldscale from for the late render thread update. #jira UEVR-498 #review-3384107 Change 3288308 on 2017/02/06 by Jeff.Fisher UEVR-517 Detect MotionController Connectivity -PS4 can only track 2 controllers and 1 hmd. Support for dealing with that is needed. -Also need to support multiple motion controller components mapped to a single controller. Licencees have done that before. -Created a new interface IMotionTrackingSystemManagement, and implements it for PS4Tracker on PS4. -Created a MotionTrackedDeviceFunctionLibrary to expose that interface to blueprint. -With those one can enable and disable tracking on ps4 controllers and query their state to stay within the controller tracking limit. -PS4Tracker also keeps a blackboard of the enable/disable state so that one can enable or disable controllers that have not been connected yet, and have them enable tracking or not when they are connected. -DS4 controller no longer jumps back to 000 if it loses tracking. #review-3384107 #jira UEVR-517 Change 3288309 on 2017/02/06 by Keli.Hlodversson Add file missing from CL#3257373. Change 3288311 on 2017/02/06 by Jeff.Fisher UEVR-517 Detect MotionController Connectivity - Test content. -tm-motionControllers has a third mode where all playstation motion controllers for player 0 are availalbe. You can toggle them to track or not with ctrl-P,G,L,R for pad, gun, leftmove, rightmove or with alt-P,G,L,R. Ctrl tests doing so via MotionControllerComponent. Alt tests doing so by player index and controller type enum. -ctrl-A disables tracking of all controllers -alt-A disables tracking of all controllers for player 0 -ctrl-D toggles enabling new controllers by default -Also fixed one button not working in one of the other test modes for the Aim (gun) controller. -The controller 'models' have an arrow out the front. It is black if disabled. Red if enabled, but no tracker is active, yellow if tracked but inertial only, and green if fully tracked by the camera. -This logic is in the QA_MoCoAll blueprint. Change 3291601 on 2017/02/07 by Jeff.Fisher UEVR-536 PSVR motion controller tracking problem with multiple controllers -Previous code called GetRelativeTransform from the render thread, but the game thread could update it at any time. This caches that transform so that it can be safely used in the render thread. #jira UEVR-536 #review-3384107 @Ryan.Vance Change 3292460 on 2017/02/08 by Jeff.Fisher PS4 sceVrTrackerGetResult() error warning logging improved, and explanatory comment added. Change 3308771 on 2017/02/17 by Keli.Hlodversson Rename GoogleVR console commands #jira UEVR-412 Change 3309156 on 2017/02/17 by Keli.Hlodversson Track changes in r.ScreenPercentage on GoogleVR and set RenderTargetSize accordingly. Change 3311999 on 2017/02/20 by Keli.Hlodversson Create a default implementation for RecordAnalytics. Also create an initial stub for FHeadMountedDisplayBase for future default implementations of common HMD functionality. Make implementing IHeadMountedDisplay::GetDeviceName mandatory instead of defaulting to "Unknown" #jira UE-21878 #jira UEVR-213 Change 3313467 on 2017/02/20 by Ryan.Vance #jira UE-41604 3278583 pCustomPresent->AllocateRenderTargetTexture may return false, if we blindly return true we can end up with an invalid render target since the fall back sceneviewport will be skipped. 3278536 Adding ovrError_NoHmd to our sanity check in OnStartGameFrame. Change 3314002 on 2017/02/21 by Keli.Hlodversson Fix compilation on PS4 and Linux Change 3326722 on 2017/03/01 by Jeff.Fisher Merging //UE4/Dev-Main to Dev-VR (//UE4/Dev-VR) Integrating 4.15 from main. Change 3327567 on 2017/03/01 by Jeff.Fisher UEVR-588 Oculus crash on "stereo on" when the proximity sensor is not triggered. Duplicating from Release-4.15 cl 3327481, 3327542 -Don't ovr_SubmitFrame when the layers need to be recreated. They stay dirty until rendering is unpaused. #jira UEVR-588 #review-3384107 Change 3328098 on 2017/03/01 by Jeff.Fisher 4.15 merge fixes -Fixed deprecated enum name function usage. -Fixed world scale usage in GoogleVRController. -Fixed compile break in PS4Tracker. Change 3328271 on 2017/03/01 by Jeff.Fisher 2.15 merge -restroging GoogleVRController::GetWorldToMetersScale... cause it is used everywhere. Change 3328307 on 2017/03/01 by Jeff.Fisher 4.15 merge -More googlevr worldscale fixes. Change 3328312 on 2017/03/01 by Jeff.Fisher 4.15 merge -removing 2 unused includes Change 3330610 on 2017/03/02 by Jeff.Fisher 4.15 merge -fixing linux build Change 3333952 on 2017/03/06 by Keli.Hlodversson Implement common stereo layer management base class and use it in SteamVR and PS4. Fixes an outstanding bug in SteamVR where texures are updated every frame regardles of whether the continous update flag is set or not. #jira UEVR-628 #jira UE-42555 Change 3334961 on 2017/03/07 by Keli.Hlodversson Add missing include to fix non-unity builds Change 3336200 on 2017/03/07 by Keli.Hlodversson Fix compilation issues. (https://ec-01.epicgames.net/commander/link/jobDetails/jobs/7568252?jobName=UE4+Dev-VR+-+CL+3334961+-+Nightly+Build&s=Jobs) * Pre VS2015 compilers don't like mixing wide and unmarked strings in concatenation. Unfortunately LOCTEXT hides the call to the TEXT macro, completely hinding the prefix (which only gets added to the first fragment.) * Switch apparently doesn't know how to format a size_t for analytics either. Also: Typo in backwards compatibility command name alias Change 3337347 on 2017/03/08 by Jeff.Fisher UE-42631 Stereo off while prox sensor uncovered causes low framerate -Setting maxfps appropriately on 'stereo on/off'. #review-3384107 #jira UE-42631 Change 3338385 on 2017/03/08 by Ryan.Vance r.DisableDistortion was only being used for the mobile renderer Change 3342301 on 2017/03/10 by patrickr.donovan Test updates to TM-VRSmoke. Increased lightmap resolution on QA_MeshTypes meshes to improve readbility and reliablility of tests involving said asset. Rebuilt lighting. Change 3348133 on 2017/03/15 by Ryan.Vance Moving mono cvars to scene rendering to avoid cross module references. There's not a good reason to have them in the hmd module anyway. Change 3348836 on 2017/03/15 by Ryan.Vance Direct multi-view support for gear vr Monoscopic far field with multi-view (blit and direct) support for gear vr Support for translucent objects on both sides of the mono clip plane (due to a sorting issue, objects that straddle the plane composite incorrectly) Fixed missing discards/clears in the multi-view blit Change 3348843 on 2017/03/15 by Ryan.Vance Fixing color/depth target size mismatch when screen percentage scaling results in a size that isn't divisible by 16. Change 3349276 on 2017/03/16 by Keli.Hlodversson Fixing compile errors in GoogleVR after merge from main. Change 3350932 on 2017/03/16 by Ryan.Vance Re-enabling the gearvr plugin on windows. Change 3351977 on 2017/03/17 by Jeff.Fisher Fixing masked member variable. Change 3352314 on 2017/03/17 by Ryan.Vance We need to ensure that we don't select different lod levels for each eye. Change 3352993 on 2017/03/17 by Nick.Whiting Integrating CL 3345824 from Android-DevVR to Dev-VR. Support for device depth pass in SceneCaptureComponent2D Change 3355185 on 2017/03/20 by Nick.Whiting Added ability to disable the autoloading splash screen, which would prevent the hide splash screen node from ever working Change 3355676 on 2017/03/20 by Nick.Whiting PR #3384: [GNUX] SteamVR, OpenGL patch. (Contributed by yaakuro), with some minor modifications Change 3357286 on 2017/03/21 by Jeff.Fisher Fixing GenerateProjectFiles, looks like the .config. was removed from these references in main some time ago. Change 3357435 on 2017/03/21 by Jeff.Fisher Fixing editor build break, looks like a merge mistake. Change 3359960 on 2017/03/23 by Keli.Hlodversson Prevent potential crash when drawing tracking sensor location. Also only fetch HMD location once instead of once per tracking sensor. Change 3361230 on 2017/03/23 by Jeff.Fisher Fixing linux build opengl include problem... maybe. Change 3361638 on 2017/03/23 by Jeff.Fisher Another guess at fixing linux build. Change 3364224 on 2017/03/24 by Keli.Hlodversson Initial implementation of UEVR-576 - Base emulated layer implementation #jira UEVR-668 - Base emulated layer implementation: Initial framework for overrideable default implementation #jira UEVR-669 - Base emulated layer implementation: Face Locked Layers Support #jira UEVR-670 - Base emulated layer implementation: Tracker Locked Layers Support #jira UEVR-671 - Base emulated layer implementation: World Locked Layers Support #jira UEVR-672 - Base emulated layer implementation: Add support for optionally rendering face locked layers into a separate layer Change 3364242 on 2017/03/24 by Keli.Hlodversson SteamVR layers do not support negatve Layer priorities Change 3364263 on 2017/03/24 by Jeff.Fisher Merging //UE4/Dev-Main to Dev-VR (//UE4/Dev-VR) Monoscopicfarfieldrendering was just 'accept source', Ryan is going to look at fixing it up. Change 3364472 on 2017/03/24 by Jeff.Fisher Merge fix Change 3364475 on 2017/03/24 by Jeff.Fisher Fixing gearvr include. Change 3364486 on 2017/03/24 by Jeff.Fisher merge fix Change 3364532 on 2017/03/24 by Ryan.Vance pso update for mono rendering and stereo layers. Change 3364599 on 2017/03/24 by Ryan.Vance Oculus changes for SI1.12 Change 3365159 on 2017/03/26 by Jeff.Fisher include fix Change 3365182 on 2017/03/26 by Jeff.Fisher include fix Change 3366087 on 2017/03/27 by Ryan.Vance Remaining files from Oculus changes for SI1.12 merge request. Fixing a bug in OnlineSubsystem. Temporarily changing the eye padding change to be a shader clear to work around a clear color binding issue. Change 3366492 on 2017/03/27 by Ryan.Vance #jira UE-43294 Moved the clear before we setup state for drawing the mirror window content. It was stomping over state after the pso changes. Going to leave the shader clear in the rift prerender for clearing the eye padding for now. Change 3366929 on 2017/03/27 by Ryan.Vance Fixing compile error Change 3368549 on 2017/03/28 by Jeff.Fisher Merging Change: 3357998 from //UE4/Partner-Google-VR/Engine/... to Dev-VR Upgrade Google VR Plugin to v1.3: *Upgraded GVR NDK to 1.30.0 *Changed some BlueprintFunction to use BlueprintPure *Add the missing bDaydream flag in UEDeployAndroid.cs #review-3384107 Change 3368975 on 2017/03/28 by Ryan.Vance CIS clean up #jira UE-43428, UE-43429, UE-43426, UE-43427 Change 3369028 on 2017/03/28 by Ryan.Vance This is not exacly 'correct', but it's at least what the code was trying to do. Change 3370203 on 2017/03/29 by Ryan.Vance Adding gear vr controller component support. Change 3370918 on 2017/03/29 by Ryan.Vance Merging 3370569 using Partner-Google-VR_to_DevVR Change 3371030 on 2017/03/29 by Ryan.Vance Fixing linux build errors #jira UE-43426 Change 3371036 on 2017/03/29 by Ryan.Vance Oculus 4.16 integration. Not terribly happy with the use of std::string. They promised to clean this up for the next release. Change 3373495 on 2017/03/30 by Jeff.Fisher Merging from Dev-Main, in preparation for 4.16 Change 3373578 on 2017/03/30 by Jeff.Fisher build break, one comma short Change 3373870 on 2017/03/31 by Jeff.Fisher Include order fix. Change 3374001 on 2017/03/31 by Keli.Hlodversson Use DefaultStereoLayers as base for Morpheus implementation. #jira UEVR-709 #jira UE-42919 #rb: Jeff.Fisher Change 3374004 on 2017/03/31 by Keli.Hlodversson Fix rendering for the default Stereo Layers implementation on mobile. Depth test was set to "Never" instead of "Always" Destination texture on GLES is flipped on the Y axis, the coordinates are reversed in the shade when compiled on the relevant platforms. Change 3375125 on 2017/03/31 by Jeff.Fisher UE-43506 Ensure using VRPreview with GoogleVR -Removed the ensure, there is code in there to handle that case, and it works. #jira UE-43506 Change 3375294 on 2017/03/31 by nick.bullard Resaving Plugin content to resovle "saved with empty engine version" #jira UE-43537 Change 3375480 on 2017/03/31 by Jeff.Fisher UEVR-9 PSVR: Social Screen Support -Experimental social screen support for 4.16. -This does the basics of driving output through the Aux port in the proper format for display on the mirror monitor. -Only supports 30fps on the mirror monitor. 60fps will require the implementation of sony system dialogs to deal with incompatable system features (video streaming, remote play). -There is a project setting in Morpheus, under experiemental bEnableSocialScreenSeparateMode. This must be set to true to use this feature. When it is false we avoid allocating the back buffers. -MorpheusFunctionLibrary blueprints now have a node "SetSocialScreenMode" which can switch between SystemMirror (hardware supported mirroring), SeparateTest (alternates black and white), SeparateTexture (displays a texture, eg a render target, specified via blueprint), and SeparateMirror(puts the hmd render buffer on screen - which is both eyes, like a debug mode). -Also finally updated the bEnabled flag in project settings to tell people it's only for PC. #jira UEVR-9 #review-3384107 Change 3375540 on 2017/03/31 by Ryan.Vance #jira UE-43504 Fixing android build break when using a 64 bit isa. Change 3375655 on 2017/03/31 by Jeff.Fisher Fixing missing RGBAToYUV shader problem -This at least unblocks our process. Will revisit before zbr. Change 3375820 on 2017/04/01 by Jeff.Fisher Fixing linux build warning about HAS_MORPHEUS Change 3376050 on 2017/04/02 by Jeff.Fisher UE-43515 Step 'UE4Editor Static Analysis Win64' - Module.OnlineSubsystemOculus.cpp Warnings -Temporary fix for static analysis annotation warnings in OnlineSubsytemOculus. Longer term plan is to eliminate the use of the headers that trigger the warnings. -Just wrap all standard headers in static analysis disables. #jira UE-43515 Change 3376609 on 2017/04/03 by Jeff.Fisher Fixing rgbatoyuvshader include. Change 3377001 on 2017/04/03 by Jeff.Fisher UE-43547 Launch On PS4 fails during Run command - Missing global shader FRGBAToYUV420CS - shader c++ must be compiled so that it can be cooked for ps4. #jira UE-43547 Change 3379858 on 2017/04/04 by Jeff.Fisher Merging //UE4/Dev-Main to Dev-VR (//UE4/Dev-VR) pulling main this should get us ps4 sdk 4.508 Change 3379938 on 2017/04/04 by Ryan.Vance #jira UE-43548 If stereo layers are not being used, don't setup overlay targets as we will never clear/initialize them. The clear happens as part of the default layers PostRenderView_RenderThread call which wont be called if layers aren't being used in the scene. Change 3381519 on 2017/04/05 by Jeff.Fisher UEVR-733 PS4 sdk 4.500 hmd connection api changes break hmd connect. -Handling failure of sceHmdGetDeviceInformation if the hmd is powered off. It now returns an error code about an invalid handle in that case, rather than reporting unready. We just treat the error code like an unready status. #jira UEVR-733 #review-3384107 Change 3382019 on 2017/04/05 by Ryan.Vance Linux: add Vulkan support from dev editor: 3381593 Change 3382021 on 2017/04/05 by Ryan.Vance SteamVR on Linux using Vulkan OpenVR rev to 1_0_6 PR #3412: [GNUX] Initial support for SteamVR using Vulkan on GNUX platform. (Contributed by yaakuro) Change 3382076 on 2017/04/05 by Ryan.Vance Fixing linux steamvr lib path. It changed to something less silly in 1.0.6 Removing the steamvr plugin from the white list for linux. It's looking for a runtime that no one will have installed. Change 3383237 on 2017/04/06 by Ryan.Vance #jira UE-43732 Fixing Android compile issues. We can't wrap portions of a macro with a definie. This should probably be some sort of recursive macro thing since there's so much overlap. Good enough for now. Change 3383353 on 2017/04/06 by Ryan.Vance Fixing include cycles. Change 3383509 on 2017/04/06 by Jeff.Fisher Merging //UE4/Dev-Main to Dev-VR (//UE4/Dev-VR) merging the stuff from dev-mobile [CL 3384106 by Ryan Vance in Main branch]
2017-04-06 22:03:51 -04:00
GraphicsPSOInit.PrimitiveType = PT_TriangleList;
// Force initialization of pipeline state on first iteration:
bool bLastWasOpaque = (RenderThreadLayers[LayersToRender[0]].Flags & LAYER_FLAG_TEX_NO_ALPHA_CHANNEL) == 0;
bool bLastWasExternal = (RenderThreadLayers[LayersToRender[0]].Flags & LAYER_FLAG_TEX_EXTERNAL) == 0;
Copying //UE4/Dev-VR to //UE4/Dev-Main (Source: //UE4/Dev-VR @ 3383750) #lockdown Nick.Penwarden ========================== MAJOR FEATURES + CHANGES ========================== Change 3012064 on 2016/06/13 by Nick.Whiting Merging Main -> DevVR Change 3048060 on 2016/07/13 by Nick.Whiting Integrating CL 3045721 from //depot/Partners/Google/AndroidVR-DevVR Upgrade Android and iOS GVR SDK to the latest. Fix the flipped vignette issue when using Unreal's post processing distortion. Change the Daydream & Cardboard mode to use scanline racing. Deprecate the ability to turn off individual UI elements. Change 3235307 on 2016/12/14 by Keli.Hlodversson Filter out excluded HMD modules during FEngineLoop:PreInitHMDDevice. The final selection still happens in UEngine::InitializeHMDDevice as all HMD plugins have not been loaded during PreInit Change 3235308 on 2016/12/14 by Ryan.Vance #jira UEVR-478 Monoscopic far field improvements Shader changes are now gated behind the read only cvar vr.MonoscopicFarField. Changing this requires a shader compile. Moved the mono rendering mode to the cvar vr.MonoscopicFarFieldMode. This is writable, so users can enable/disable mono rendering on the fly if the above cvar is enabled. Only write to the alpha channel in the mobile base pass if the object is opaque and MONOSCOPIC_FAR_FIELD is defined. Addressed code review comments. Change 3235397 on 2016/12/14 by Keli.Hlodversson [Oculus] Only enable GearVR platform on Windows if Oculus service is running Original author: Loren.McQuade Change 3235762 on 2016/12/14 by Keli.Hlodversson Add explicit parentheses to placate the build bots. Change 3242318 on 2016/12/21 by Ryan.Vance Working around pixel density crash. Change 3242522 on 2016/12/21 by Ryan.Vance Missing flag clear so our adaptive test was always returning true. Change 3243173 on 2016/12/22 by Ryan.Vance Integrating post present callback implementation from 4.14.1 Change 3248633 on 2017/01/05 by Keli.Hlodversson Copying //Tasks/UE4/Dev-VR-Refactoring to Dev-VR-Minimal (//UE4/Dev-VR-Minimal) Change 3248723 on 2017/01/05 by Keli.Hlodversson Fix after merge. EnablePositionalTracking no longer exists. Change 3249484 on 2017/01/06 by Keli.Hlodversson Add missing includes Change 3249714 on 2017/01/06 by Keli.Hlodversson Remove monolithic header include Change 3249980 on 2017/01/06 by Keli.Hlodversson SteamVR: Remove leftover unused WindowMirrorMode member variable Change 3252432 on 2017/01/10 by Keli.Hlodversson Submitting change by Loren McQuade to fix monolithic builds. Unshelved from pending changelist '3251436': Change 3257373 on 2017/01/13 by Keli.Hlodversson #jira UEVR-411: Finish renaming/removing/remodelling the remaining Oculus (Rift+GearVR) commands #jira UEVR-412: Rename and merge remaining Morpheus console commands #jira UEVR-417: Remove Exec from IHeadMountedDisplay Change 3269971 on 2017/01/24 by Jeff.Fisher UEVR-498 move controller is missing world to meters UEVR-522 PS4 motion controller worldscale support. -Passing world to meters scale into getControllerOrientationAndPosition because the thing asking about it ought to be part of a world, and know what it should be. This also avoids making PS4 motion controllers dependent on the HMD. Note Google VR Controller doesn't do position, so doesnt' care about scale. Oculus already had internal threadsafe tracking of world scale, so I left that. Steam handles world scale below our input level. -Also adding PlayerIndex member to FSceneView so we can figure out which view the MotionControllerComponent should get its worldscale from for the late render thread update. #jira UEVR-498 #review-3384107 Change 3288308 on 2017/02/06 by Jeff.Fisher UEVR-517 Detect MotionController Connectivity -PS4 can only track 2 controllers and 1 hmd. Support for dealing with that is needed. -Also need to support multiple motion controller components mapped to a single controller. Licencees have done that before. -Created a new interface IMotionTrackingSystemManagement, and implements it for PS4Tracker on PS4. -Created a MotionTrackedDeviceFunctionLibrary to expose that interface to blueprint. -With those one can enable and disable tracking on ps4 controllers and query their state to stay within the controller tracking limit. -PS4Tracker also keeps a blackboard of the enable/disable state so that one can enable or disable controllers that have not been connected yet, and have them enable tracking or not when they are connected. -DS4 controller no longer jumps back to 000 if it loses tracking. #review-3384107 #jira UEVR-517 Change 3288309 on 2017/02/06 by Keli.Hlodversson Add file missing from CL#3257373. Change 3288311 on 2017/02/06 by Jeff.Fisher UEVR-517 Detect MotionController Connectivity - Test content. -tm-motionControllers has a third mode where all playstation motion controllers for player 0 are availalbe. You can toggle them to track or not with ctrl-P,G,L,R for pad, gun, leftmove, rightmove or with alt-P,G,L,R. Ctrl tests doing so via MotionControllerComponent. Alt tests doing so by player index and controller type enum. -ctrl-A disables tracking of all controllers -alt-A disables tracking of all controllers for player 0 -ctrl-D toggles enabling new controllers by default -Also fixed one button not working in one of the other test modes for the Aim (gun) controller. -The controller 'models' have an arrow out the front. It is black if disabled. Red if enabled, but no tracker is active, yellow if tracked but inertial only, and green if fully tracked by the camera. -This logic is in the QA_MoCoAll blueprint. Change 3291601 on 2017/02/07 by Jeff.Fisher UEVR-536 PSVR motion controller tracking problem with multiple controllers -Previous code called GetRelativeTransform from the render thread, but the game thread could update it at any time. This caches that transform so that it can be safely used in the render thread. #jira UEVR-536 #review-3384107 @Ryan.Vance Change 3292460 on 2017/02/08 by Jeff.Fisher PS4 sceVrTrackerGetResult() error warning logging improved, and explanatory comment added. Change 3308771 on 2017/02/17 by Keli.Hlodversson Rename GoogleVR console commands #jira UEVR-412 Change 3309156 on 2017/02/17 by Keli.Hlodversson Track changes in r.ScreenPercentage on GoogleVR and set RenderTargetSize accordingly. Change 3311999 on 2017/02/20 by Keli.Hlodversson Create a default implementation for RecordAnalytics. Also create an initial stub for FHeadMountedDisplayBase for future default implementations of common HMD functionality. Make implementing IHeadMountedDisplay::GetDeviceName mandatory instead of defaulting to "Unknown" #jira UE-21878 #jira UEVR-213 Change 3313467 on 2017/02/20 by Ryan.Vance #jira UE-41604 3278583 pCustomPresent->AllocateRenderTargetTexture may return false, if we blindly return true we can end up with an invalid render target since the fall back sceneviewport will be skipped. 3278536 Adding ovrError_NoHmd to our sanity check in OnStartGameFrame. Change 3314002 on 2017/02/21 by Keli.Hlodversson Fix compilation on PS4 and Linux Change 3326722 on 2017/03/01 by Jeff.Fisher Merging //UE4/Dev-Main to Dev-VR (//UE4/Dev-VR) Integrating 4.15 from main. Change 3327567 on 2017/03/01 by Jeff.Fisher UEVR-588 Oculus crash on "stereo on" when the proximity sensor is not triggered. Duplicating from Release-4.15 cl 3327481, 3327542 -Don't ovr_SubmitFrame when the layers need to be recreated. They stay dirty until rendering is unpaused. #jira UEVR-588 #review-3384107 Change 3328098 on 2017/03/01 by Jeff.Fisher 4.15 merge fixes -Fixed deprecated enum name function usage. -Fixed world scale usage in GoogleVRController. -Fixed compile break in PS4Tracker. Change 3328271 on 2017/03/01 by Jeff.Fisher 2.15 merge -restroging GoogleVRController::GetWorldToMetersScale... cause it is used everywhere. Change 3328307 on 2017/03/01 by Jeff.Fisher 4.15 merge -More googlevr worldscale fixes. Change 3328312 on 2017/03/01 by Jeff.Fisher 4.15 merge -removing 2 unused includes Change 3330610 on 2017/03/02 by Jeff.Fisher 4.15 merge -fixing linux build Change 3333952 on 2017/03/06 by Keli.Hlodversson Implement common stereo layer management base class and use it in SteamVR and PS4. Fixes an outstanding bug in SteamVR where texures are updated every frame regardles of whether the continous update flag is set or not. #jira UEVR-628 #jira UE-42555 Change 3334961 on 2017/03/07 by Keli.Hlodversson Add missing include to fix non-unity builds Change 3336200 on 2017/03/07 by Keli.Hlodversson Fix compilation issues. (https://ec-01.epicgames.net/commander/link/jobDetails/jobs/7568252?jobName=UE4+Dev-VR+-+CL+3334961+-+Nightly+Build&s=Jobs) * Pre VS2015 compilers don't like mixing wide and unmarked strings in concatenation. Unfortunately LOCTEXT hides the call to the TEXT macro, completely hinding the prefix (which only gets added to the first fragment.) * Switch apparently doesn't know how to format a size_t for analytics either. Also: Typo in backwards compatibility command name alias Change 3337347 on 2017/03/08 by Jeff.Fisher UE-42631 Stereo off while prox sensor uncovered causes low framerate -Setting maxfps appropriately on 'stereo on/off'. #review-3384107 #jira UE-42631 Change 3338385 on 2017/03/08 by Ryan.Vance r.DisableDistortion was only being used for the mobile renderer Change 3342301 on 2017/03/10 by patrickr.donovan Test updates to TM-VRSmoke. Increased lightmap resolution on QA_MeshTypes meshes to improve readbility and reliablility of tests involving said asset. Rebuilt lighting. Change 3348133 on 2017/03/15 by Ryan.Vance Moving mono cvars to scene rendering to avoid cross module references. There's not a good reason to have them in the hmd module anyway. Change 3348836 on 2017/03/15 by Ryan.Vance Direct multi-view support for gear vr Monoscopic far field with multi-view (blit and direct) support for gear vr Support for translucent objects on both sides of the mono clip plane (due to a sorting issue, objects that straddle the plane composite incorrectly) Fixed missing discards/clears in the multi-view blit Change 3348843 on 2017/03/15 by Ryan.Vance Fixing color/depth target size mismatch when screen percentage scaling results in a size that isn't divisible by 16. Change 3349276 on 2017/03/16 by Keli.Hlodversson Fixing compile errors in GoogleVR after merge from main. Change 3350932 on 2017/03/16 by Ryan.Vance Re-enabling the gearvr plugin on windows. Change 3351977 on 2017/03/17 by Jeff.Fisher Fixing masked member variable. Change 3352314 on 2017/03/17 by Ryan.Vance We need to ensure that we don't select different lod levels for each eye. Change 3352993 on 2017/03/17 by Nick.Whiting Integrating CL 3345824 from Android-DevVR to Dev-VR. Support for device depth pass in SceneCaptureComponent2D Change 3355185 on 2017/03/20 by Nick.Whiting Added ability to disable the autoloading splash screen, which would prevent the hide splash screen node from ever working Change 3355676 on 2017/03/20 by Nick.Whiting PR #3384: [GNUX] SteamVR, OpenGL patch. (Contributed by yaakuro), with some minor modifications Change 3357286 on 2017/03/21 by Jeff.Fisher Fixing GenerateProjectFiles, looks like the .config. was removed from these references in main some time ago. Change 3357435 on 2017/03/21 by Jeff.Fisher Fixing editor build break, looks like a merge mistake. Change 3359960 on 2017/03/23 by Keli.Hlodversson Prevent potential crash when drawing tracking sensor location. Also only fetch HMD location once instead of once per tracking sensor. Change 3361230 on 2017/03/23 by Jeff.Fisher Fixing linux build opengl include problem... maybe. Change 3361638 on 2017/03/23 by Jeff.Fisher Another guess at fixing linux build. Change 3364224 on 2017/03/24 by Keli.Hlodversson Initial implementation of UEVR-576 - Base emulated layer implementation #jira UEVR-668 - Base emulated layer implementation: Initial framework for overrideable default implementation #jira UEVR-669 - Base emulated layer implementation: Face Locked Layers Support #jira UEVR-670 - Base emulated layer implementation: Tracker Locked Layers Support #jira UEVR-671 - Base emulated layer implementation: World Locked Layers Support #jira UEVR-672 - Base emulated layer implementation: Add support for optionally rendering face locked layers into a separate layer Change 3364242 on 2017/03/24 by Keli.Hlodversson SteamVR layers do not support negatve Layer priorities Change 3364263 on 2017/03/24 by Jeff.Fisher Merging //UE4/Dev-Main to Dev-VR (//UE4/Dev-VR) Monoscopicfarfieldrendering was just 'accept source', Ryan is going to look at fixing it up. Change 3364472 on 2017/03/24 by Jeff.Fisher Merge fix Change 3364475 on 2017/03/24 by Jeff.Fisher Fixing gearvr include. Change 3364486 on 2017/03/24 by Jeff.Fisher merge fix Change 3364532 on 2017/03/24 by Ryan.Vance pso update for mono rendering and stereo layers. Change 3364599 on 2017/03/24 by Ryan.Vance Oculus changes for SI1.12 Change 3365159 on 2017/03/26 by Jeff.Fisher include fix Change 3365182 on 2017/03/26 by Jeff.Fisher include fix Change 3366087 on 2017/03/27 by Ryan.Vance Remaining files from Oculus changes for SI1.12 merge request. Fixing a bug in OnlineSubsystem. Temporarily changing the eye padding change to be a shader clear to work around a clear color binding issue. Change 3366492 on 2017/03/27 by Ryan.Vance #jira UE-43294 Moved the clear before we setup state for drawing the mirror window content. It was stomping over state after the pso changes. Going to leave the shader clear in the rift prerender for clearing the eye padding for now. Change 3366929 on 2017/03/27 by Ryan.Vance Fixing compile error Change 3368549 on 2017/03/28 by Jeff.Fisher Merging Change: 3357998 from //UE4/Partner-Google-VR/Engine/... to Dev-VR Upgrade Google VR Plugin to v1.3: *Upgraded GVR NDK to 1.30.0 *Changed some BlueprintFunction to use BlueprintPure *Add the missing bDaydream flag in UEDeployAndroid.cs #review-3384107 Change 3368975 on 2017/03/28 by Ryan.Vance CIS clean up #jira UE-43428, UE-43429, UE-43426, UE-43427 Change 3369028 on 2017/03/28 by Ryan.Vance This is not exacly 'correct', but it's at least what the code was trying to do. Change 3370203 on 2017/03/29 by Ryan.Vance Adding gear vr controller component support. Change 3370918 on 2017/03/29 by Ryan.Vance Merging 3370569 using Partner-Google-VR_to_DevVR Change 3371030 on 2017/03/29 by Ryan.Vance Fixing linux build errors #jira UE-43426 Change 3371036 on 2017/03/29 by Ryan.Vance Oculus 4.16 integration. Not terribly happy with the use of std::string. They promised to clean this up for the next release. Change 3373495 on 2017/03/30 by Jeff.Fisher Merging from Dev-Main, in preparation for 4.16 Change 3373578 on 2017/03/30 by Jeff.Fisher build break, one comma short Change 3373870 on 2017/03/31 by Jeff.Fisher Include order fix. Change 3374001 on 2017/03/31 by Keli.Hlodversson Use DefaultStereoLayers as base for Morpheus implementation. #jira UEVR-709 #jira UE-42919 #rb: Jeff.Fisher Change 3374004 on 2017/03/31 by Keli.Hlodversson Fix rendering for the default Stereo Layers implementation on mobile. Depth test was set to "Never" instead of "Always" Destination texture on GLES is flipped on the Y axis, the coordinates are reversed in the shade when compiled on the relevant platforms. Change 3375125 on 2017/03/31 by Jeff.Fisher UE-43506 Ensure using VRPreview with GoogleVR -Removed the ensure, there is code in there to handle that case, and it works. #jira UE-43506 Change 3375294 on 2017/03/31 by nick.bullard Resaving Plugin content to resovle "saved with empty engine version" #jira UE-43537 Change 3375480 on 2017/03/31 by Jeff.Fisher UEVR-9 PSVR: Social Screen Support -Experimental social screen support for 4.16. -This does the basics of driving output through the Aux port in the proper format for display on the mirror monitor. -Only supports 30fps on the mirror monitor. 60fps will require the implementation of sony system dialogs to deal with incompatable system features (video streaming, remote play). -There is a project setting in Morpheus, under experiemental bEnableSocialScreenSeparateMode. This must be set to true to use this feature. When it is false we avoid allocating the back buffers. -MorpheusFunctionLibrary blueprints now have a node "SetSocialScreenMode" which can switch between SystemMirror (hardware supported mirroring), SeparateTest (alternates black and white), SeparateTexture (displays a texture, eg a render target, specified via blueprint), and SeparateMirror(puts the hmd render buffer on screen - which is both eyes, like a debug mode). -Also finally updated the bEnabled flag in project settings to tell people it's only for PC. #jira UEVR-9 #review-3384107 Change 3375540 on 2017/03/31 by Ryan.Vance #jira UE-43504 Fixing android build break when using a 64 bit isa. Change 3375655 on 2017/03/31 by Jeff.Fisher Fixing missing RGBAToYUV shader problem -This at least unblocks our process. Will revisit before zbr. Change 3375820 on 2017/04/01 by Jeff.Fisher Fixing linux build warning about HAS_MORPHEUS Change 3376050 on 2017/04/02 by Jeff.Fisher UE-43515 Step 'UE4Editor Static Analysis Win64' - Module.OnlineSubsystemOculus.cpp Warnings -Temporary fix for static analysis annotation warnings in OnlineSubsytemOculus. Longer term plan is to eliminate the use of the headers that trigger the warnings. -Just wrap all standard headers in static analysis disables. #jira UE-43515 Change 3376609 on 2017/04/03 by Jeff.Fisher Fixing rgbatoyuvshader include. Change 3377001 on 2017/04/03 by Jeff.Fisher UE-43547 Launch On PS4 fails during Run command - Missing global shader FRGBAToYUV420CS - shader c++ must be compiled so that it can be cooked for ps4. #jira UE-43547 Change 3379858 on 2017/04/04 by Jeff.Fisher Merging //UE4/Dev-Main to Dev-VR (//UE4/Dev-VR) pulling main this should get us ps4 sdk 4.508 Change 3379938 on 2017/04/04 by Ryan.Vance #jira UE-43548 If stereo layers are not being used, don't setup overlay targets as we will never clear/initialize them. The clear happens as part of the default layers PostRenderView_RenderThread call which wont be called if layers aren't being used in the scene. Change 3381519 on 2017/04/05 by Jeff.Fisher UEVR-733 PS4 sdk 4.500 hmd connection api changes break hmd connect. -Handling failure of sceHmdGetDeviceInformation if the hmd is powered off. It now returns an error code about an invalid handle in that case, rather than reporting unready. We just treat the error code like an unready status. #jira UEVR-733 #review-3384107 Change 3382019 on 2017/04/05 by Ryan.Vance Linux: add Vulkan support from dev editor: 3381593 Change 3382021 on 2017/04/05 by Ryan.Vance SteamVR on Linux using Vulkan OpenVR rev to 1_0_6 PR #3412: [GNUX] Initial support for SteamVR using Vulkan on GNUX platform. (Contributed by yaakuro) Change 3382076 on 2017/04/05 by Ryan.Vance Fixing linux steamvr lib path. It changed to something less silly in 1.0.6 Removing the steamvr plugin from the white list for linux. It's looking for a runtime that no one will have installed. Change 3383237 on 2017/04/06 by Ryan.Vance #jira UE-43732 Fixing Android compile issues. We can't wrap portions of a macro with a definie. This should probably be some sort of recursive macro thing since there's so much overlap. Good enough for now. Change 3383353 on 2017/04/06 by Ryan.Vance Fixing include cycles. Change 3383509 on 2017/04/06 by Jeff.Fisher Merging //UE4/Dev-Main to Dev-VR (//UE4/Dev-VR) merging the stuff from dev-mobile [CL 3384106 by Ryan Vance in Main branch]
2017-04-06 22:03:51 -04:00
// For each layer
for (uint32 LayerIndex : LayersToRender)
{
const FLayerDesc& Layer = RenderThreadLayers[LayerIndex];
check(Layer.IsVisible());
const bool bIsOpaque = (Layer.Flags & LAYER_FLAG_TEX_NO_ALPHA_CHANNEL) != 0;
const bool bIsExternal = (Layer.Flags & LAYER_FLAG_TEX_EXTERNAL) != 0;
bool bPipelineStateNeedsUpdate = false;
if (bIsOpaque != bLastWasOpaque)
{
bLastWasOpaque = bIsOpaque;
GraphicsPSOInit.BlendState = bIsOpaque ? TOpaqueBlendState::GetRHI() : TAlphaBlendState::GetRHI();
bPipelineStateNeedsUpdate = true;
}
if (bIsExternal != bLastWasExternal)
{
bLastWasExternal = bIsExternal;
GraphicsPSOInit.BoundShaderState.PixelShaderRHI = bIsExternal ? PixelShader_External.GetPixelShader() : PixelShader.GetPixelShader();
bPipelineStateNeedsUpdate = true;
}
if (bPipelineStateNeedsUpdate)
Copying //UE4/Dev-VR to //UE4/Dev-Main (Source: //UE4/Dev-VR @ 3443236) #lockdown Nick.Penwarden #rb none ========================== MAJOR FEATURES + CHANGES ========================== Change 3385304 on 2017/04/07 by Ryan.Vance #jira UEVR-694 GL_TEXTURE_EXTERNAL_OES support hlslcc changes to support the TextureExternal keyword RHI changes to support RHICreateTextureExternal2D Fall back to a standard 2d texture on platforms without extension support Did not implement a shader cache solution as the resource is expected to be shared across processes, so recreating it from the shader cache would be a bad thing Change 3391376 on 2017/04/12 by Ben.Marsh Build: Add additional UE4Game targets for Dev-VR, to catch build failures in plugins that are disabled for games. Change 3392546 on 2017/04/13 by Jeff.Fisher Duplicating in Dev-VR (from Release-4.16) UEVR-734 PSVR sdk 4.5 tracking improvements UEVR-738 PSVR prediction time dynamic adjustment -New tracker profile and camera config to activate ps4 tracking improvements. -Calculating prediction time based on flip timings rather than assuming it will be a particular value. This makes the prediction time nearly perfect as long as we meet framerate and lets it adapt to the timing of when the prediction is made in the frame. -Changed reprojection fliparg to be the frame number, rather than a separate incrementor, so its more useful for debugging. #jira UEVR-734 #review-3391147 Change 3394508 on 2017/04/14 by Jeff.Fisher merge fix ShaderCacheTypes.h Change 3399628 on 2017/04/19 by Jeff.Fisher UEVR-582 PSVR not applying WorldToMeters for position accessor -Changed to apply WorldToMeters scale when we get the position data from PS4Tracker, so that the positions stored in MorpheusHMD are always in world space. #jira UEVR-582 #review-3398683 Change 3404200 on 2017/04/21 by Jeff.Fisher UEVR-239 GearVR headset worn/notworn notifications -Implemented the IHeadMountedDisplay accessor for this, and also hooked up the delegates that fire on PS4. -Implemented the IHeadMountedDisplay accessor for PS4. #jira UEVR-239 #review-3404174 @keli.hloedversson Change 3412688 on 2017/04/27 by Jeff.Fisher UEVR-766 PSVR test level improvements -VR/TM-MotionControllers --Hooked up QA_MoCoAll to the cycle of playercontrllers. --Added instructions for motion tracked device management controls, if the platform supports. -QA_MoCoAll --Switched tracking state colors to tracking spheres, becuase the arrows need to be not rendered in game for some configuration. --Added duplicate motion controller component to pad and another duplicate with disabled low latency tracking. -QA_MoCoDualShock --removed gun controller from this playercontroller, its redundant to the one in QA_MoCoAll -QA_MoCoComponents --world scale from controllers mode added ctrl-w, this is a good way to torture test world scale. #jira UEVR-766 Change 3413801 on 2017/04/28 by Keli.Hlodversson #jira UE-40220 StereoLayer splash layers are hardcoded to 8 by 4.5 meters (16:9 aspect ratio) on OculusRift Change 3429305 on 2017/05/08 by Keli.Hlodversson SteamVR Layers don't honor the (absence of) LAYER_FLAG_QUAD_PRESERVE_TEX_RATIO flag Avoid potential divide by zero in the DefaultStereoLayers implementation of the same flag. #jira UE-42855 Change 3429362 on 2017/05/08 by Ryan.Vance Integrating 3416918 for #jira UE-44404 Change 3429426 on 2017/05/08 by Keli.Hlodversson Set up a Test case for Layers in QA Game so that we can determine differences between platforms #jira UEVR-741 Change 3430829 on 2017/05/09 by Keli.Hlodversson Implement World-locked layer position type on SteamVR #jira UE-42940 Also fixes LAYER_FLAG_TEX_CONTINUOUS_UPDATE flag on SteamVR Change 3432895 on 2017/05/10 by Nick.Whiting Skipping recording of analytics if there is no device connected on startup, to prevent false reports when Oculus / SteamVR runtimes are installed on the user's machine #jira UE-37166 Change 3435917 on 2017/05/11 by Jeff.Fisher UE-44941 LoadErrors produced in log when opening TM-MotionControllers -LoadErrors:Error: Error /Game/Blueprints/QA_MoCoAll : Can't find file for asset. /Game/NewTextureRenderTarget2D -Removed the component that was referencing that. It was temporary test content, not meant to be submitted. #jira UE-44941 Change 3435938 on 2017/05/11 by Ryan.Vance Incorrect VertexDeclarationRHI for the hidden area mask pso. Change 3437197 on 2017/05/12 by Keli.Hlodversson Remove a irrelevant comment. Change 3437221 on 2017/05/12 by Keli.Hlodversson ... and now actually include the change that was supposed to go in CL#3437197 Remove a irrelevant comment. Change 3439359 on 2017/05/15 by Keli.Hlodversson Implement NoAlpha flag in DefauiltStereoLayers. #jira UEVR-777 Change 3439422 on 2017/05/15 by Keli.Hlodversson Fixes for CL#3439359 after review: Implement NoAlpha flag in DefauiltStereoLayers. #jira UEVR-777 Change 3439599 on 2017/05/15 by Jeff.Fisher UE-44962 Motion controller input not registered in TM-MotionControllers package -Pre-exising blueprint assumed only one textrenderactor in the level, but I added two more. It was working or not depending on the order in which they were constructed. -Now searching up the correct actor by Tag. #jira UE-44962 Change 3441176 on 2017/05/16 by Mike.Beach Can now explicitly hide components from a specific player through the player controller. Change 3441242 on 2017/05/16 by Mike.Beach Making it so any component can invoke a preview viewport in the editor (want it to be extended by scene capture components). Change 3441571 on 2017/05/16 by Mike.Beach Fixing CIS shadowed variable name issue (fallout from CL 3441176). Change 3443223 on 2017/05/17 by Mike.Beach Fixing root of shadowed variable name warning (now only in UT, fallout from 3441176) - renaming new base class variable so it doesn't conflict with third parties either. #jira UE-45120 [CL 3443810 by Mike Beach in Main branch]
2017-05-17 12:45:38 -04:00
{
// Updater render state
SetGraphicsPipelineState(RHICmdList, GraphicsPSOInit, 0);
Copying //UE4/Dev-VR to //UE4/Dev-Main (Source: //UE4/Dev-VR @ 3443236) #lockdown Nick.Penwarden #rb none ========================== MAJOR FEATURES + CHANGES ========================== Change 3385304 on 2017/04/07 by Ryan.Vance #jira UEVR-694 GL_TEXTURE_EXTERNAL_OES support hlslcc changes to support the TextureExternal keyword RHI changes to support RHICreateTextureExternal2D Fall back to a standard 2d texture on platforms without extension support Did not implement a shader cache solution as the resource is expected to be shared across processes, so recreating it from the shader cache would be a bad thing Change 3391376 on 2017/04/12 by Ben.Marsh Build: Add additional UE4Game targets for Dev-VR, to catch build failures in plugins that are disabled for games. Change 3392546 on 2017/04/13 by Jeff.Fisher Duplicating in Dev-VR (from Release-4.16) UEVR-734 PSVR sdk 4.5 tracking improvements UEVR-738 PSVR prediction time dynamic adjustment -New tracker profile and camera config to activate ps4 tracking improvements. -Calculating prediction time based on flip timings rather than assuming it will be a particular value. This makes the prediction time nearly perfect as long as we meet framerate and lets it adapt to the timing of when the prediction is made in the frame. -Changed reprojection fliparg to be the frame number, rather than a separate incrementor, so its more useful for debugging. #jira UEVR-734 #review-3391147 Change 3394508 on 2017/04/14 by Jeff.Fisher merge fix ShaderCacheTypes.h Change 3399628 on 2017/04/19 by Jeff.Fisher UEVR-582 PSVR not applying WorldToMeters for position accessor -Changed to apply WorldToMeters scale when we get the position data from PS4Tracker, so that the positions stored in MorpheusHMD are always in world space. #jira UEVR-582 #review-3398683 Change 3404200 on 2017/04/21 by Jeff.Fisher UEVR-239 GearVR headset worn/notworn notifications -Implemented the IHeadMountedDisplay accessor for this, and also hooked up the delegates that fire on PS4. -Implemented the IHeadMountedDisplay accessor for PS4. #jira UEVR-239 #review-3404174 @keli.hloedversson Change 3412688 on 2017/04/27 by Jeff.Fisher UEVR-766 PSVR test level improvements -VR/TM-MotionControllers --Hooked up QA_MoCoAll to the cycle of playercontrllers. --Added instructions for motion tracked device management controls, if the platform supports. -QA_MoCoAll --Switched tracking state colors to tracking spheres, becuase the arrows need to be not rendered in game for some configuration. --Added duplicate motion controller component to pad and another duplicate with disabled low latency tracking. -QA_MoCoDualShock --removed gun controller from this playercontroller, its redundant to the one in QA_MoCoAll -QA_MoCoComponents --world scale from controllers mode added ctrl-w, this is a good way to torture test world scale. #jira UEVR-766 Change 3413801 on 2017/04/28 by Keli.Hlodversson #jira UE-40220 StereoLayer splash layers are hardcoded to 8 by 4.5 meters (16:9 aspect ratio) on OculusRift Change 3429305 on 2017/05/08 by Keli.Hlodversson SteamVR Layers don't honor the (absence of) LAYER_FLAG_QUAD_PRESERVE_TEX_RATIO flag Avoid potential divide by zero in the DefaultStereoLayers implementation of the same flag. #jira UE-42855 Change 3429362 on 2017/05/08 by Ryan.Vance Integrating 3416918 for #jira UE-44404 Change 3429426 on 2017/05/08 by Keli.Hlodversson Set up a Test case for Layers in QA Game so that we can determine differences between platforms #jira UEVR-741 Change 3430829 on 2017/05/09 by Keli.Hlodversson Implement World-locked layer position type on SteamVR #jira UE-42940 Also fixes LAYER_FLAG_TEX_CONTINUOUS_UPDATE flag on SteamVR Change 3432895 on 2017/05/10 by Nick.Whiting Skipping recording of analytics if there is no device connected on startup, to prevent false reports when Oculus / SteamVR runtimes are installed on the user's machine #jira UE-37166 Change 3435917 on 2017/05/11 by Jeff.Fisher UE-44941 LoadErrors produced in log when opening TM-MotionControllers -LoadErrors:Error: Error /Game/Blueprints/QA_MoCoAll : Can't find file for asset. /Game/NewTextureRenderTarget2D -Removed the component that was referencing that. It was temporary test content, not meant to be submitted. #jira UE-44941 Change 3435938 on 2017/05/11 by Ryan.Vance Incorrect VertexDeclarationRHI for the hidden area mask pso. Change 3437197 on 2017/05/12 by Keli.Hlodversson Remove a irrelevant comment. Change 3437221 on 2017/05/12 by Keli.Hlodversson ... and now actually include the change that was supposed to go in CL#3437197 Remove a irrelevant comment. Change 3439359 on 2017/05/15 by Keli.Hlodversson Implement NoAlpha flag in DefauiltStereoLayers. #jira UEVR-777 Change 3439422 on 2017/05/15 by Keli.Hlodversson Fixes for CL#3439359 after review: Implement NoAlpha flag in DefauiltStereoLayers. #jira UEVR-777 Change 3439599 on 2017/05/15 by Jeff.Fisher UE-44962 Motion controller input not registered in TM-MotionControllers package -Pre-exising blueprint assumed only one textrenderactor in the level, but I added two more. It was working or not depending on the order in which they were constructed. -Now searching up the correct actor by Tag. #jira UE-44962 Change 3441176 on 2017/05/16 by Mike.Beach Can now explicitly hide components from a specific player through the player controller. Change 3441242 on 2017/05/16 by Mike.Beach Making it so any component can invoke a preview viewport in the editor (want it to be extended by scene capture components). Change 3441571 on 2017/05/16 by Mike.Beach Fixing CIS shadowed variable name issue (fallout from CL 3441176). Change 3443223 on 2017/05/17 by Mike.Beach Fixing root of shadowed variable name warning (now only in UT, fallout from 3441176) - renaming new base class variable so it doesn't conflict with third parties either. #jira UE-45120 [CL 3443810 by Mike Beach in Main branch]
2017-05-17 12:45:38 -04:00
}
Copying //UE4/Dev-VR to //UE4/Dev-Main (Source: //UE4/Dev-VR @ 3383750) #lockdown Nick.Penwarden ========================== MAJOR FEATURES + CHANGES ========================== Change 3012064 on 2016/06/13 by Nick.Whiting Merging Main -> DevVR Change 3048060 on 2016/07/13 by Nick.Whiting Integrating CL 3045721 from //depot/Partners/Google/AndroidVR-DevVR Upgrade Android and iOS GVR SDK to the latest. Fix the flipped vignette issue when using Unreal's post processing distortion. Change the Daydream & Cardboard mode to use scanline racing. Deprecate the ability to turn off individual UI elements. Change 3235307 on 2016/12/14 by Keli.Hlodversson Filter out excluded HMD modules during FEngineLoop:PreInitHMDDevice. The final selection still happens in UEngine::InitializeHMDDevice as all HMD plugins have not been loaded during PreInit Change 3235308 on 2016/12/14 by Ryan.Vance #jira UEVR-478 Monoscopic far field improvements Shader changes are now gated behind the read only cvar vr.MonoscopicFarField. Changing this requires a shader compile. Moved the mono rendering mode to the cvar vr.MonoscopicFarFieldMode. This is writable, so users can enable/disable mono rendering on the fly if the above cvar is enabled. Only write to the alpha channel in the mobile base pass if the object is opaque and MONOSCOPIC_FAR_FIELD is defined. Addressed code review comments. Change 3235397 on 2016/12/14 by Keli.Hlodversson [Oculus] Only enable GearVR platform on Windows if Oculus service is running Original author: Loren.McQuade Change 3235762 on 2016/12/14 by Keli.Hlodversson Add explicit parentheses to placate the build bots. Change 3242318 on 2016/12/21 by Ryan.Vance Working around pixel density crash. Change 3242522 on 2016/12/21 by Ryan.Vance Missing flag clear so our adaptive test was always returning true. Change 3243173 on 2016/12/22 by Ryan.Vance Integrating post present callback implementation from 4.14.1 Change 3248633 on 2017/01/05 by Keli.Hlodversson Copying //Tasks/UE4/Dev-VR-Refactoring to Dev-VR-Minimal (//UE4/Dev-VR-Minimal) Change 3248723 on 2017/01/05 by Keli.Hlodversson Fix after merge. EnablePositionalTracking no longer exists. Change 3249484 on 2017/01/06 by Keli.Hlodversson Add missing includes Change 3249714 on 2017/01/06 by Keli.Hlodversson Remove monolithic header include Change 3249980 on 2017/01/06 by Keli.Hlodversson SteamVR: Remove leftover unused WindowMirrorMode member variable Change 3252432 on 2017/01/10 by Keli.Hlodversson Submitting change by Loren McQuade to fix monolithic builds. Unshelved from pending changelist '3251436': Change 3257373 on 2017/01/13 by Keli.Hlodversson #jira UEVR-411: Finish renaming/removing/remodelling the remaining Oculus (Rift+GearVR) commands #jira UEVR-412: Rename and merge remaining Morpheus console commands #jira UEVR-417: Remove Exec from IHeadMountedDisplay Change 3269971 on 2017/01/24 by Jeff.Fisher UEVR-498 move controller is missing world to meters UEVR-522 PS4 motion controller worldscale support. -Passing world to meters scale into getControllerOrientationAndPosition because the thing asking about it ought to be part of a world, and know what it should be. This also avoids making PS4 motion controllers dependent on the HMD. Note Google VR Controller doesn't do position, so doesnt' care about scale. Oculus already had internal threadsafe tracking of world scale, so I left that. Steam handles world scale below our input level. -Also adding PlayerIndex member to FSceneView so we can figure out which view the MotionControllerComponent should get its worldscale from for the late render thread update. #jira UEVR-498 #review-3384107 Change 3288308 on 2017/02/06 by Jeff.Fisher UEVR-517 Detect MotionController Connectivity -PS4 can only track 2 controllers and 1 hmd. Support for dealing with that is needed. -Also need to support multiple motion controller components mapped to a single controller. Licencees have done that before. -Created a new interface IMotionTrackingSystemManagement, and implements it for PS4Tracker on PS4. -Created a MotionTrackedDeviceFunctionLibrary to expose that interface to blueprint. -With those one can enable and disable tracking on ps4 controllers and query their state to stay within the controller tracking limit. -PS4Tracker also keeps a blackboard of the enable/disable state so that one can enable or disable controllers that have not been connected yet, and have them enable tracking or not when they are connected. -DS4 controller no longer jumps back to 000 if it loses tracking. #review-3384107 #jira UEVR-517 Change 3288309 on 2017/02/06 by Keli.Hlodversson Add file missing from CL#3257373. Change 3288311 on 2017/02/06 by Jeff.Fisher UEVR-517 Detect MotionController Connectivity - Test content. -tm-motionControllers has a third mode where all playstation motion controllers for player 0 are availalbe. You can toggle them to track or not with ctrl-P,G,L,R for pad, gun, leftmove, rightmove or with alt-P,G,L,R. Ctrl tests doing so via MotionControllerComponent. Alt tests doing so by player index and controller type enum. -ctrl-A disables tracking of all controllers -alt-A disables tracking of all controllers for player 0 -ctrl-D toggles enabling new controllers by default -Also fixed one button not working in one of the other test modes for the Aim (gun) controller. -The controller 'models' have an arrow out the front. It is black if disabled. Red if enabled, but no tracker is active, yellow if tracked but inertial only, and green if fully tracked by the camera. -This logic is in the QA_MoCoAll blueprint. Change 3291601 on 2017/02/07 by Jeff.Fisher UEVR-536 PSVR motion controller tracking problem with multiple controllers -Previous code called GetRelativeTransform from the render thread, but the game thread could update it at any time. This caches that transform so that it can be safely used in the render thread. #jira UEVR-536 #review-3384107 @Ryan.Vance Change 3292460 on 2017/02/08 by Jeff.Fisher PS4 sceVrTrackerGetResult() error warning logging improved, and explanatory comment added. Change 3308771 on 2017/02/17 by Keli.Hlodversson Rename GoogleVR console commands #jira UEVR-412 Change 3309156 on 2017/02/17 by Keli.Hlodversson Track changes in r.ScreenPercentage on GoogleVR and set RenderTargetSize accordingly. Change 3311999 on 2017/02/20 by Keli.Hlodversson Create a default implementation for RecordAnalytics. Also create an initial stub for FHeadMountedDisplayBase for future default implementations of common HMD functionality. Make implementing IHeadMountedDisplay::GetDeviceName mandatory instead of defaulting to "Unknown" #jira UE-21878 #jira UEVR-213 Change 3313467 on 2017/02/20 by Ryan.Vance #jira UE-41604 3278583 pCustomPresent->AllocateRenderTargetTexture may return false, if we blindly return true we can end up with an invalid render target since the fall back sceneviewport will be skipped. 3278536 Adding ovrError_NoHmd to our sanity check in OnStartGameFrame. Change 3314002 on 2017/02/21 by Keli.Hlodversson Fix compilation on PS4 and Linux Change 3326722 on 2017/03/01 by Jeff.Fisher Merging //UE4/Dev-Main to Dev-VR (//UE4/Dev-VR) Integrating 4.15 from main. Change 3327567 on 2017/03/01 by Jeff.Fisher UEVR-588 Oculus crash on "stereo on" when the proximity sensor is not triggered. Duplicating from Release-4.15 cl 3327481, 3327542 -Don't ovr_SubmitFrame when the layers need to be recreated. They stay dirty until rendering is unpaused. #jira UEVR-588 #review-3384107 Change 3328098 on 2017/03/01 by Jeff.Fisher 4.15 merge fixes -Fixed deprecated enum name function usage. -Fixed world scale usage in GoogleVRController. -Fixed compile break in PS4Tracker. Change 3328271 on 2017/03/01 by Jeff.Fisher 2.15 merge -restroging GoogleVRController::GetWorldToMetersScale... cause it is used everywhere. Change 3328307 on 2017/03/01 by Jeff.Fisher 4.15 merge -More googlevr worldscale fixes. Change 3328312 on 2017/03/01 by Jeff.Fisher 4.15 merge -removing 2 unused includes Change 3330610 on 2017/03/02 by Jeff.Fisher 4.15 merge -fixing linux build Change 3333952 on 2017/03/06 by Keli.Hlodversson Implement common stereo layer management base class and use it in SteamVR and PS4. Fixes an outstanding bug in SteamVR where texures are updated every frame regardles of whether the continous update flag is set or not. #jira UEVR-628 #jira UE-42555 Change 3334961 on 2017/03/07 by Keli.Hlodversson Add missing include to fix non-unity builds Change 3336200 on 2017/03/07 by Keli.Hlodversson Fix compilation issues. (https://ec-01.epicgames.net/commander/link/jobDetails/jobs/7568252?jobName=UE4+Dev-VR+-+CL+3334961+-+Nightly+Build&s=Jobs) * Pre VS2015 compilers don't like mixing wide and unmarked strings in concatenation. Unfortunately LOCTEXT hides the call to the TEXT macro, completely hinding the prefix (which only gets added to the first fragment.) * Switch apparently doesn't know how to format a size_t for analytics either. Also: Typo in backwards compatibility command name alias Change 3337347 on 2017/03/08 by Jeff.Fisher UE-42631 Stereo off while prox sensor uncovered causes low framerate -Setting maxfps appropriately on 'stereo on/off'. #review-3384107 #jira UE-42631 Change 3338385 on 2017/03/08 by Ryan.Vance r.DisableDistortion was only being used for the mobile renderer Change 3342301 on 2017/03/10 by patrickr.donovan Test updates to TM-VRSmoke. Increased lightmap resolution on QA_MeshTypes meshes to improve readbility and reliablility of tests involving said asset. Rebuilt lighting. Change 3348133 on 2017/03/15 by Ryan.Vance Moving mono cvars to scene rendering to avoid cross module references. There's not a good reason to have them in the hmd module anyway. Change 3348836 on 2017/03/15 by Ryan.Vance Direct multi-view support for gear vr Monoscopic far field with multi-view (blit and direct) support for gear vr Support for translucent objects on both sides of the mono clip plane (due to a sorting issue, objects that straddle the plane composite incorrectly) Fixed missing discards/clears in the multi-view blit Change 3348843 on 2017/03/15 by Ryan.Vance Fixing color/depth target size mismatch when screen percentage scaling results in a size that isn't divisible by 16. Change 3349276 on 2017/03/16 by Keli.Hlodversson Fixing compile errors in GoogleVR after merge from main. Change 3350932 on 2017/03/16 by Ryan.Vance Re-enabling the gearvr plugin on windows. Change 3351977 on 2017/03/17 by Jeff.Fisher Fixing masked member variable. Change 3352314 on 2017/03/17 by Ryan.Vance We need to ensure that we don't select different lod levels for each eye. Change 3352993 on 2017/03/17 by Nick.Whiting Integrating CL 3345824 from Android-DevVR to Dev-VR. Support for device depth pass in SceneCaptureComponent2D Change 3355185 on 2017/03/20 by Nick.Whiting Added ability to disable the autoloading splash screen, which would prevent the hide splash screen node from ever working Change 3355676 on 2017/03/20 by Nick.Whiting PR #3384: [GNUX] SteamVR, OpenGL patch. (Contributed by yaakuro), with some minor modifications Change 3357286 on 2017/03/21 by Jeff.Fisher Fixing GenerateProjectFiles, looks like the .config. was removed from these references in main some time ago. Change 3357435 on 2017/03/21 by Jeff.Fisher Fixing editor build break, looks like a merge mistake. Change 3359960 on 2017/03/23 by Keli.Hlodversson Prevent potential crash when drawing tracking sensor location. Also only fetch HMD location once instead of once per tracking sensor. Change 3361230 on 2017/03/23 by Jeff.Fisher Fixing linux build opengl include problem... maybe. Change 3361638 on 2017/03/23 by Jeff.Fisher Another guess at fixing linux build. Change 3364224 on 2017/03/24 by Keli.Hlodversson Initial implementation of UEVR-576 - Base emulated layer implementation #jira UEVR-668 - Base emulated layer implementation: Initial framework for overrideable default implementation #jira UEVR-669 - Base emulated layer implementation: Face Locked Layers Support #jira UEVR-670 - Base emulated layer implementation: Tracker Locked Layers Support #jira UEVR-671 - Base emulated layer implementation: World Locked Layers Support #jira UEVR-672 - Base emulated layer implementation: Add support for optionally rendering face locked layers into a separate layer Change 3364242 on 2017/03/24 by Keli.Hlodversson SteamVR layers do not support negatve Layer priorities Change 3364263 on 2017/03/24 by Jeff.Fisher Merging //UE4/Dev-Main to Dev-VR (//UE4/Dev-VR) Monoscopicfarfieldrendering was just 'accept source', Ryan is going to look at fixing it up. Change 3364472 on 2017/03/24 by Jeff.Fisher Merge fix Change 3364475 on 2017/03/24 by Jeff.Fisher Fixing gearvr include. Change 3364486 on 2017/03/24 by Jeff.Fisher merge fix Change 3364532 on 2017/03/24 by Ryan.Vance pso update for mono rendering and stereo layers. Change 3364599 on 2017/03/24 by Ryan.Vance Oculus changes for SI1.12 Change 3365159 on 2017/03/26 by Jeff.Fisher include fix Change 3365182 on 2017/03/26 by Jeff.Fisher include fix Change 3366087 on 2017/03/27 by Ryan.Vance Remaining files from Oculus changes for SI1.12 merge request. Fixing a bug in OnlineSubsystem. Temporarily changing the eye padding change to be a shader clear to work around a clear color binding issue. Change 3366492 on 2017/03/27 by Ryan.Vance #jira UE-43294 Moved the clear before we setup state for drawing the mirror window content. It was stomping over state after the pso changes. Going to leave the shader clear in the rift prerender for clearing the eye padding for now. Change 3366929 on 2017/03/27 by Ryan.Vance Fixing compile error Change 3368549 on 2017/03/28 by Jeff.Fisher Merging Change: 3357998 from //UE4/Partner-Google-VR/Engine/... to Dev-VR Upgrade Google VR Plugin to v1.3: *Upgraded GVR NDK to 1.30.0 *Changed some BlueprintFunction to use BlueprintPure *Add the missing bDaydream flag in UEDeployAndroid.cs #review-3384107 Change 3368975 on 2017/03/28 by Ryan.Vance CIS clean up #jira UE-43428, UE-43429, UE-43426, UE-43427 Change 3369028 on 2017/03/28 by Ryan.Vance This is not exacly 'correct', but it's at least what the code was trying to do. Change 3370203 on 2017/03/29 by Ryan.Vance Adding gear vr controller component support. Change 3370918 on 2017/03/29 by Ryan.Vance Merging 3370569 using Partner-Google-VR_to_DevVR Change 3371030 on 2017/03/29 by Ryan.Vance Fixing linux build errors #jira UE-43426 Change 3371036 on 2017/03/29 by Ryan.Vance Oculus 4.16 integration. Not terribly happy with the use of std::string. They promised to clean this up for the next release. Change 3373495 on 2017/03/30 by Jeff.Fisher Merging from Dev-Main, in preparation for 4.16 Change 3373578 on 2017/03/30 by Jeff.Fisher build break, one comma short Change 3373870 on 2017/03/31 by Jeff.Fisher Include order fix. Change 3374001 on 2017/03/31 by Keli.Hlodversson Use DefaultStereoLayers as base for Morpheus implementation. #jira UEVR-709 #jira UE-42919 #rb: Jeff.Fisher Change 3374004 on 2017/03/31 by Keli.Hlodversson Fix rendering for the default Stereo Layers implementation on mobile. Depth test was set to "Never" instead of "Always" Destination texture on GLES is flipped on the Y axis, the coordinates are reversed in the shade when compiled on the relevant platforms. Change 3375125 on 2017/03/31 by Jeff.Fisher UE-43506 Ensure using VRPreview with GoogleVR -Removed the ensure, there is code in there to handle that case, and it works. #jira UE-43506 Change 3375294 on 2017/03/31 by nick.bullard Resaving Plugin content to resovle "saved with empty engine version" #jira UE-43537 Change 3375480 on 2017/03/31 by Jeff.Fisher UEVR-9 PSVR: Social Screen Support -Experimental social screen support for 4.16. -This does the basics of driving output through the Aux port in the proper format for display on the mirror monitor. -Only supports 30fps on the mirror monitor. 60fps will require the implementation of sony system dialogs to deal with incompatable system features (video streaming, remote play). -There is a project setting in Morpheus, under experiemental bEnableSocialScreenSeparateMode. This must be set to true to use this feature. When it is false we avoid allocating the back buffers. -MorpheusFunctionLibrary blueprints now have a node "SetSocialScreenMode" which can switch between SystemMirror (hardware supported mirroring), SeparateTest (alternates black and white), SeparateTexture (displays a texture, eg a render target, specified via blueprint), and SeparateMirror(puts the hmd render buffer on screen - which is both eyes, like a debug mode). -Also finally updated the bEnabled flag in project settings to tell people it's only for PC. #jira UEVR-9 #review-3384107 Change 3375540 on 2017/03/31 by Ryan.Vance #jira UE-43504 Fixing android build break when using a 64 bit isa. Change 3375655 on 2017/03/31 by Jeff.Fisher Fixing missing RGBAToYUV shader problem -This at least unblocks our process. Will revisit before zbr. Change 3375820 on 2017/04/01 by Jeff.Fisher Fixing linux build warning about HAS_MORPHEUS Change 3376050 on 2017/04/02 by Jeff.Fisher UE-43515 Step 'UE4Editor Static Analysis Win64' - Module.OnlineSubsystemOculus.cpp Warnings -Temporary fix for static analysis annotation warnings in OnlineSubsytemOculus. Longer term plan is to eliminate the use of the headers that trigger the warnings. -Just wrap all standard headers in static analysis disables. #jira UE-43515 Change 3376609 on 2017/04/03 by Jeff.Fisher Fixing rgbatoyuvshader include. Change 3377001 on 2017/04/03 by Jeff.Fisher UE-43547 Launch On PS4 fails during Run command - Missing global shader FRGBAToYUV420CS - shader c++ must be compiled so that it can be cooked for ps4. #jira UE-43547 Change 3379858 on 2017/04/04 by Jeff.Fisher Merging //UE4/Dev-Main to Dev-VR (//UE4/Dev-VR) pulling main this should get us ps4 sdk 4.508 Change 3379938 on 2017/04/04 by Ryan.Vance #jira UE-43548 If stereo layers are not being used, don't setup overlay targets as we will never clear/initialize them. The clear happens as part of the default layers PostRenderView_RenderThread call which wont be called if layers aren't being used in the scene. Change 3381519 on 2017/04/05 by Jeff.Fisher UEVR-733 PS4 sdk 4.500 hmd connection api changes break hmd connect. -Handling failure of sceHmdGetDeviceInformation if the hmd is powered off. It now returns an error code about an invalid handle in that case, rather than reporting unready. We just treat the error code like an unready status. #jira UEVR-733 #review-3384107 Change 3382019 on 2017/04/05 by Ryan.Vance Linux: add Vulkan support from dev editor: 3381593 Change 3382021 on 2017/04/05 by Ryan.Vance SteamVR on Linux using Vulkan OpenVR rev to 1_0_6 PR #3412: [GNUX] Initial support for SteamVR using Vulkan on GNUX platform. (Contributed by yaakuro) Change 3382076 on 2017/04/05 by Ryan.Vance Fixing linux steamvr lib path. It changed to something less silly in 1.0.6 Removing the steamvr plugin from the white list for linux. It's looking for a runtime that no one will have installed. Change 3383237 on 2017/04/06 by Ryan.Vance #jira UE-43732 Fixing Android compile issues. We can't wrap portions of a macro with a definie. This should probably be some sort of recursive macro thing since there's so much overlap. Good enough for now. Change 3383353 on 2017/04/06 by Ryan.Vance Fixing include cycles. Change 3383509 on 2017/04/06 by Jeff.Fisher Merging //UE4/Dev-Main to Dev-VR (//UE4/Dev-VR) merging the stuff from dev-mobile [CL 3384106 by Ryan Vance in Main branch]
2017-04-06 22:03:51 -04:00
FMatrix LayerMatrix = ConvertTransform(Layer.Transform);
FVector2D QuadSize = Layer.QuadSize * 0.5f;
if (Layer.Flags & LAYER_FLAG_QUAD_PRESERVE_TEX_RATIO)
{
Copying //UE4/Dev-VR to //UE4/Dev-Main (Source: //UE4/Dev-VR @ 3443236) #lockdown Nick.Penwarden #rb none ========================== MAJOR FEATURES + CHANGES ========================== Change 3385304 on 2017/04/07 by Ryan.Vance #jira UEVR-694 GL_TEXTURE_EXTERNAL_OES support hlslcc changes to support the TextureExternal keyword RHI changes to support RHICreateTextureExternal2D Fall back to a standard 2d texture on platforms without extension support Did not implement a shader cache solution as the resource is expected to be shared across processes, so recreating it from the shader cache would be a bad thing Change 3391376 on 2017/04/12 by Ben.Marsh Build: Add additional UE4Game targets for Dev-VR, to catch build failures in plugins that are disabled for games. Change 3392546 on 2017/04/13 by Jeff.Fisher Duplicating in Dev-VR (from Release-4.16) UEVR-734 PSVR sdk 4.5 tracking improvements UEVR-738 PSVR prediction time dynamic adjustment -New tracker profile and camera config to activate ps4 tracking improvements. -Calculating prediction time based on flip timings rather than assuming it will be a particular value. This makes the prediction time nearly perfect as long as we meet framerate and lets it adapt to the timing of when the prediction is made in the frame. -Changed reprojection fliparg to be the frame number, rather than a separate incrementor, so its more useful for debugging. #jira UEVR-734 #review-3391147 Change 3394508 on 2017/04/14 by Jeff.Fisher merge fix ShaderCacheTypes.h Change 3399628 on 2017/04/19 by Jeff.Fisher UEVR-582 PSVR not applying WorldToMeters for position accessor -Changed to apply WorldToMeters scale when we get the position data from PS4Tracker, so that the positions stored in MorpheusHMD are always in world space. #jira UEVR-582 #review-3398683 Change 3404200 on 2017/04/21 by Jeff.Fisher UEVR-239 GearVR headset worn/notworn notifications -Implemented the IHeadMountedDisplay accessor for this, and also hooked up the delegates that fire on PS4. -Implemented the IHeadMountedDisplay accessor for PS4. #jira UEVR-239 #review-3404174 @keli.hloedversson Change 3412688 on 2017/04/27 by Jeff.Fisher UEVR-766 PSVR test level improvements -VR/TM-MotionControllers --Hooked up QA_MoCoAll to the cycle of playercontrllers. --Added instructions for motion tracked device management controls, if the platform supports. -QA_MoCoAll --Switched tracking state colors to tracking spheres, becuase the arrows need to be not rendered in game for some configuration. --Added duplicate motion controller component to pad and another duplicate with disabled low latency tracking. -QA_MoCoDualShock --removed gun controller from this playercontroller, its redundant to the one in QA_MoCoAll -QA_MoCoComponents --world scale from controllers mode added ctrl-w, this is a good way to torture test world scale. #jira UEVR-766 Change 3413801 on 2017/04/28 by Keli.Hlodversson #jira UE-40220 StereoLayer splash layers are hardcoded to 8 by 4.5 meters (16:9 aspect ratio) on OculusRift Change 3429305 on 2017/05/08 by Keli.Hlodversson SteamVR Layers don't honor the (absence of) LAYER_FLAG_QUAD_PRESERVE_TEX_RATIO flag Avoid potential divide by zero in the DefaultStereoLayers implementation of the same flag. #jira UE-42855 Change 3429362 on 2017/05/08 by Ryan.Vance Integrating 3416918 for #jira UE-44404 Change 3429426 on 2017/05/08 by Keli.Hlodversson Set up a Test case for Layers in QA Game so that we can determine differences between platforms #jira UEVR-741 Change 3430829 on 2017/05/09 by Keli.Hlodversson Implement World-locked layer position type on SteamVR #jira UE-42940 Also fixes LAYER_FLAG_TEX_CONTINUOUS_UPDATE flag on SteamVR Change 3432895 on 2017/05/10 by Nick.Whiting Skipping recording of analytics if there is no device connected on startup, to prevent false reports when Oculus / SteamVR runtimes are installed on the user's machine #jira UE-37166 Change 3435917 on 2017/05/11 by Jeff.Fisher UE-44941 LoadErrors produced in log when opening TM-MotionControllers -LoadErrors:Error: Error /Game/Blueprints/QA_MoCoAll : Can't find file for asset. /Game/NewTextureRenderTarget2D -Removed the component that was referencing that. It was temporary test content, not meant to be submitted. #jira UE-44941 Change 3435938 on 2017/05/11 by Ryan.Vance Incorrect VertexDeclarationRHI for the hidden area mask pso. Change 3437197 on 2017/05/12 by Keli.Hlodversson Remove a irrelevant comment. Change 3437221 on 2017/05/12 by Keli.Hlodversson ... and now actually include the change that was supposed to go in CL#3437197 Remove a irrelevant comment. Change 3439359 on 2017/05/15 by Keli.Hlodversson Implement NoAlpha flag in DefauiltStereoLayers. #jira UEVR-777 Change 3439422 on 2017/05/15 by Keli.Hlodversson Fixes for CL#3439359 after review: Implement NoAlpha flag in DefauiltStereoLayers. #jira UEVR-777 Change 3439599 on 2017/05/15 by Jeff.Fisher UE-44962 Motion controller input not registered in TM-MotionControllers package -Pre-exising blueprint assumed only one textrenderactor in the level, but I added two more. It was working or not depending on the order in which they were constructed. -Now searching up the correct actor by Tag. #jira UE-44962 Change 3441176 on 2017/05/16 by Mike.Beach Can now explicitly hide components from a specific player through the player controller. Change 3441242 on 2017/05/16 by Mike.Beach Making it so any component can invoke a preview viewport in the editor (want it to be extended by scene capture components). Change 3441571 on 2017/05/16 by Mike.Beach Fixing CIS shadowed variable name issue (fallout from CL 3441176). Change 3443223 on 2017/05/17 by Mike.Beach Fixing root of shadowed variable name warning (now only in UT, fallout from 3441176) - renaming new base class variable so it doesn't conflict with third parties either. #jira UE-45120 [CL 3443810 by Mike Beach in Main branch]
2017-05-17 12:45:38 -04:00
const FRHITexture2D* Tex2D = Layer.Texture->GetTexture2D();
Copying //UE4/Dev-VR to //UE4/Dev-Main (Source: //UE4/Dev-VR @ 3383750) #lockdown Nick.Penwarden ========================== MAJOR FEATURES + CHANGES ========================== Change 3012064 on 2016/06/13 by Nick.Whiting Merging Main -> DevVR Change 3048060 on 2016/07/13 by Nick.Whiting Integrating CL 3045721 from //depot/Partners/Google/AndroidVR-DevVR Upgrade Android and iOS GVR SDK to the latest. Fix the flipped vignette issue when using Unreal's post processing distortion. Change the Daydream & Cardboard mode to use scanline racing. Deprecate the ability to turn off individual UI elements. Change 3235307 on 2016/12/14 by Keli.Hlodversson Filter out excluded HMD modules during FEngineLoop:PreInitHMDDevice. The final selection still happens in UEngine::InitializeHMDDevice as all HMD plugins have not been loaded during PreInit Change 3235308 on 2016/12/14 by Ryan.Vance #jira UEVR-478 Monoscopic far field improvements Shader changes are now gated behind the read only cvar vr.MonoscopicFarField. Changing this requires a shader compile. Moved the mono rendering mode to the cvar vr.MonoscopicFarFieldMode. This is writable, so users can enable/disable mono rendering on the fly if the above cvar is enabled. Only write to the alpha channel in the mobile base pass if the object is opaque and MONOSCOPIC_FAR_FIELD is defined. Addressed code review comments. Change 3235397 on 2016/12/14 by Keli.Hlodversson [Oculus] Only enable GearVR platform on Windows if Oculus service is running Original author: Loren.McQuade Change 3235762 on 2016/12/14 by Keli.Hlodversson Add explicit parentheses to placate the build bots. Change 3242318 on 2016/12/21 by Ryan.Vance Working around pixel density crash. Change 3242522 on 2016/12/21 by Ryan.Vance Missing flag clear so our adaptive test was always returning true. Change 3243173 on 2016/12/22 by Ryan.Vance Integrating post present callback implementation from 4.14.1 Change 3248633 on 2017/01/05 by Keli.Hlodversson Copying //Tasks/UE4/Dev-VR-Refactoring to Dev-VR-Minimal (//UE4/Dev-VR-Minimal) Change 3248723 on 2017/01/05 by Keli.Hlodversson Fix after merge. EnablePositionalTracking no longer exists. Change 3249484 on 2017/01/06 by Keli.Hlodversson Add missing includes Change 3249714 on 2017/01/06 by Keli.Hlodversson Remove monolithic header include Change 3249980 on 2017/01/06 by Keli.Hlodversson SteamVR: Remove leftover unused WindowMirrorMode member variable Change 3252432 on 2017/01/10 by Keli.Hlodversson Submitting change by Loren McQuade to fix monolithic builds. Unshelved from pending changelist '3251436': Change 3257373 on 2017/01/13 by Keli.Hlodversson #jira UEVR-411: Finish renaming/removing/remodelling the remaining Oculus (Rift+GearVR) commands #jira UEVR-412: Rename and merge remaining Morpheus console commands #jira UEVR-417: Remove Exec from IHeadMountedDisplay Change 3269971 on 2017/01/24 by Jeff.Fisher UEVR-498 move controller is missing world to meters UEVR-522 PS4 motion controller worldscale support. -Passing world to meters scale into getControllerOrientationAndPosition because the thing asking about it ought to be part of a world, and know what it should be. This also avoids making PS4 motion controllers dependent on the HMD. Note Google VR Controller doesn't do position, so doesnt' care about scale. Oculus already had internal threadsafe tracking of world scale, so I left that. Steam handles world scale below our input level. -Also adding PlayerIndex member to FSceneView so we can figure out which view the MotionControllerComponent should get its worldscale from for the late render thread update. #jira UEVR-498 #review-3384107 Change 3288308 on 2017/02/06 by Jeff.Fisher UEVR-517 Detect MotionController Connectivity -PS4 can only track 2 controllers and 1 hmd. Support for dealing with that is needed. -Also need to support multiple motion controller components mapped to a single controller. Licencees have done that before. -Created a new interface IMotionTrackingSystemManagement, and implements it for PS4Tracker on PS4. -Created a MotionTrackedDeviceFunctionLibrary to expose that interface to blueprint. -With those one can enable and disable tracking on ps4 controllers and query their state to stay within the controller tracking limit. -PS4Tracker also keeps a blackboard of the enable/disable state so that one can enable or disable controllers that have not been connected yet, and have them enable tracking or not when they are connected. -DS4 controller no longer jumps back to 000 if it loses tracking. #review-3384107 #jira UEVR-517 Change 3288309 on 2017/02/06 by Keli.Hlodversson Add file missing from CL#3257373. Change 3288311 on 2017/02/06 by Jeff.Fisher UEVR-517 Detect MotionController Connectivity - Test content. -tm-motionControllers has a third mode where all playstation motion controllers for player 0 are availalbe. You can toggle them to track or not with ctrl-P,G,L,R for pad, gun, leftmove, rightmove or with alt-P,G,L,R. Ctrl tests doing so via MotionControllerComponent. Alt tests doing so by player index and controller type enum. -ctrl-A disables tracking of all controllers -alt-A disables tracking of all controllers for player 0 -ctrl-D toggles enabling new controllers by default -Also fixed one button not working in one of the other test modes for the Aim (gun) controller. -The controller 'models' have an arrow out the front. It is black if disabled. Red if enabled, but no tracker is active, yellow if tracked but inertial only, and green if fully tracked by the camera. -This logic is in the QA_MoCoAll blueprint. Change 3291601 on 2017/02/07 by Jeff.Fisher UEVR-536 PSVR motion controller tracking problem with multiple controllers -Previous code called GetRelativeTransform from the render thread, but the game thread could update it at any time. This caches that transform so that it can be safely used in the render thread. #jira UEVR-536 #review-3384107 @Ryan.Vance Change 3292460 on 2017/02/08 by Jeff.Fisher PS4 sceVrTrackerGetResult() error warning logging improved, and explanatory comment added. Change 3308771 on 2017/02/17 by Keli.Hlodversson Rename GoogleVR console commands #jira UEVR-412 Change 3309156 on 2017/02/17 by Keli.Hlodversson Track changes in r.ScreenPercentage on GoogleVR and set RenderTargetSize accordingly. Change 3311999 on 2017/02/20 by Keli.Hlodversson Create a default implementation for RecordAnalytics. Also create an initial stub for FHeadMountedDisplayBase for future default implementations of common HMD functionality. Make implementing IHeadMountedDisplay::GetDeviceName mandatory instead of defaulting to "Unknown" #jira UE-21878 #jira UEVR-213 Change 3313467 on 2017/02/20 by Ryan.Vance #jira UE-41604 3278583 pCustomPresent->AllocateRenderTargetTexture may return false, if we blindly return true we can end up with an invalid render target since the fall back sceneviewport will be skipped. 3278536 Adding ovrError_NoHmd to our sanity check in OnStartGameFrame. Change 3314002 on 2017/02/21 by Keli.Hlodversson Fix compilation on PS4 and Linux Change 3326722 on 2017/03/01 by Jeff.Fisher Merging //UE4/Dev-Main to Dev-VR (//UE4/Dev-VR) Integrating 4.15 from main. Change 3327567 on 2017/03/01 by Jeff.Fisher UEVR-588 Oculus crash on "stereo on" when the proximity sensor is not triggered. Duplicating from Release-4.15 cl 3327481, 3327542 -Don't ovr_SubmitFrame when the layers need to be recreated. They stay dirty until rendering is unpaused. #jira UEVR-588 #review-3384107 Change 3328098 on 2017/03/01 by Jeff.Fisher 4.15 merge fixes -Fixed deprecated enum name function usage. -Fixed world scale usage in GoogleVRController. -Fixed compile break in PS4Tracker. Change 3328271 on 2017/03/01 by Jeff.Fisher 2.15 merge -restroging GoogleVRController::GetWorldToMetersScale... cause it is used everywhere. Change 3328307 on 2017/03/01 by Jeff.Fisher 4.15 merge -More googlevr worldscale fixes. Change 3328312 on 2017/03/01 by Jeff.Fisher 4.15 merge -removing 2 unused includes Change 3330610 on 2017/03/02 by Jeff.Fisher 4.15 merge -fixing linux build Change 3333952 on 2017/03/06 by Keli.Hlodversson Implement common stereo layer management base class and use it in SteamVR and PS4. Fixes an outstanding bug in SteamVR where texures are updated every frame regardles of whether the continous update flag is set or not. #jira UEVR-628 #jira UE-42555 Change 3334961 on 2017/03/07 by Keli.Hlodversson Add missing include to fix non-unity builds Change 3336200 on 2017/03/07 by Keli.Hlodversson Fix compilation issues. (https://ec-01.epicgames.net/commander/link/jobDetails/jobs/7568252?jobName=UE4+Dev-VR+-+CL+3334961+-+Nightly+Build&s=Jobs) * Pre VS2015 compilers don't like mixing wide and unmarked strings in concatenation. Unfortunately LOCTEXT hides the call to the TEXT macro, completely hinding the prefix (which only gets added to the first fragment.) * Switch apparently doesn't know how to format a size_t for analytics either. Also: Typo in backwards compatibility command name alias Change 3337347 on 2017/03/08 by Jeff.Fisher UE-42631 Stereo off while prox sensor uncovered causes low framerate -Setting maxfps appropriately on 'stereo on/off'. #review-3384107 #jira UE-42631 Change 3338385 on 2017/03/08 by Ryan.Vance r.DisableDistortion was only being used for the mobile renderer Change 3342301 on 2017/03/10 by patrickr.donovan Test updates to TM-VRSmoke. Increased lightmap resolution on QA_MeshTypes meshes to improve readbility and reliablility of tests involving said asset. Rebuilt lighting. Change 3348133 on 2017/03/15 by Ryan.Vance Moving mono cvars to scene rendering to avoid cross module references. There's not a good reason to have them in the hmd module anyway. Change 3348836 on 2017/03/15 by Ryan.Vance Direct multi-view support for gear vr Monoscopic far field with multi-view (blit and direct) support for gear vr Support for translucent objects on both sides of the mono clip plane (due to a sorting issue, objects that straddle the plane composite incorrectly) Fixed missing discards/clears in the multi-view blit Change 3348843 on 2017/03/15 by Ryan.Vance Fixing color/depth target size mismatch when screen percentage scaling results in a size that isn't divisible by 16. Change 3349276 on 2017/03/16 by Keli.Hlodversson Fixing compile errors in GoogleVR after merge from main. Change 3350932 on 2017/03/16 by Ryan.Vance Re-enabling the gearvr plugin on windows. Change 3351977 on 2017/03/17 by Jeff.Fisher Fixing masked member variable. Change 3352314 on 2017/03/17 by Ryan.Vance We need to ensure that we don't select different lod levels for each eye. Change 3352993 on 2017/03/17 by Nick.Whiting Integrating CL 3345824 from Android-DevVR to Dev-VR. Support for device depth pass in SceneCaptureComponent2D Change 3355185 on 2017/03/20 by Nick.Whiting Added ability to disable the autoloading splash screen, which would prevent the hide splash screen node from ever working Change 3355676 on 2017/03/20 by Nick.Whiting PR #3384: [GNUX] SteamVR, OpenGL patch. (Contributed by yaakuro), with some minor modifications Change 3357286 on 2017/03/21 by Jeff.Fisher Fixing GenerateProjectFiles, looks like the .config. was removed from these references in main some time ago. Change 3357435 on 2017/03/21 by Jeff.Fisher Fixing editor build break, looks like a merge mistake. Change 3359960 on 2017/03/23 by Keli.Hlodversson Prevent potential crash when drawing tracking sensor location. Also only fetch HMD location once instead of once per tracking sensor. Change 3361230 on 2017/03/23 by Jeff.Fisher Fixing linux build opengl include problem... maybe. Change 3361638 on 2017/03/23 by Jeff.Fisher Another guess at fixing linux build. Change 3364224 on 2017/03/24 by Keli.Hlodversson Initial implementation of UEVR-576 - Base emulated layer implementation #jira UEVR-668 - Base emulated layer implementation: Initial framework for overrideable default implementation #jira UEVR-669 - Base emulated layer implementation: Face Locked Layers Support #jira UEVR-670 - Base emulated layer implementation: Tracker Locked Layers Support #jira UEVR-671 - Base emulated layer implementation: World Locked Layers Support #jira UEVR-672 - Base emulated layer implementation: Add support for optionally rendering face locked layers into a separate layer Change 3364242 on 2017/03/24 by Keli.Hlodversson SteamVR layers do not support negatve Layer priorities Change 3364263 on 2017/03/24 by Jeff.Fisher Merging //UE4/Dev-Main to Dev-VR (//UE4/Dev-VR) Monoscopicfarfieldrendering was just 'accept source', Ryan is going to look at fixing it up. Change 3364472 on 2017/03/24 by Jeff.Fisher Merge fix Change 3364475 on 2017/03/24 by Jeff.Fisher Fixing gearvr include. Change 3364486 on 2017/03/24 by Jeff.Fisher merge fix Change 3364532 on 2017/03/24 by Ryan.Vance pso update for mono rendering and stereo layers. Change 3364599 on 2017/03/24 by Ryan.Vance Oculus changes for SI1.12 Change 3365159 on 2017/03/26 by Jeff.Fisher include fix Change 3365182 on 2017/03/26 by Jeff.Fisher include fix Change 3366087 on 2017/03/27 by Ryan.Vance Remaining files from Oculus changes for SI1.12 merge request. Fixing a bug in OnlineSubsystem. Temporarily changing the eye padding change to be a shader clear to work around a clear color binding issue. Change 3366492 on 2017/03/27 by Ryan.Vance #jira UE-43294 Moved the clear before we setup state for drawing the mirror window content. It was stomping over state after the pso changes. Going to leave the shader clear in the rift prerender for clearing the eye padding for now. Change 3366929 on 2017/03/27 by Ryan.Vance Fixing compile error Change 3368549 on 2017/03/28 by Jeff.Fisher Merging Change: 3357998 from //UE4/Partner-Google-VR/Engine/... to Dev-VR Upgrade Google VR Plugin to v1.3: *Upgraded GVR NDK to 1.30.0 *Changed some BlueprintFunction to use BlueprintPure *Add the missing bDaydream flag in UEDeployAndroid.cs #review-3384107 Change 3368975 on 2017/03/28 by Ryan.Vance CIS clean up #jira UE-43428, UE-43429, UE-43426, UE-43427 Change 3369028 on 2017/03/28 by Ryan.Vance This is not exacly 'correct', but it's at least what the code was trying to do. Change 3370203 on 2017/03/29 by Ryan.Vance Adding gear vr controller component support. Change 3370918 on 2017/03/29 by Ryan.Vance Merging 3370569 using Partner-Google-VR_to_DevVR Change 3371030 on 2017/03/29 by Ryan.Vance Fixing linux build errors #jira UE-43426 Change 3371036 on 2017/03/29 by Ryan.Vance Oculus 4.16 integration. Not terribly happy with the use of std::string. They promised to clean this up for the next release. Change 3373495 on 2017/03/30 by Jeff.Fisher Merging from Dev-Main, in preparation for 4.16 Change 3373578 on 2017/03/30 by Jeff.Fisher build break, one comma short Change 3373870 on 2017/03/31 by Jeff.Fisher Include order fix. Change 3374001 on 2017/03/31 by Keli.Hlodversson Use DefaultStereoLayers as base for Morpheus implementation. #jira UEVR-709 #jira UE-42919 #rb: Jeff.Fisher Change 3374004 on 2017/03/31 by Keli.Hlodversson Fix rendering for the default Stereo Layers implementation on mobile. Depth test was set to "Never" instead of "Always" Destination texture on GLES is flipped on the Y axis, the coordinates are reversed in the shade when compiled on the relevant platforms. Change 3375125 on 2017/03/31 by Jeff.Fisher UE-43506 Ensure using VRPreview with GoogleVR -Removed the ensure, there is code in there to handle that case, and it works. #jira UE-43506 Change 3375294 on 2017/03/31 by nick.bullard Resaving Plugin content to resovle "saved with empty engine version" #jira UE-43537 Change 3375480 on 2017/03/31 by Jeff.Fisher UEVR-9 PSVR: Social Screen Support -Experimental social screen support for 4.16. -This does the basics of driving output through the Aux port in the proper format for display on the mirror monitor. -Only supports 30fps on the mirror monitor. 60fps will require the implementation of sony system dialogs to deal with incompatable system features (video streaming, remote play). -There is a project setting in Morpheus, under experiemental bEnableSocialScreenSeparateMode. This must be set to true to use this feature. When it is false we avoid allocating the back buffers. -MorpheusFunctionLibrary blueprints now have a node "SetSocialScreenMode" which can switch between SystemMirror (hardware supported mirroring), SeparateTest (alternates black and white), SeparateTexture (displays a texture, eg a render target, specified via blueprint), and SeparateMirror(puts the hmd render buffer on screen - which is both eyes, like a debug mode). -Also finally updated the bEnabled flag in project settings to tell people it's only for PC. #jira UEVR-9 #review-3384107 Change 3375540 on 2017/03/31 by Ryan.Vance #jira UE-43504 Fixing android build break when using a 64 bit isa. Change 3375655 on 2017/03/31 by Jeff.Fisher Fixing missing RGBAToYUV shader problem -This at least unblocks our process. Will revisit before zbr. Change 3375820 on 2017/04/01 by Jeff.Fisher Fixing linux build warning about HAS_MORPHEUS Change 3376050 on 2017/04/02 by Jeff.Fisher UE-43515 Step 'UE4Editor Static Analysis Win64' - Module.OnlineSubsystemOculus.cpp Warnings -Temporary fix for static analysis annotation warnings in OnlineSubsytemOculus. Longer term plan is to eliminate the use of the headers that trigger the warnings. -Just wrap all standard headers in static analysis disables. #jira UE-43515 Change 3376609 on 2017/04/03 by Jeff.Fisher Fixing rgbatoyuvshader include. Change 3377001 on 2017/04/03 by Jeff.Fisher UE-43547 Launch On PS4 fails during Run command - Missing global shader FRGBAToYUV420CS - shader c++ must be compiled so that it can be cooked for ps4. #jira UE-43547 Change 3379858 on 2017/04/04 by Jeff.Fisher Merging //UE4/Dev-Main to Dev-VR (//UE4/Dev-VR) pulling main this should get us ps4 sdk 4.508 Change 3379938 on 2017/04/04 by Ryan.Vance #jira UE-43548 If stereo layers are not being used, don't setup overlay targets as we will never clear/initialize them. The clear happens as part of the default layers PostRenderView_RenderThread call which wont be called if layers aren't being used in the scene. Change 3381519 on 2017/04/05 by Jeff.Fisher UEVR-733 PS4 sdk 4.500 hmd connection api changes break hmd connect. -Handling failure of sceHmdGetDeviceInformation if the hmd is powered off. It now returns an error code about an invalid handle in that case, rather than reporting unready. We just treat the error code like an unready status. #jira UEVR-733 #review-3384107 Change 3382019 on 2017/04/05 by Ryan.Vance Linux: add Vulkan support from dev editor: 3381593 Change 3382021 on 2017/04/05 by Ryan.Vance SteamVR on Linux using Vulkan OpenVR rev to 1_0_6 PR #3412: [GNUX] Initial support for SteamVR using Vulkan on GNUX platform. (Contributed by yaakuro) Change 3382076 on 2017/04/05 by Ryan.Vance Fixing linux steamvr lib path. It changed to something less silly in 1.0.6 Removing the steamvr plugin from the white list for linux. It's looking for a runtime that no one will have installed. Change 3383237 on 2017/04/06 by Ryan.Vance #jira UE-43732 Fixing Android compile issues. We can't wrap portions of a macro with a definie. This should probably be some sort of recursive macro thing since there's so much overlap. Good enough for now. Change 3383353 on 2017/04/06 by Ryan.Vance Fixing include cycles. Change 3383509 on 2017/04/06 by Jeff.Fisher Merging //UE4/Dev-Main to Dev-VR (//UE4/Dev-VR) merging the stuff from dev-mobile [CL 3384106 by Ryan Vance in Main branch]
2017-04-06 22:03:51 -04:00
if (Tex2D)
{
const float SizeX = Tex2D->GetSizeX();
const float SizeY = Tex2D->GetSizeY();
Copying //UE4/Dev-VR to //UE4/Dev-Main (Source: //UE4/Dev-VR @ 3443236) #lockdown Nick.Penwarden #rb none ========================== MAJOR FEATURES + CHANGES ========================== Change 3385304 on 2017/04/07 by Ryan.Vance #jira UEVR-694 GL_TEXTURE_EXTERNAL_OES support hlslcc changes to support the TextureExternal keyword RHI changes to support RHICreateTextureExternal2D Fall back to a standard 2d texture on platforms without extension support Did not implement a shader cache solution as the resource is expected to be shared across processes, so recreating it from the shader cache would be a bad thing Change 3391376 on 2017/04/12 by Ben.Marsh Build: Add additional UE4Game targets for Dev-VR, to catch build failures in plugins that are disabled for games. Change 3392546 on 2017/04/13 by Jeff.Fisher Duplicating in Dev-VR (from Release-4.16) UEVR-734 PSVR sdk 4.5 tracking improvements UEVR-738 PSVR prediction time dynamic adjustment -New tracker profile and camera config to activate ps4 tracking improvements. -Calculating prediction time based on flip timings rather than assuming it will be a particular value. This makes the prediction time nearly perfect as long as we meet framerate and lets it adapt to the timing of when the prediction is made in the frame. -Changed reprojection fliparg to be the frame number, rather than a separate incrementor, so its more useful for debugging. #jira UEVR-734 #review-3391147 Change 3394508 on 2017/04/14 by Jeff.Fisher merge fix ShaderCacheTypes.h Change 3399628 on 2017/04/19 by Jeff.Fisher UEVR-582 PSVR not applying WorldToMeters for position accessor -Changed to apply WorldToMeters scale when we get the position data from PS4Tracker, so that the positions stored in MorpheusHMD are always in world space. #jira UEVR-582 #review-3398683 Change 3404200 on 2017/04/21 by Jeff.Fisher UEVR-239 GearVR headset worn/notworn notifications -Implemented the IHeadMountedDisplay accessor for this, and also hooked up the delegates that fire on PS4. -Implemented the IHeadMountedDisplay accessor for PS4. #jira UEVR-239 #review-3404174 @keli.hloedversson Change 3412688 on 2017/04/27 by Jeff.Fisher UEVR-766 PSVR test level improvements -VR/TM-MotionControllers --Hooked up QA_MoCoAll to the cycle of playercontrllers. --Added instructions for motion tracked device management controls, if the platform supports. -QA_MoCoAll --Switched tracking state colors to tracking spheres, becuase the arrows need to be not rendered in game for some configuration. --Added duplicate motion controller component to pad and another duplicate with disabled low latency tracking. -QA_MoCoDualShock --removed gun controller from this playercontroller, its redundant to the one in QA_MoCoAll -QA_MoCoComponents --world scale from controllers mode added ctrl-w, this is a good way to torture test world scale. #jira UEVR-766 Change 3413801 on 2017/04/28 by Keli.Hlodversson #jira UE-40220 StereoLayer splash layers are hardcoded to 8 by 4.5 meters (16:9 aspect ratio) on OculusRift Change 3429305 on 2017/05/08 by Keli.Hlodversson SteamVR Layers don't honor the (absence of) LAYER_FLAG_QUAD_PRESERVE_TEX_RATIO flag Avoid potential divide by zero in the DefaultStereoLayers implementation of the same flag. #jira UE-42855 Change 3429362 on 2017/05/08 by Ryan.Vance Integrating 3416918 for #jira UE-44404 Change 3429426 on 2017/05/08 by Keli.Hlodversson Set up a Test case for Layers in QA Game so that we can determine differences between platforms #jira UEVR-741 Change 3430829 on 2017/05/09 by Keli.Hlodversson Implement World-locked layer position type on SteamVR #jira UE-42940 Also fixes LAYER_FLAG_TEX_CONTINUOUS_UPDATE flag on SteamVR Change 3432895 on 2017/05/10 by Nick.Whiting Skipping recording of analytics if there is no device connected on startup, to prevent false reports when Oculus / SteamVR runtimes are installed on the user's machine #jira UE-37166 Change 3435917 on 2017/05/11 by Jeff.Fisher UE-44941 LoadErrors produced in log when opening TM-MotionControllers -LoadErrors:Error: Error /Game/Blueprints/QA_MoCoAll : Can't find file for asset. /Game/NewTextureRenderTarget2D -Removed the component that was referencing that. It was temporary test content, not meant to be submitted. #jira UE-44941 Change 3435938 on 2017/05/11 by Ryan.Vance Incorrect VertexDeclarationRHI for the hidden area mask pso. Change 3437197 on 2017/05/12 by Keli.Hlodversson Remove a irrelevant comment. Change 3437221 on 2017/05/12 by Keli.Hlodversson ... and now actually include the change that was supposed to go in CL#3437197 Remove a irrelevant comment. Change 3439359 on 2017/05/15 by Keli.Hlodversson Implement NoAlpha flag in DefauiltStereoLayers. #jira UEVR-777 Change 3439422 on 2017/05/15 by Keli.Hlodversson Fixes for CL#3439359 after review: Implement NoAlpha flag in DefauiltStereoLayers. #jira UEVR-777 Change 3439599 on 2017/05/15 by Jeff.Fisher UE-44962 Motion controller input not registered in TM-MotionControllers package -Pre-exising blueprint assumed only one textrenderactor in the level, but I added two more. It was working or not depending on the order in which they were constructed. -Now searching up the correct actor by Tag. #jira UE-44962 Change 3441176 on 2017/05/16 by Mike.Beach Can now explicitly hide components from a specific player through the player controller. Change 3441242 on 2017/05/16 by Mike.Beach Making it so any component can invoke a preview viewport in the editor (want it to be extended by scene capture components). Change 3441571 on 2017/05/16 by Mike.Beach Fixing CIS shadowed variable name issue (fallout from CL 3441176). Change 3443223 on 2017/05/17 by Mike.Beach Fixing root of shadowed variable name warning (now only in UT, fallout from 3441176) - renaming new base class variable so it doesn't conflict with third parties either. #jira UE-45120 [CL 3443810 by Mike Beach in Main branch]
2017-05-17 12:45:38 -04:00
if (SizeX != 0)
{
const float AspectRatio = SizeY / SizeX;
QuadSize.Y = QuadSize.X * AspectRatio;
}
Copying //UE4/Dev-VR to //UE4/Dev-Main (Source: //UE4/Dev-VR @ 3383750) #lockdown Nick.Penwarden ========================== MAJOR FEATURES + CHANGES ========================== Change 3012064 on 2016/06/13 by Nick.Whiting Merging Main -> DevVR Change 3048060 on 2016/07/13 by Nick.Whiting Integrating CL 3045721 from //depot/Partners/Google/AndroidVR-DevVR Upgrade Android and iOS GVR SDK to the latest. Fix the flipped vignette issue when using Unreal's post processing distortion. Change the Daydream & Cardboard mode to use scanline racing. Deprecate the ability to turn off individual UI elements. Change 3235307 on 2016/12/14 by Keli.Hlodversson Filter out excluded HMD modules during FEngineLoop:PreInitHMDDevice. The final selection still happens in UEngine::InitializeHMDDevice as all HMD plugins have not been loaded during PreInit Change 3235308 on 2016/12/14 by Ryan.Vance #jira UEVR-478 Monoscopic far field improvements Shader changes are now gated behind the read only cvar vr.MonoscopicFarField. Changing this requires a shader compile. Moved the mono rendering mode to the cvar vr.MonoscopicFarFieldMode. This is writable, so users can enable/disable mono rendering on the fly if the above cvar is enabled. Only write to the alpha channel in the mobile base pass if the object is opaque and MONOSCOPIC_FAR_FIELD is defined. Addressed code review comments. Change 3235397 on 2016/12/14 by Keli.Hlodversson [Oculus] Only enable GearVR platform on Windows if Oculus service is running Original author: Loren.McQuade Change 3235762 on 2016/12/14 by Keli.Hlodversson Add explicit parentheses to placate the build bots. Change 3242318 on 2016/12/21 by Ryan.Vance Working around pixel density crash. Change 3242522 on 2016/12/21 by Ryan.Vance Missing flag clear so our adaptive test was always returning true. Change 3243173 on 2016/12/22 by Ryan.Vance Integrating post present callback implementation from 4.14.1 Change 3248633 on 2017/01/05 by Keli.Hlodversson Copying //Tasks/UE4/Dev-VR-Refactoring to Dev-VR-Minimal (//UE4/Dev-VR-Minimal) Change 3248723 on 2017/01/05 by Keli.Hlodversson Fix after merge. EnablePositionalTracking no longer exists. Change 3249484 on 2017/01/06 by Keli.Hlodversson Add missing includes Change 3249714 on 2017/01/06 by Keli.Hlodversson Remove monolithic header include Change 3249980 on 2017/01/06 by Keli.Hlodversson SteamVR: Remove leftover unused WindowMirrorMode member variable Change 3252432 on 2017/01/10 by Keli.Hlodversson Submitting change by Loren McQuade to fix monolithic builds. Unshelved from pending changelist '3251436': Change 3257373 on 2017/01/13 by Keli.Hlodversson #jira UEVR-411: Finish renaming/removing/remodelling the remaining Oculus (Rift+GearVR) commands #jira UEVR-412: Rename and merge remaining Morpheus console commands #jira UEVR-417: Remove Exec from IHeadMountedDisplay Change 3269971 on 2017/01/24 by Jeff.Fisher UEVR-498 move controller is missing world to meters UEVR-522 PS4 motion controller worldscale support. -Passing world to meters scale into getControllerOrientationAndPosition because the thing asking about it ought to be part of a world, and know what it should be. This also avoids making PS4 motion controllers dependent on the HMD. Note Google VR Controller doesn't do position, so doesnt' care about scale. Oculus already had internal threadsafe tracking of world scale, so I left that. Steam handles world scale below our input level. -Also adding PlayerIndex member to FSceneView so we can figure out which view the MotionControllerComponent should get its worldscale from for the late render thread update. #jira UEVR-498 #review-3384107 Change 3288308 on 2017/02/06 by Jeff.Fisher UEVR-517 Detect MotionController Connectivity -PS4 can only track 2 controllers and 1 hmd. Support for dealing with that is needed. -Also need to support multiple motion controller components mapped to a single controller. Licencees have done that before. -Created a new interface IMotionTrackingSystemManagement, and implements it for PS4Tracker on PS4. -Created a MotionTrackedDeviceFunctionLibrary to expose that interface to blueprint. -With those one can enable and disable tracking on ps4 controllers and query their state to stay within the controller tracking limit. -PS4Tracker also keeps a blackboard of the enable/disable state so that one can enable or disable controllers that have not been connected yet, and have them enable tracking or not when they are connected. -DS4 controller no longer jumps back to 000 if it loses tracking. #review-3384107 #jira UEVR-517 Change 3288309 on 2017/02/06 by Keli.Hlodversson Add file missing from CL#3257373. Change 3288311 on 2017/02/06 by Jeff.Fisher UEVR-517 Detect MotionController Connectivity - Test content. -tm-motionControllers has a third mode where all playstation motion controllers for player 0 are availalbe. You can toggle them to track or not with ctrl-P,G,L,R for pad, gun, leftmove, rightmove or with alt-P,G,L,R. Ctrl tests doing so via MotionControllerComponent. Alt tests doing so by player index and controller type enum. -ctrl-A disables tracking of all controllers -alt-A disables tracking of all controllers for player 0 -ctrl-D toggles enabling new controllers by default -Also fixed one button not working in one of the other test modes for the Aim (gun) controller. -The controller 'models' have an arrow out the front. It is black if disabled. Red if enabled, but no tracker is active, yellow if tracked but inertial only, and green if fully tracked by the camera. -This logic is in the QA_MoCoAll blueprint. Change 3291601 on 2017/02/07 by Jeff.Fisher UEVR-536 PSVR motion controller tracking problem with multiple controllers -Previous code called GetRelativeTransform from the render thread, but the game thread could update it at any time. This caches that transform so that it can be safely used in the render thread. #jira UEVR-536 #review-3384107 @Ryan.Vance Change 3292460 on 2017/02/08 by Jeff.Fisher PS4 sceVrTrackerGetResult() error warning logging improved, and explanatory comment added. Change 3308771 on 2017/02/17 by Keli.Hlodversson Rename GoogleVR console commands #jira UEVR-412 Change 3309156 on 2017/02/17 by Keli.Hlodversson Track changes in r.ScreenPercentage on GoogleVR and set RenderTargetSize accordingly. Change 3311999 on 2017/02/20 by Keli.Hlodversson Create a default implementation for RecordAnalytics. Also create an initial stub for FHeadMountedDisplayBase for future default implementations of common HMD functionality. Make implementing IHeadMountedDisplay::GetDeviceName mandatory instead of defaulting to "Unknown" #jira UE-21878 #jira UEVR-213 Change 3313467 on 2017/02/20 by Ryan.Vance #jira UE-41604 3278583 pCustomPresent->AllocateRenderTargetTexture may return false, if we blindly return true we can end up with an invalid render target since the fall back sceneviewport will be skipped. 3278536 Adding ovrError_NoHmd to our sanity check in OnStartGameFrame. Change 3314002 on 2017/02/21 by Keli.Hlodversson Fix compilation on PS4 and Linux Change 3326722 on 2017/03/01 by Jeff.Fisher Merging //UE4/Dev-Main to Dev-VR (//UE4/Dev-VR) Integrating 4.15 from main. Change 3327567 on 2017/03/01 by Jeff.Fisher UEVR-588 Oculus crash on "stereo on" when the proximity sensor is not triggered. Duplicating from Release-4.15 cl 3327481, 3327542 -Don't ovr_SubmitFrame when the layers need to be recreated. They stay dirty until rendering is unpaused. #jira UEVR-588 #review-3384107 Change 3328098 on 2017/03/01 by Jeff.Fisher 4.15 merge fixes -Fixed deprecated enum name function usage. -Fixed world scale usage in GoogleVRController. -Fixed compile break in PS4Tracker. Change 3328271 on 2017/03/01 by Jeff.Fisher 2.15 merge -restroging GoogleVRController::GetWorldToMetersScale... cause it is used everywhere. Change 3328307 on 2017/03/01 by Jeff.Fisher 4.15 merge -More googlevr worldscale fixes. Change 3328312 on 2017/03/01 by Jeff.Fisher 4.15 merge -removing 2 unused includes Change 3330610 on 2017/03/02 by Jeff.Fisher 4.15 merge -fixing linux build Change 3333952 on 2017/03/06 by Keli.Hlodversson Implement common stereo layer management base class and use it in SteamVR and PS4. Fixes an outstanding bug in SteamVR where texures are updated every frame regardles of whether the continous update flag is set or not. #jira UEVR-628 #jira UE-42555 Change 3334961 on 2017/03/07 by Keli.Hlodversson Add missing include to fix non-unity builds Change 3336200 on 2017/03/07 by Keli.Hlodversson Fix compilation issues. (https://ec-01.epicgames.net/commander/link/jobDetails/jobs/7568252?jobName=UE4+Dev-VR+-+CL+3334961+-+Nightly+Build&s=Jobs) * Pre VS2015 compilers don't like mixing wide and unmarked strings in concatenation. Unfortunately LOCTEXT hides the call to the TEXT macro, completely hinding the prefix (which only gets added to the first fragment.) * Switch apparently doesn't know how to format a size_t for analytics either. Also: Typo in backwards compatibility command name alias Change 3337347 on 2017/03/08 by Jeff.Fisher UE-42631 Stereo off while prox sensor uncovered causes low framerate -Setting maxfps appropriately on 'stereo on/off'. #review-3384107 #jira UE-42631 Change 3338385 on 2017/03/08 by Ryan.Vance r.DisableDistortion was only being used for the mobile renderer Change 3342301 on 2017/03/10 by patrickr.donovan Test updates to TM-VRSmoke. Increased lightmap resolution on QA_MeshTypes meshes to improve readbility and reliablility of tests involving said asset. Rebuilt lighting. Change 3348133 on 2017/03/15 by Ryan.Vance Moving mono cvars to scene rendering to avoid cross module references. There's not a good reason to have them in the hmd module anyway. Change 3348836 on 2017/03/15 by Ryan.Vance Direct multi-view support for gear vr Monoscopic far field with multi-view (blit and direct) support for gear vr Support for translucent objects on both sides of the mono clip plane (due to a sorting issue, objects that straddle the plane composite incorrectly) Fixed missing discards/clears in the multi-view blit Change 3348843 on 2017/03/15 by Ryan.Vance Fixing color/depth target size mismatch when screen percentage scaling results in a size that isn't divisible by 16. Change 3349276 on 2017/03/16 by Keli.Hlodversson Fixing compile errors in GoogleVR after merge from main. Change 3350932 on 2017/03/16 by Ryan.Vance Re-enabling the gearvr plugin on windows. Change 3351977 on 2017/03/17 by Jeff.Fisher Fixing masked member variable. Change 3352314 on 2017/03/17 by Ryan.Vance We need to ensure that we don't select different lod levels for each eye. Change 3352993 on 2017/03/17 by Nick.Whiting Integrating CL 3345824 from Android-DevVR to Dev-VR. Support for device depth pass in SceneCaptureComponent2D Change 3355185 on 2017/03/20 by Nick.Whiting Added ability to disable the autoloading splash screen, which would prevent the hide splash screen node from ever working Change 3355676 on 2017/03/20 by Nick.Whiting PR #3384: [GNUX] SteamVR, OpenGL patch. (Contributed by yaakuro), with some minor modifications Change 3357286 on 2017/03/21 by Jeff.Fisher Fixing GenerateProjectFiles, looks like the .config. was removed from these references in main some time ago. Change 3357435 on 2017/03/21 by Jeff.Fisher Fixing editor build break, looks like a merge mistake. Change 3359960 on 2017/03/23 by Keli.Hlodversson Prevent potential crash when drawing tracking sensor location. Also only fetch HMD location once instead of once per tracking sensor. Change 3361230 on 2017/03/23 by Jeff.Fisher Fixing linux build opengl include problem... maybe. Change 3361638 on 2017/03/23 by Jeff.Fisher Another guess at fixing linux build. Change 3364224 on 2017/03/24 by Keli.Hlodversson Initial implementation of UEVR-576 - Base emulated layer implementation #jira UEVR-668 - Base emulated layer implementation: Initial framework for overrideable default implementation #jira UEVR-669 - Base emulated layer implementation: Face Locked Layers Support #jira UEVR-670 - Base emulated layer implementation: Tracker Locked Layers Support #jira UEVR-671 - Base emulated layer implementation: World Locked Layers Support #jira UEVR-672 - Base emulated layer implementation: Add support for optionally rendering face locked layers into a separate layer Change 3364242 on 2017/03/24 by Keli.Hlodversson SteamVR layers do not support negatve Layer priorities Change 3364263 on 2017/03/24 by Jeff.Fisher Merging //UE4/Dev-Main to Dev-VR (//UE4/Dev-VR) Monoscopicfarfieldrendering was just 'accept source', Ryan is going to look at fixing it up. Change 3364472 on 2017/03/24 by Jeff.Fisher Merge fix Change 3364475 on 2017/03/24 by Jeff.Fisher Fixing gearvr include. Change 3364486 on 2017/03/24 by Jeff.Fisher merge fix Change 3364532 on 2017/03/24 by Ryan.Vance pso update for mono rendering and stereo layers. Change 3364599 on 2017/03/24 by Ryan.Vance Oculus changes for SI1.12 Change 3365159 on 2017/03/26 by Jeff.Fisher include fix Change 3365182 on 2017/03/26 by Jeff.Fisher include fix Change 3366087 on 2017/03/27 by Ryan.Vance Remaining files from Oculus changes for SI1.12 merge request. Fixing a bug in OnlineSubsystem. Temporarily changing the eye padding change to be a shader clear to work around a clear color binding issue. Change 3366492 on 2017/03/27 by Ryan.Vance #jira UE-43294 Moved the clear before we setup state for drawing the mirror window content. It was stomping over state after the pso changes. Going to leave the shader clear in the rift prerender for clearing the eye padding for now. Change 3366929 on 2017/03/27 by Ryan.Vance Fixing compile error Change 3368549 on 2017/03/28 by Jeff.Fisher Merging Change: 3357998 from //UE4/Partner-Google-VR/Engine/... to Dev-VR Upgrade Google VR Plugin to v1.3: *Upgraded GVR NDK to 1.30.0 *Changed some BlueprintFunction to use BlueprintPure *Add the missing bDaydream flag in UEDeployAndroid.cs #review-3384107 Change 3368975 on 2017/03/28 by Ryan.Vance CIS clean up #jira UE-43428, UE-43429, UE-43426, UE-43427 Change 3369028 on 2017/03/28 by Ryan.Vance This is not exacly 'correct', but it's at least what the code was trying to do. Change 3370203 on 2017/03/29 by Ryan.Vance Adding gear vr controller component support. Change 3370918 on 2017/03/29 by Ryan.Vance Merging 3370569 using Partner-Google-VR_to_DevVR Change 3371030 on 2017/03/29 by Ryan.Vance Fixing linux build errors #jira UE-43426 Change 3371036 on 2017/03/29 by Ryan.Vance Oculus 4.16 integration. Not terribly happy with the use of std::string. They promised to clean this up for the next release. Change 3373495 on 2017/03/30 by Jeff.Fisher Merging from Dev-Main, in preparation for 4.16 Change 3373578 on 2017/03/30 by Jeff.Fisher build break, one comma short Change 3373870 on 2017/03/31 by Jeff.Fisher Include order fix. Change 3374001 on 2017/03/31 by Keli.Hlodversson Use DefaultStereoLayers as base for Morpheus implementation. #jira UEVR-709 #jira UE-42919 #rb: Jeff.Fisher Change 3374004 on 2017/03/31 by Keli.Hlodversson Fix rendering for the default Stereo Layers implementation on mobile. Depth test was set to "Never" instead of "Always" Destination texture on GLES is flipped on the Y axis, the coordinates are reversed in the shade when compiled on the relevant platforms. Change 3375125 on 2017/03/31 by Jeff.Fisher UE-43506 Ensure using VRPreview with GoogleVR -Removed the ensure, there is code in there to handle that case, and it works. #jira UE-43506 Change 3375294 on 2017/03/31 by nick.bullard Resaving Plugin content to resovle "saved with empty engine version" #jira UE-43537 Change 3375480 on 2017/03/31 by Jeff.Fisher UEVR-9 PSVR: Social Screen Support -Experimental social screen support for 4.16. -This does the basics of driving output through the Aux port in the proper format for display on the mirror monitor. -Only supports 30fps on the mirror monitor. 60fps will require the implementation of sony system dialogs to deal with incompatable system features (video streaming, remote play). -There is a project setting in Morpheus, under experiemental bEnableSocialScreenSeparateMode. This must be set to true to use this feature. When it is false we avoid allocating the back buffers. -MorpheusFunctionLibrary blueprints now have a node "SetSocialScreenMode" which can switch between SystemMirror (hardware supported mirroring), SeparateTest (alternates black and white), SeparateTexture (displays a texture, eg a render target, specified via blueprint), and SeparateMirror(puts the hmd render buffer on screen - which is both eyes, like a debug mode). -Also finally updated the bEnabled flag in project settings to tell people it's only for PC. #jira UEVR-9 #review-3384107 Change 3375540 on 2017/03/31 by Ryan.Vance #jira UE-43504 Fixing android build break when using a 64 bit isa. Change 3375655 on 2017/03/31 by Jeff.Fisher Fixing missing RGBAToYUV shader problem -This at least unblocks our process. Will revisit before zbr. Change 3375820 on 2017/04/01 by Jeff.Fisher Fixing linux build warning about HAS_MORPHEUS Change 3376050 on 2017/04/02 by Jeff.Fisher UE-43515 Step 'UE4Editor Static Analysis Win64' - Module.OnlineSubsystemOculus.cpp Warnings -Temporary fix for static analysis annotation warnings in OnlineSubsytemOculus. Longer term plan is to eliminate the use of the headers that trigger the warnings. -Just wrap all standard headers in static analysis disables. #jira UE-43515 Change 3376609 on 2017/04/03 by Jeff.Fisher Fixing rgbatoyuvshader include. Change 3377001 on 2017/04/03 by Jeff.Fisher UE-43547 Launch On PS4 fails during Run command - Missing global shader FRGBAToYUV420CS - shader c++ must be compiled so that it can be cooked for ps4. #jira UE-43547 Change 3379858 on 2017/04/04 by Jeff.Fisher Merging //UE4/Dev-Main to Dev-VR (//UE4/Dev-VR) pulling main this should get us ps4 sdk 4.508 Change 3379938 on 2017/04/04 by Ryan.Vance #jira UE-43548 If stereo layers are not being used, don't setup overlay targets as we will never clear/initialize them. The clear happens as part of the default layers PostRenderView_RenderThread call which wont be called if layers aren't being used in the scene. Change 3381519 on 2017/04/05 by Jeff.Fisher UEVR-733 PS4 sdk 4.500 hmd connection api changes break hmd connect. -Handling failure of sceHmdGetDeviceInformation if the hmd is powered off. It now returns an error code about an invalid handle in that case, rather than reporting unready. We just treat the error code like an unready status. #jira UEVR-733 #review-3384107 Change 3382019 on 2017/04/05 by Ryan.Vance Linux: add Vulkan support from dev editor: 3381593 Change 3382021 on 2017/04/05 by Ryan.Vance SteamVR on Linux using Vulkan OpenVR rev to 1_0_6 PR #3412: [GNUX] Initial support for SteamVR using Vulkan on GNUX platform. (Contributed by yaakuro) Change 3382076 on 2017/04/05 by Ryan.Vance Fixing linux steamvr lib path. It changed to something less silly in 1.0.6 Removing the steamvr plugin from the white list for linux. It's looking for a runtime that no one will have installed. Change 3383237 on 2017/04/06 by Ryan.Vance #jira UE-43732 Fixing Android compile issues. We can't wrap portions of a macro with a definie. This should probably be some sort of recursive macro thing since there's so much overlap. Good enough for now. Change 3383353 on 2017/04/06 by Ryan.Vance Fixing include cycles. Change 3383509 on 2017/04/06 by Jeff.Fisher Merging //UE4/Dev-Main to Dev-VR (//UE4/Dev-VR) merging the stuff from dev-mobile [CL 3384106 by Ryan Vance in Main branch]
2017-04-06 22:03:51 -04:00
}
}
// Set shader uniforms
VertexShader->SetParameters(
RHICmdList,
QuadSize,
Layer.UVRect,
RenderParams.RenderMatrices[static_cast<int>(Layer.PositionType)],
LayerMatrix);
PixelShader->SetParameters(
RHICmdList,
TStaticSamplerState<SF_Trilinear>::GetRHI(),
Layer.Texture);
const FIntPoint TargetSize = RenderParams.Viewport.Size();
// Draw primitive
RendererModule.DrawRectangle(
RHICmdList,
0.0f, 0.0f,
TargetSize.X, TargetSize.Y,
0.0f, 0.0f,
1.0f, 1.0f,
TargetSize,
FIntPoint(1, 1),
VertexShader
Copying //UE4/Dev-VR to //UE4/Dev-Main (Source: //UE4/Dev-VR @ 3383750) #lockdown Nick.Penwarden ========================== MAJOR FEATURES + CHANGES ========================== Change 3012064 on 2016/06/13 by Nick.Whiting Merging Main -> DevVR Change 3048060 on 2016/07/13 by Nick.Whiting Integrating CL 3045721 from //depot/Partners/Google/AndroidVR-DevVR Upgrade Android and iOS GVR SDK to the latest. Fix the flipped vignette issue when using Unreal's post processing distortion. Change the Daydream & Cardboard mode to use scanline racing. Deprecate the ability to turn off individual UI elements. Change 3235307 on 2016/12/14 by Keli.Hlodversson Filter out excluded HMD modules during FEngineLoop:PreInitHMDDevice. The final selection still happens in UEngine::InitializeHMDDevice as all HMD plugins have not been loaded during PreInit Change 3235308 on 2016/12/14 by Ryan.Vance #jira UEVR-478 Monoscopic far field improvements Shader changes are now gated behind the read only cvar vr.MonoscopicFarField. Changing this requires a shader compile. Moved the mono rendering mode to the cvar vr.MonoscopicFarFieldMode. This is writable, so users can enable/disable mono rendering on the fly if the above cvar is enabled. Only write to the alpha channel in the mobile base pass if the object is opaque and MONOSCOPIC_FAR_FIELD is defined. Addressed code review comments. Change 3235397 on 2016/12/14 by Keli.Hlodversson [Oculus] Only enable GearVR platform on Windows if Oculus service is running Original author: Loren.McQuade Change 3235762 on 2016/12/14 by Keli.Hlodversson Add explicit parentheses to placate the build bots. Change 3242318 on 2016/12/21 by Ryan.Vance Working around pixel density crash. Change 3242522 on 2016/12/21 by Ryan.Vance Missing flag clear so our adaptive test was always returning true. Change 3243173 on 2016/12/22 by Ryan.Vance Integrating post present callback implementation from 4.14.1 Change 3248633 on 2017/01/05 by Keli.Hlodversson Copying //Tasks/UE4/Dev-VR-Refactoring to Dev-VR-Minimal (//UE4/Dev-VR-Minimal) Change 3248723 on 2017/01/05 by Keli.Hlodversson Fix after merge. EnablePositionalTracking no longer exists. Change 3249484 on 2017/01/06 by Keli.Hlodversson Add missing includes Change 3249714 on 2017/01/06 by Keli.Hlodversson Remove monolithic header include Change 3249980 on 2017/01/06 by Keli.Hlodversson SteamVR: Remove leftover unused WindowMirrorMode member variable Change 3252432 on 2017/01/10 by Keli.Hlodversson Submitting change by Loren McQuade to fix monolithic builds. Unshelved from pending changelist '3251436': Change 3257373 on 2017/01/13 by Keli.Hlodversson #jira UEVR-411: Finish renaming/removing/remodelling the remaining Oculus (Rift+GearVR) commands #jira UEVR-412: Rename and merge remaining Morpheus console commands #jira UEVR-417: Remove Exec from IHeadMountedDisplay Change 3269971 on 2017/01/24 by Jeff.Fisher UEVR-498 move controller is missing world to meters UEVR-522 PS4 motion controller worldscale support. -Passing world to meters scale into getControllerOrientationAndPosition because the thing asking about it ought to be part of a world, and know what it should be. This also avoids making PS4 motion controllers dependent on the HMD. Note Google VR Controller doesn't do position, so doesnt' care about scale. Oculus already had internal threadsafe tracking of world scale, so I left that. Steam handles world scale below our input level. -Also adding PlayerIndex member to FSceneView so we can figure out which view the MotionControllerComponent should get its worldscale from for the late render thread update. #jira UEVR-498 #review-3384107 Change 3288308 on 2017/02/06 by Jeff.Fisher UEVR-517 Detect MotionController Connectivity -PS4 can only track 2 controllers and 1 hmd. Support for dealing with that is needed. -Also need to support multiple motion controller components mapped to a single controller. Licencees have done that before. -Created a new interface IMotionTrackingSystemManagement, and implements it for PS4Tracker on PS4. -Created a MotionTrackedDeviceFunctionLibrary to expose that interface to blueprint. -With those one can enable and disable tracking on ps4 controllers and query their state to stay within the controller tracking limit. -PS4Tracker also keeps a blackboard of the enable/disable state so that one can enable or disable controllers that have not been connected yet, and have them enable tracking or not when they are connected. -DS4 controller no longer jumps back to 000 if it loses tracking. #review-3384107 #jira UEVR-517 Change 3288309 on 2017/02/06 by Keli.Hlodversson Add file missing from CL#3257373. Change 3288311 on 2017/02/06 by Jeff.Fisher UEVR-517 Detect MotionController Connectivity - Test content. -tm-motionControllers has a third mode where all playstation motion controllers for player 0 are availalbe. You can toggle them to track or not with ctrl-P,G,L,R for pad, gun, leftmove, rightmove or with alt-P,G,L,R. Ctrl tests doing so via MotionControllerComponent. Alt tests doing so by player index and controller type enum. -ctrl-A disables tracking of all controllers -alt-A disables tracking of all controllers for player 0 -ctrl-D toggles enabling new controllers by default -Also fixed one button not working in one of the other test modes for the Aim (gun) controller. -The controller 'models' have an arrow out the front. It is black if disabled. Red if enabled, but no tracker is active, yellow if tracked but inertial only, and green if fully tracked by the camera. -This logic is in the QA_MoCoAll blueprint. Change 3291601 on 2017/02/07 by Jeff.Fisher UEVR-536 PSVR motion controller tracking problem with multiple controllers -Previous code called GetRelativeTransform from the render thread, but the game thread could update it at any time. This caches that transform so that it can be safely used in the render thread. #jira UEVR-536 #review-3384107 @Ryan.Vance Change 3292460 on 2017/02/08 by Jeff.Fisher PS4 sceVrTrackerGetResult() error warning logging improved, and explanatory comment added. Change 3308771 on 2017/02/17 by Keli.Hlodversson Rename GoogleVR console commands #jira UEVR-412 Change 3309156 on 2017/02/17 by Keli.Hlodversson Track changes in r.ScreenPercentage on GoogleVR and set RenderTargetSize accordingly. Change 3311999 on 2017/02/20 by Keli.Hlodversson Create a default implementation for RecordAnalytics. Also create an initial stub for FHeadMountedDisplayBase for future default implementations of common HMD functionality. Make implementing IHeadMountedDisplay::GetDeviceName mandatory instead of defaulting to "Unknown" #jira UE-21878 #jira UEVR-213 Change 3313467 on 2017/02/20 by Ryan.Vance #jira UE-41604 3278583 pCustomPresent->AllocateRenderTargetTexture may return false, if we blindly return true we can end up with an invalid render target since the fall back sceneviewport will be skipped. 3278536 Adding ovrError_NoHmd to our sanity check in OnStartGameFrame. Change 3314002 on 2017/02/21 by Keli.Hlodversson Fix compilation on PS4 and Linux Change 3326722 on 2017/03/01 by Jeff.Fisher Merging //UE4/Dev-Main to Dev-VR (//UE4/Dev-VR) Integrating 4.15 from main. Change 3327567 on 2017/03/01 by Jeff.Fisher UEVR-588 Oculus crash on "stereo on" when the proximity sensor is not triggered. Duplicating from Release-4.15 cl 3327481, 3327542 -Don't ovr_SubmitFrame when the layers need to be recreated. They stay dirty until rendering is unpaused. #jira UEVR-588 #review-3384107 Change 3328098 on 2017/03/01 by Jeff.Fisher 4.15 merge fixes -Fixed deprecated enum name function usage. -Fixed world scale usage in GoogleVRController. -Fixed compile break in PS4Tracker. Change 3328271 on 2017/03/01 by Jeff.Fisher 2.15 merge -restroging GoogleVRController::GetWorldToMetersScale... cause it is used everywhere. Change 3328307 on 2017/03/01 by Jeff.Fisher 4.15 merge -More googlevr worldscale fixes. Change 3328312 on 2017/03/01 by Jeff.Fisher 4.15 merge -removing 2 unused includes Change 3330610 on 2017/03/02 by Jeff.Fisher 4.15 merge -fixing linux build Change 3333952 on 2017/03/06 by Keli.Hlodversson Implement common stereo layer management base class and use it in SteamVR and PS4. Fixes an outstanding bug in SteamVR where texures are updated every frame regardles of whether the continous update flag is set or not. #jira UEVR-628 #jira UE-42555 Change 3334961 on 2017/03/07 by Keli.Hlodversson Add missing include to fix non-unity builds Change 3336200 on 2017/03/07 by Keli.Hlodversson Fix compilation issues. (https://ec-01.epicgames.net/commander/link/jobDetails/jobs/7568252?jobName=UE4+Dev-VR+-+CL+3334961+-+Nightly+Build&s=Jobs) * Pre VS2015 compilers don't like mixing wide and unmarked strings in concatenation. Unfortunately LOCTEXT hides the call to the TEXT macro, completely hinding the prefix (which only gets added to the first fragment.) * Switch apparently doesn't know how to format a size_t for analytics either. Also: Typo in backwards compatibility command name alias Change 3337347 on 2017/03/08 by Jeff.Fisher UE-42631 Stereo off while prox sensor uncovered causes low framerate -Setting maxfps appropriately on 'stereo on/off'. #review-3384107 #jira UE-42631 Change 3338385 on 2017/03/08 by Ryan.Vance r.DisableDistortion was only being used for the mobile renderer Change 3342301 on 2017/03/10 by patrickr.donovan Test updates to TM-VRSmoke. Increased lightmap resolution on QA_MeshTypes meshes to improve readbility and reliablility of tests involving said asset. Rebuilt lighting. Change 3348133 on 2017/03/15 by Ryan.Vance Moving mono cvars to scene rendering to avoid cross module references. There's not a good reason to have them in the hmd module anyway. Change 3348836 on 2017/03/15 by Ryan.Vance Direct multi-view support for gear vr Monoscopic far field with multi-view (blit and direct) support for gear vr Support for translucent objects on both sides of the mono clip plane (due to a sorting issue, objects that straddle the plane composite incorrectly) Fixed missing discards/clears in the multi-view blit Change 3348843 on 2017/03/15 by Ryan.Vance Fixing color/depth target size mismatch when screen percentage scaling results in a size that isn't divisible by 16. Change 3349276 on 2017/03/16 by Keli.Hlodversson Fixing compile errors in GoogleVR after merge from main. Change 3350932 on 2017/03/16 by Ryan.Vance Re-enabling the gearvr plugin on windows. Change 3351977 on 2017/03/17 by Jeff.Fisher Fixing masked member variable. Change 3352314 on 2017/03/17 by Ryan.Vance We need to ensure that we don't select different lod levels for each eye. Change 3352993 on 2017/03/17 by Nick.Whiting Integrating CL 3345824 from Android-DevVR to Dev-VR. Support for device depth pass in SceneCaptureComponent2D Change 3355185 on 2017/03/20 by Nick.Whiting Added ability to disable the autoloading splash screen, which would prevent the hide splash screen node from ever working Change 3355676 on 2017/03/20 by Nick.Whiting PR #3384: [GNUX] SteamVR, OpenGL patch. (Contributed by yaakuro), with some minor modifications Change 3357286 on 2017/03/21 by Jeff.Fisher Fixing GenerateProjectFiles, looks like the .config. was removed from these references in main some time ago. Change 3357435 on 2017/03/21 by Jeff.Fisher Fixing editor build break, looks like a merge mistake. Change 3359960 on 2017/03/23 by Keli.Hlodversson Prevent potential crash when drawing tracking sensor location. Also only fetch HMD location once instead of once per tracking sensor. Change 3361230 on 2017/03/23 by Jeff.Fisher Fixing linux build opengl include problem... maybe. Change 3361638 on 2017/03/23 by Jeff.Fisher Another guess at fixing linux build. Change 3364224 on 2017/03/24 by Keli.Hlodversson Initial implementation of UEVR-576 - Base emulated layer implementation #jira UEVR-668 - Base emulated layer implementation: Initial framework for overrideable default implementation #jira UEVR-669 - Base emulated layer implementation: Face Locked Layers Support #jira UEVR-670 - Base emulated layer implementation: Tracker Locked Layers Support #jira UEVR-671 - Base emulated layer implementation: World Locked Layers Support #jira UEVR-672 - Base emulated layer implementation: Add support for optionally rendering face locked layers into a separate layer Change 3364242 on 2017/03/24 by Keli.Hlodversson SteamVR layers do not support negatve Layer priorities Change 3364263 on 2017/03/24 by Jeff.Fisher Merging //UE4/Dev-Main to Dev-VR (//UE4/Dev-VR) Monoscopicfarfieldrendering was just 'accept source', Ryan is going to look at fixing it up. Change 3364472 on 2017/03/24 by Jeff.Fisher Merge fix Change 3364475 on 2017/03/24 by Jeff.Fisher Fixing gearvr include. Change 3364486 on 2017/03/24 by Jeff.Fisher merge fix Change 3364532 on 2017/03/24 by Ryan.Vance pso update for mono rendering and stereo layers. Change 3364599 on 2017/03/24 by Ryan.Vance Oculus changes for SI1.12 Change 3365159 on 2017/03/26 by Jeff.Fisher include fix Change 3365182 on 2017/03/26 by Jeff.Fisher include fix Change 3366087 on 2017/03/27 by Ryan.Vance Remaining files from Oculus changes for SI1.12 merge request. Fixing a bug in OnlineSubsystem. Temporarily changing the eye padding change to be a shader clear to work around a clear color binding issue. Change 3366492 on 2017/03/27 by Ryan.Vance #jira UE-43294 Moved the clear before we setup state for drawing the mirror window content. It was stomping over state after the pso changes. Going to leave the shader clear in the rift prerender for clearing the eye padding for now. Change 3366929 on 2017/03/27 by Ryan.Vance Fixing compile error Change 3368549 on 2017/03/28 by Jeff.Fisher Merging Change: 3357998 from //UE4/Partner-Google-VR/Engine/... to Dev-VR Upgrade Google VR Plugin to v1.3: *Upgraded GVR NDK to 1.30.0 *Changed some BlueprintFunction to use BlueprintPure *Add the missing bDaydream flag in UEDeployAndroid.cs #review-3384107 Change 3368975 on 2017/03/28 by Ryan.Vance CIS clean up #jira UE-43428, UE-43429, UE-43426, UE-43427 Change 3369028 on 2017/03/28 by Ryan.Vance This is not exacly 'correct', but it's at least what the code was trying to do. Change 3370203 on 2017/03/29 by Ryan.Vance Adding gear vr controller component support. Change 3370918 on 2017/03/29 by Ryan.Vance Merging 3370569 using Partner-Google-VR_to_DevVR Change 3371030 on 2017/03/29 by Ryan.Vance Fixing linux build errors #jira UE-43426 Change 3371036 on 2017/03/29 by Ryan.Vance Oculus 4.16 integration. Not terribly happy with the use of std::string. They promised to clean this up for the next release. Change 3373495 on 2017/03/30 by Jeff.Fisher Merging from Dev-Main, in preparation for 4.16 Change 3373578 on 2017/03/30 by Jeff.Fisher build break, one comma short Change 3373870 on 2017/03/31 by Jeff.Fisher Include order fix. Change 3374001 on 2017/03/31 by Keli.Hlodversson Use DefaultStereoLayers as base for Morpheus implementation. #jira UEVR-709 #jira UE-42919 #rb: Jeff.Fisher Change 3374004 on 2017/03/31 by Keli.Hlodversson Fix rendering for the default Stereo Layers implementation on mobile. Depth test was set to "Never" instead of "Always" Destination texture on GLES is flipped on the Y axis, the coordinates are reversed in the shade when compiled on the relevant platforms. Change 3375125 on 2017/03/31 by Jeff.Fisher UE-43506 Ensure using VRPreview with GoogleVR -Removed the ensure, there is code in there to handle that case, and it works. #jira UE-43506 Change 3375294 on 2017/03/31 by nick.bullard Resaving Plugin content to resovle "saved with empty engine version" #jira UE-43537 Change 3375480 on 2017/03/31 by Jeff.Fisher UEVR-9 PSVR: Social Screen Support -Experimental social screen support for 4.16. -This does the basics of driving output through the Aux port in the proper format for display on the mirror monitor. -Only supports 30fps on the mirror monitor. 60fps will require the implementation of sony system dialogs to deal with incompatable system features (video streaming, remote play). -There is a project setting in Morpheus, under experiemental bEnableSocialScreenSeparateMode. This must be set to true to use this feature. When it is false we avoid allocating the back buffers. -MorpheusFunctionLibrary blueprints now have a node "SetSocialScreenMode" which can switch between SystemMirror (hardware supported mirroring), SeparateTest (alternates black and white), SeparateTexture (displays a texture, eg a render target, specified via blueprint), and SeparateMirror(puts the hmd render buffer on screen - which is both eyes, like a debug mode). -Also finally updated the bEnabled flag in project settings to tell people it's only for PC. #jira UEVR-9 #review-3384107 Change 3375540 on 2017/03/31 by Ryan.Vance #jira UE-43504 Fixing android build break when using a 64 bit isa. Change 3375655 on 2017/03/31 by Jeff.Fisher Fixing missing RGBAToYUV shader problem -This at least unblocks our process. Will revisit before zbr. Change 3375820 on 2017/04/01 by Jeff.Fisher Fixing linux build warning about HAS_MORPHEUS Change 3376050 on 2017/04/02 by Jeff.Fisher UE-43515 Step 'UE4Editor Static Analysis Win64' - Module.OnlineSubsystemOculus.cpp Warnings -Temporary fix for static analysis annotation warnings in OnlineSubsytemOculus. Longer term plan is to eliminate the use of the headers that trigger the warnings. -Just wrap all standard headers in static analysis disables. #jira UE-43515 Change 3376609 on 2017/04/03 by Jeff.Fisher Fixing rgbatoyuvshader include. Change 3377001 on 2017/04/03 by Jeff.Fisher UE-43547 Launch On PS4 fails during Run command - Missing global shader FRGBAToYUV420CS - shader c++ must be compiled so that it can be cooked for ps4. #jira UE-43547 Change 3379858 on 2017/04/04 by Jeff.Fisher Merging //UE4/Dev-Main to Dev-VR (//UE4/Dev-VR) pulling main this should get us ps4 sdk 4.508 Change 3379938 on 2017/04/04 by Ryan.Vance #jira UE-43548 If stereo layers are not being used, don't setup overlay targets as we will never clear/initialize them. The clear happens as part of the default layers PostRenderView_RenderThread call which wont be called if layers aren't being used in the scene. Change 3381519 on 2017/04/05 by Jeff.Fisher UEVR-733 PS4 sdk 4.500 hmd connection api changes break hmd connect. -Handling failure of sceHmdGetDeviceInformation if the hmd is powered off. It now returns an error code about an invalid handle in that case, rather than reporting unready. We just treat the error code like an unready status. #jira UEVR-733 #review-3384107 Change 3382019 on 2017/04/05 by Ryan.Vance Linux: add Vulkan support from dev editor: 3381593 Change 3382021 on 2017/04/05 by Ryan.Vance SteamVR on Linux using Vulkan OpenVR rev to 1_0_6 PR #3412: [GNUX] Initial support for SteamVR using Vulkan on GNUX platform. (Contributed by yaakuro) Change 3382076 on 2017/04/05 by Ryan.Vance Fixing linux steamvr lib path. It changed to something less silly in 1.0.6 Removing the steamvr plugin from the white list for linux. It's looking for a runtime that no one will have installed. Change 3383237 on 2017/04/06 by Ryan.Vance #jira UE-43732 Fixing Android compile issues. We can't wrap portions of a macro with a definie. This should probably be some sort of recursive macro thing since there's so much overlap. Good enough for now. Change 3383353 on 2017/04/06 by Ryan.Vance Fixing include cycles. Change 3383509 on 2017/04/06 by Jeff.Fisher Merging //UE4/Dev-Main to Dev-VR (//UE4/Dev-VR) merging the stuff from dev-mobile [CL 3384106 by Ryan Vance in Main branch]
2017-04-06 22:03:51 -04:00
);
}
}
void FDefaultStereoLayers::PreRenderViewFamily_RenderThread(FRHICommandListImmediate& RHICmdList, FSceneViewFamily& InViewFamily)
{
check(IsInRenderingThread());
if (!GetStereoLayersDirty())
{
return;
}
CopyLayers(RenderThreadLayers);
// Sort layers
SortedSceneLayers.Reset();
SortedOverlayLayers.Reset();
uint32 LayerCount = RenderThreadLayers.Num();
for (uint32 LayerIndex = 0; LayerIndex < LayerCount; ++LayerIndex)
{
const auto& Layer = RenderThreadLayers[LayerIndex];
if (!Layer.IsVisible())
Copying //UE4/Dev-VR to //UE4/Dev-Main (Source: //UE4/Dev-VR @ 3383750) #lockdown Nick.Penwarden ========================== MAJOR FEATURES + CHANGES ========================== Change 3012064 on 2016/06/13 by Nick.Whiting Merging Main -> DevVR Change 3048060 on 2016/07/13 by Nick.Whiting Integrating CL 3045721 from //depot/Partners/Google/AndroidVR-DevVR Upgrade Android and iOS GVR SDK to the latest. Fix the flipped vignette issue when using Unreal's post processing distortion. Change the Daydream & Cardboard mode to use scanline racing. Deprecate the ability to turn off individual UI elements. Change 3235307 on 2016/12/14 by Keli.Hlodversson Filter out excluded HMD modules during FEngineLoop:PreInitHMDDevice. The final selection still happens in UEngine::InitializeHMDDevice as all HMD plugins have not been loaded during PreInit Change 3235308 on 2016/12/14 by Ryan.Vance #jira UEVR-478 Monoscopic far field improvements Shader changes are now gated behind the read only cvar vr.MonoscopicFarField. Changing this requires a shader compile. Moved the mono rendering mode to the cvar vr.MonoscopicFarFieldMode. This is writable, so users can enable/disable mono rendering on the fly if the above cvar is enabled. Only write to the alpha channel in the mobile base pass if the object is opaque and MONOSCOPIC_FAR_FIELD is defined. Addressed code review comments. Change 3235397 on 2016/12/14 by Keli.Hlodversson [Oculus] Only enable GearVR platform on Windows if Oculus service is running Original author: Loren.McQuade Change 3235762 on 2016/12/14 by Keli.Hlodversson Add explicit parentheses to placate the build bots. Change 3242318 on 2016/12/21 by Ryan.Vance Working around pixel density crash. Change 3242522 on 2016/12/21 by Ryan.Vance Missing flag clear so our adaptive test was always returning true. Change 3243173 on 2016/12/22 by Ryan.Vance Integrating post present callback implementation from 4.14.1 Change 3248633 on 2017/01/05 by Keli.Hlodversson Copying //Tasks/UE4/Dev-VR-Refactoring to Dev-VR-Minimal (//UE4/Dev-VR-Minimal) Change 3248723 on 2017/01/05 by Keli.Hlodversson Fix after merge. EnablePositionalTracking no longer exists. Change 3249484 on 2017/01/06 by Keli.Hlodversson Add missing includes Change 3249714 on 2017/01/06 by Keli.Hlodversson Remove monolithic header include Change 3249980 on 2017/01/06 by Keli.Hlodversson SteamVR: Remove leftover unused WindowMirrorMode member variable Change 3252432 on 2017/01/10 by Keli.Hlodversson Submitting change by Loren McQuade to fix monolithic builds. Unshelved from pending changelist '3251436': Change 3257373 on 2017/01/13 by Keli.Hlodversson #jira UEVR-411: Finish renaming/removing/remodelling the remaining Oculus (Rift+GearVR) commands #jira UEVR-412: Rename and merge remaining Morpheus console commands #jira UEVR-417: Remove Exec from IHeadMountedDisplay Change 3269971 on 2017/01/24 by Jeff.Fisher UEVR-498 move controller is missing world to meters UEVR-522 PS4 motion controller worldscale support. -Passing world to meters scale into getControllerOrientationAndPosition because the thing asking about it ought to be part of a world, and know what it should be. This also avoids making PS4 motion controllers dependent on the HMD. Note Google VR Controller doesn't do position, so doesnt' care about scale. Oculus already had internal threadsafe tracking of world scale, so I left that. Steam handles world scale below our input level. -Also adding PlayerIndex member to FSceneView so we can figure out which view the MotionControllerComponent should get its worldscale from for the late render thread update. #jira UEVR-498 #review-3384107 Change 3288308 on 2017/02/06 by Jeff.Fisher UEVR-517 Detect MotionController Connectivity -PS4 can only track 2 controllers and 1 hmd. Support for dealing with that is needed. -Also need to support multiple motion controller components mapped to a single controller. Licencees have done that before. -Created a new interface IMotionTrackingSystemManagement, and implements it for PS4Tracker on PS4. -Created a MotionTrackedDeviceFunctionLibrary to expose that interface to blueprint. -With those one can enable and disable tracking on ps4 controllers and query their state to stay within the controller tracking limit. -PS4Tracker also keeps a blackboard of the enable/disable state so that one can enable or disable controllers that have not been connected yet, and have them enable tracking or not when they are connected. -DS4 controller no longer jumps back to 000 if it loses tracking. #review-3384107 #jira UEVR-517 Change 3288309 on 2017/02/06 by Keli.Hlodversson Add file missing from CL#3257373. Change 3288311 on 2017/02/06 by Jeff.Fisher UEVR-517 Detect MotionController Connectivity - Test content. -tm-motionControllers has a third mode where all playstation motion controllers for player 0 are availalbe. You can toggle them to track or not with ctrl-P,G,L,R for pad, gun, leftmove, rightmove or with alt-P,G,L,R. Ctrl tests doing so via MotionControllerComponent. Alt tests doing so by player index and controller type enum. -ctrl-A disables tracking of all controllers -alt-A disables tracking of all controllers for player 0 -ctrl-D toggles enabling new controllers by default -Also fixed one button not working in one of the other test modes for the Aim (gun) controller. -The controller 'models' have an arrow out the front. It is black if disabled. Red if enabled, but no tracker is active, yellow if tracked but inertial only, and green if fully tracked by the camera. -This logic is in the QA_MoCoAll blueprint. Change 3291601 on 2017/02/07 by Jeff.Fisher UEVR-536 PSVR motion controller tracking problem with multiple controllers -Previous code called GetRelativeTransform from the render thread, but the game thread could update it at any time. This caches that transform so that it can be safely used in the render thread. #jira UEVR-536 #review-3384107 @Ryan.Vance Change 3292460 on 2017/02/08 by Jeff.Fisher PS4 sceVrTrackerGetResult() error warning logging improved, and explanatory comment added. Change 3308771 on 2017/02/17 by Keli.Hlodversson Rename GoogleVR console commands #jira UEVR-412 Change 3309156 on 2017/02/17 by Keli.Hlodversson Track changes in r.ScreenPercentage on GoogleVR and set RenderTargetSize accordingly. Change 3311999 on 2017/02/20 by Keli.Hlodversson Create a default implementation for RecordAnalytics. Also create an initial stub for FHeadMountedDisplayBase for future default implementations of common HMD functionality. Make implementing IHeadMountedDisplay::GetDeviceName mandatory instead of defaulting to "Unknown" #jira UE-21878 #jira UEVR-213 Change 3313467 on 2017/02/20 by Ryan.Vance #jira UE-41604 3278583 pCustomPresent->AllocateRenderTargetTexture may return false, if we blindly return true we can end up with an invalid render target since the fall back sceneviewport will be skipped. 3278536 Adding ovrError_NoHmd to our sanity check in OnStartGameFrame. Change 3314002 on 2017/02/21 by Keli.Hlodversson Fix compilation on PS4 and Linux Change 3326722 on 2017/03/01 by Jeff.Fisher Merging //UE4/Dev-Main to Dev-VR (//UE4/Dev-VR) Integrating 4.15 from main. Change 3327567 on 2017/03/01 by Jeff.Fisher UEVR-588 Oculus crash on "stereo on" when the proximity sensor is not triggered. Duplicating from Release-4.15 cl 3327481, 3327542 -Don't ovr_SubmitFrame when the layers need to be recreated. They stay dirty until rendering is unpaused. #jira UEVR-588 #review-3384107 Change 3328098 on 2017/03/01 by Jeff.Fisher 4.15 merge fixes -Fixed deprecated enum name function usage. -Fixed world scale usage in GoogleVRController. -Fixed compile break in PS4Tracker. Change 3328271 on 2017/03/01 by Jeff.Fisher 2.15 merge -restroging GoogleVRController::GetWorldToMetersScale... cause it is used everywhere. Change 3328307 on 2017/03/01 by Jeff.Fisher 4.15 merge -More googlevr worldscale fixes. Change 3328312 on 2017/03/01 by Jeff.Fisher 4.15 merge -removing 2 unused includes Change 3330610 on 2017/03/02 by Jeff.Fisher 4.15 merge -fixing linux build Change 3333952 on 2017/03/06 by Keli.Hlodversson Implement common stereo layer management base class and use it in SteamVR and PS4. Fixes an outstanding bug in SteamVR where texures are updated every frame regardles of whether the continous update flag is set or not. #jira UEVR-628 #jira UE-42555 Change 3334961 on 2017/03/07 by Keli.Hlodversson Add missing include to fix non-unity builds Change 3336200 on 2017/03/07 by Keli.Hlodversson Fix compilation issues. (https://ec-01.epicgames.net/commander/link/jobDetails/jobs/7568252?jobName=UE4+Dev-VR+-+CL+3334961+-+Nightly+Build&s=Jobs) * Pre VS2015 compilers don't like mixing wide and unmarked strings in concatenation. Unfortunately LOCTEXT hides the call to the TEXT macro, completely hinding the prefix (which only gets added to the first fragment.) * Switch apparently doesn't know how to format a size_t for analytics either. Also: Typo in backwards compatibility command name alias Change 3337347 on 2017/03/08 by Jeff.Fisher UE-42631 Stereo off while prox sensor uncovered causes low framerate -Setting maxfps appropriately on 'stereo on/off'. #review-3384107 #jira UE-42631 Change 3338385 on 2017/03/08 by Ryan.Vance r.DisableDistortion was only being used for the mobile renderer Change 3342301 on 2017/03/10 by patrickr.donovan Test updates to TM-VRSmoke. Increased lightmap resolution on QA_MeshTypes meshes to improve readbility and reliablility of tests involving said asset. Rebuilt lighting. Change 3348133 on 2017/03/15 by Ryan.Vance Moving mono cvars to scene rendering to avoid cross module references. There's not a good reason to have them in the hmd module anyway. Change 3348836 on 2017/03/15 by Ryan.Vance Direct multi-view support for gear vr Monoscopic far field with multi-view (blit and direct) support for gear vr Support for translucent objects on both sides of the mono clip plane (due to a sorting issue, objects that straddle the plane composite incorrectly) Fixed missing discards/clears in the multi-view blit Change 3348843 on 2017/03/15 by Ryan.Vance Fixing color/depth target size mismatch when screen percentage scaling results in a size that isn't divisible by 16. Change 3349276 on 2017/03/16 by Keli.Hlodversson Fixing compile errors in GoogleVR after merge from main. Change 3350932 on 2017/03/16 by Ryan.Vance Re-enabling the gearvr plugin on windows. Change 3351977 on 2017/03/17 by Jeff.Fisher Fixing masked member variable. Change 3352314 on 2017/03/17 by Ryan.Vance We need to ensure that we don't select different lod levels for each eye. Change 3352993 on 2017/03/17 by Nick.Whiting Integrating CL 3345824 from Android-DevVR to Dev-VR. Support for device depth pass in SceneCaptureComponent2D Change 3355185 on 2017/03/20 by Nick.Whiting Added ability to disable the autoloading splash screen, which would prevent the hide splash screen node from ever working Change 3355676 on 2017/03/20 by Nick.Whiting PR #3384: [GNUX] SteamVR, OpenGL patch. (Contributed by yaakuro), with some minor modifications Change 3357286 on 2017/03/21 by Jeff.Fisher Fixing GenerateProjectFiles, looks like the .config. was removed from these references in main some time ago. Change 3357435 on 2017/03/21 by Jeff.Fisher Fixing editor build break, looks like a merge mistake. Change 3359960 on 2017/03/23 by Keli.Hlodversson Prevent potential crash when drawing tracking sensor location. Also only fetch HMD location once instead of once per tracking sensor. Change 3361230 on 2017/03/23 by Jeff.Fisher Fixing linux build opengl include problem... maybe. Change 3361638 on 2017/03/23 by Jeff.Fisher Another guess at fixing linux build. Change 3364224 on 2017/03/24 by Keli.Hlodversson Initial implementation of UEVR-576 - Base emulated layer implementation #jira UEVR-668 - Base emulated layer implementation: Initial framework for overrideable default implementation #jira UEVR-669 - Base emulated layer implementation: Face Locked Layers Support #jira UEVR-670 - Base emulated layer implementation: Tracker Locked Layers Support #jira UEVR-671 - Base emulated layer implementation: World Locked Layers Support #jira UEVR-672 - Base emulated layer implementation: Add support for optionally rendering face locked layers into a separate layer Change 3364242 on 2017/03/24 by Keli.Hlodversson SteamVR layers do not support negatve Layer priorities Change 3364263 on 2017/03/24 by Jeff.Fisher Merging //UE4/Dev-Main to Dev-VR (//UE4/Dev-VR) Monoscopicfarfieldrendering was just 'accept source', Ryan is going to look at fixing it up. Change 3364472 on 2017/03/24 by Jeff.Fisher Merge fix Change 3364475 on 2017/03/24 by Jeff.Fisher Fixing gearvr include. Change 3364486 on 2017/03/24 by Jeff.Fisher merge fix Change 3364532 on 2017/03/24 by Ryan.Vance pso update for mono rendering and stereo layers. Change 3364599 on 2017/03/24 by Ryan.Vance Oculus changes for SI1.12 Change 3365159 on 2017/03/26 by Jeff.Fisher include fix Change 3365182 on 2017/03/26 by Jeff.Fisher include fix Change 3366087 on 2017/03/27 by Ryan.Vance Remaining files from Oculus changes for SI1.12 merge request. Fixing a bug in OnlineSubsystem. Temporarily changing the eye padding change to be a shader clear to work around a clear color binding issue. Change 3366492 on 2017/03/27 by Ryan.Vance #jira UE-43294 Moved the clear before we setup state for drawing the mirror window content. It was stomping over state after the pso changes. Going to leave the shader clear in the rift prerender for clearing the eye padding for now. Change 3366929 on 2017/03/27 by Ryan.Vance Fixing compile error Change 3368549 on 2017/03/28 by Jeff.Fisher Merging Change: 3357998 from //UE4/Partner-Google-VR/Engine/... to Dev-VR Upgrade Google VR Plugin to v1.3: *Upgraded GVR NDK to 1.30.0 *Changed some BlueprintFunction to use BlueprintPure *Add the missing bDaydream flag in UEDeployAndroid.cs #review-3384107 Change 3368975 on 2017/03/28 by Ryan.Vance CIS clean up #jira UE-43428, UE-43429, UE-43426, UE-43427 Change 3369028 on 2017/03/28 by Ryan.Vance This is not exacly 'correct', but it's at least what the code was trying to do. Change 3370203 on 2017/03/29 by Ryan.Vance Adding gear vr controller component support. Change 3370918 on 2017/03/29 by Ryan.Vance Merging 3370569 using Partner-Google-VR_to_DevVR Change 3371030 on 2017/03/29 by Ryan.Vance Fixing linux build errors #jira UE-43426 Change 3371036 on 2017/03/29 by Ryan.Vance Oculus 4.16 integration. Not terribly happy with the use of std::string. They promised to clean this up for the next release. Change 3373495 on 2017/03/30 by Jeff.Fisher Merging from Dev-Main, in preparation for 4.16 Change 3373578 on 2017/03/30 by Jeff.Fisher build break, one comma short Change 3373870 on 2017/03/31 by Jeff.Fisher Include order fix. Change 3374001 on 2017/03/31 by Keli.Hlodversson Use DefaultStereoLayers as base for Morpheus implementation. #jira UEVR-709 #jira UE-42919 #rb: Jeff.Fisher Change 3374004 on 2017/03/31 by Keli.Hlodversson Fix rendering for the default Stereo Layers implementation on mobile. Depth test was set to "Never" instead of "Always" Destination texture on GLES is flipped on the Y axis, the coordinates are reversed in the shade when compiled on the relevant platforms. Change 3375125 on 2017/03/31 by Jeff.Fisher UE-43506 Ensure using VRPreview with GoogleVR -Removed the ensure, there is code in there to handle that case, and it works. #jira UE-43506 Change 3375294 on 2017/03/31 by nick.bullard Resaving Plugin content to resovle "saved with empty engine version" #jira UE-43537 Change 3375480 on 2017/03/31 by Jeff.Fisher UEVR-9 PSVR: Social Screen Support -Experimental social screen support for 4.16. -This does the basics of driving output through the Aux port in the proper format for display on the mirror monitor. -Only supports 30fps on the mirror monitor. 60fps will require the implementation of sony system dialogs to deal with incompatable system features (video streaming, remote play). -There is a project setting in Morpheus, under experiemental bEnableSocialScreenSeparateMode. This must be set to true to use this feature. When it is false we avoid allocating the back buffers. -MorpheusFunctionLibrary blueprints now have a node "SetSocialScreenMode" which can switch between SystemMirror (hardware supported mirroring), SeparateTest (alternates black and white), SeparateTexture (displays a texture, eg a render target, specified via blueprint), and SeparateMirror(puts the hmd render buffer on screen - which is both eyes, like a debug mode). -Also finally updated the bEnabled flag in project settings to tell people it's only for PC. #jira UEVR-9 #review-3384107 Change 3375540 on 2017/03/31 by Ryan.Vance #jira UE-43504 Fixing android build break when using a 64 bit isa. Change 3375655 on 2017/03/31 by Jeff.Fisher Fixing missing RGBAToYUV shader problem -This at least unblocks our process. Will revisit before zbr. Change 3375820 on 2017/04/01 by Jeff.Fisher Fixing linux build warning about HAS_MORPHEUS Change 3376050 on 2017/04/02 by Jeff.Fisher UE-43515 Step 'UE4Editor Static Analysis Win64' - Module.OnlineSubsystemOculus.cpp Warnings -Temporary fix for static analysis annotation warnings in OnlineSubsytemOculus. Longer term plan is to eliminate the use of the headers that trigger the warnings. -Just wrap all standard headers in static analysis disables. #jira UE-43515 Change 3376609 on 2017/04/03 by Jeff.Fisher Fixing rgbatoyuvshader include. Change 3377001 on 2017/04/03 by Jeff.Fisher UE-43547 Launch On PS4 fails during Run command - Missing global shader FRGBAToYUV420CS - shader c++ must be compiled so that it can be cooked for ps4. #jira UE-43547 Change 3379858 on 2017/04/04 by Jeff.Fisher Merging //UE4/Dev-Main to Dev-VR (//UE4/Dev-VR) pulling main this should get us ps4 sdk 4.508 Change 3379938 on 2017/04/04 by Ryan.Vance #jira UE-43548 If stereo layers are not being used, don't setup overlay targets as we will never clear/initialize them. The clear happens as part of the default layers PostRenderView_RenderThread call which wont be called if layers aren't being used in the scene. Change 3381519 on 2017/04/05 by Jeff.Fisher UEVR-733 PS4 sdk 4.500 hmd connection api changes break hmd connect. -Handling failure of sceHmdGetDeviceInformation if the hmd is powered off. It now returns an error code about an invalid handle in that case, rather than reporting unready. We just treat the error code like an unready status. #jira UEVR-733 #review-3384107 Change 3382019 on 2017/04/05 by Ryan.Vance Linux: add Vulkan support from dev editor: 3381593 Change 3382021 on 2017/04/05 by Ryan.Vance SteamVR on Linux using Vulkan OpenVR rev to 1_0_6 PR #3412: [GNUX] Initial support for SteamVR using Vulkan on GNUX platform. (Contributed by yaakuro) Change 3382076 on 2017/04/05 by Ryan.Vance Fixing linux steamvr lib path. It changed to something less silly in 1.0.6 Removing the steamvr plugin from the white list for linux. It's looking for a runtime that no one will have installed. Change 3383237 on 2017/04/06 by Ryan.Vance #jira UE-43732 Fixing Android compile issues. We can't wrap portions of a macro with a definie. This should probably be some sort of recursive macro thing since there's so much overlap. Good enough for now. Change 3383353 on 2017/04/06 by Ryan.Vance Fixing include cycles. Change 3383509 on 2017/04/06 by Jeff.Fisher Merging //UE4/Dev-Main to Dev-VR (//UE4/Dev-VR) merging the stuff from dev-mobile [CL 3384106 by Ryan Vance in Main branch]
2017-04-06 22:03:51 -04:00
{
continue;
}
if (Layer.PositionType == ELayerType::FaceLocked)
{
SortedOverlayLayers.Add(LayerIndex);
}
else
{
SortedSceneLayers.Add(LayerIndex);
}
}
auto SortLayersPredicate = [&](const uint32& A, const uint32& B)
{
return RenderThreadLayers[A].Priority < RenderThreadLayers[B].Priority;
};
SortedSceneLayers.Sort(SortLayersPredicate);
SortedOverlayLayers.Sort(SortLayersPredicate);
}
void FDefaultStereoLayers::PostRenderView_RenderThread(FRHICommandListImmediate& RHICmdList, FSceneView& InView)
{
if (!IStereoRendering::IsStereoEyeView(InView))
Copying //UE4/Dev-VR to //UE4/Dev-Main (Source: //UE4/Dev-VR @ 3383750) #lockdown Nick.Penwarden ========================== MAJOR FEATURES + CHANGES ========================== Change 3012064 on 2016/06/13 by Nick.Whiting Merging Main -> DevVR Change 3048060 on 2016/07/13 by Nick.Whiting Integrating CL 3045721 from //depot/Partners/Google/AndroidVR-DevVR Upgrade Android and iOS GVR SDK to the latest. Fix the flipped vignette issue when using Unreal's post processing distortion. Change the Daydream & Cardboard mode to use scanline racing. Deprecate the ability to turn off individual UI elements. Change 3235307 on 2016/12/14 by Keli.Hlodversson Filter out excluded HMD modules during FEngineLoop:PreInitHMDDevice. The final selection still happens in UEngine::InitializeHMDDevice as all HMD plugins have not been loaded during PreInit Change 3235308 on 2016/12/14 by Ryan.Vance #jira UEVR-478 Monoscopic far field improvements Shader changes are now gated behind the read only cvar vr.MonoscopicFarField. Changing this requires a shader compile. Moved the mono rendering mode to the cvar vr.MonoscopicFarFieldMode. This is writable, so users can enable/disable mono rendering on the fly if the above cvar is enabled. Only write to the alpha channel in the mobile base pass if the object is opaque and MONOSCOPIC_FAR_FIELD is defined. Addressed code review comments. Change 3235397 on 2016/12/14 by Keli.Hlodversson [Oculus] Only enable GearVR platform on Windows if Oculus service is running Original author: Loren.McQuade Change 3235762 on 2016/12/14 by Keli.Hlodversson Add explicit parentheses to placate the build bots. Change 3242318 on 2016/12/21 by Ryan.Vance Working around pixel density crash. Change 3242522 on 2016/12/21 by Ryan.Vance Missing flag clear so our adaptive test was always returning true. Change 3243173 on 2016/12/22 by Ryan.Vance Integrating post present callback implementation from 4.14.1 Change 3248633 on 2017/01/05 by Keli.Hlodversson Copying //Tasks/UE4/Dev-VR-Refactoring to Dev-VR-Minimal (//UE4/Dev-VR-Minimal) Change 3248723 on 2017/01/05 by Keli.Hlodversson Fix after merge. EnablePositionalTracking no longer exists. Change 3249484 on 2017/01/06 by Keli.Hlodversson Add missing includes Change 3249714 on 2017/01/06 by Keli.Hlodversson Remove monolithic header include Change 3249980 on 2017/01/06 by Keli.Hlodversson SteamVR: Remove leftover unused WindowMirrorMode member variable Change 3252432 on 2017/01/10 by Keli.Hlodversson Submitting change by Loren McQuade to fix monolithic builds. Unshelved from pending changelist '3251436': Change 3257373 on 2017/01/13 by Keli.Hlodversson #jira UEVR-411: Finish renaming/removing/remodelling the remaining Oculus (Rift+GearVR) commands #jira UEVR-412: Rename and merge remaining Morpheus console commands #jira UEVR-417: Remove Exec from IHeadMountedDisplay Change 3269971 on 2017/01/24 by Jeff.Fisher UEVR-498 move controller is missing world to meters UEVR-522 PS4 motion controller worldscale support. -Passing world to meters scale into getControllerOrientationAndPosition because the thing asking about it ought to be part of a world, and know what it should be. This also avoids making PS4 motion controllers dependent on the HMD. Note Google VR Controller doesn't do position, so doesnt' care about scale. Oculus already had internal threadsafe tracking of world scale, so I left that. Steam handles world scale below our input level. -Also adding PlayerIndex member to FSceneView so we can figure out which view the MotionControllerComponent should get its worldscale from for the late render thread update. #jira UEVR-498 #review-3384107 Change 3288308 on 2017/02/06 by Jeff.Fisher UEVR-517 Detect MotionController Connectivity -PS4 can only track 2 controllers and 1 hmd. Support for dealing with that is needed. -Also need to support multiple motion controller components mapped to a single controller. Licencees have done that before. -Created a new interface IMotionTrackingSystemManagement, and implements it for PS4Tracker on PS4. -Created a MotionTrackedDeviceFunctionLibrary to expose that interface to blueprint. -With those one can enable and disable tracking on ps4 controllers and query their state to stay within the controller tracking limit. -PS4Tracker also keeps a blackboard of the enable/disable state so that one can enable or disable controllers that have not been connected yet, and have them enable tracking or not when they are connected. -DS4 controller no longer jumps back to 000 if it loses tracking. #review-3384107 #jira UEVR-517 Change 3288309 on 2017/02/06 by Keli.Hlodversson Add file missing from CL#3257373. Change 3288311 on 2017/02/06 by Jeff.Fisher UEVR-517 Detect MotionController Connectivity - Test content. -tm-motionControllers has a third mode where all playstation motion controllers for player 0 are availalbe. You can toggle them to track or not with ctrl-P,G,L,R for pad, gun, leftmove, rightmove or with alt-P,G,L,R. Ctrl tests doing so via MotionControllerComponent. Alt tests doing so by player index and controller type enum. -ctrl-A disables tracking of all controllers -alt-A disables tracking of all controllers for player 0 -ctrl-D toggles enabling new controllers by default -Also fixed one button not working in one of the other test modes for the Aim (gun) controller. -The controller 'models' have an arrow out the front. It is black if disabled. Red if enabled, but no tracker is active, yellow if tracked but inertial only, and green if fully tracked by the camera. -This logic is in the QA_MoCoAll blueprint. Change 3291601 on 2017/02/07 by Jeff.Fisher UEVR-536 PSVR motion controller tracking problem with multiple controllers -Previous code called GetRelativeTransform from the render thread, but the game thread could update it at any time. This caches that transform so that it can be safely used in the render thread. #jira UEVR-536 #review-3384107 @Ryan.Vance Change 3292460 on 2017/02/08 by Jeff.Fisher PS4 sceVrTrackerGetResult() error warning logging improved, and explanatory comment added. Change 3308771 on 2017/02/17 by Keli.Hlodversson Rename GoogleVR console commands #jira UEVR-412 Change 3309156 on 2017/02/17 by Keli.Hlodversson Track changes in r.ScreenPercentage on GoogleVR and set RenderTargetSize accordingly. Change 3311999 on 2017/02/20 by Keli.Hlodversson Create a default implementation for RecordAnalytics. Also create an initial stub for FHeadMountedDisplayBase for future default implementations of common HMD functionality. Make implementing IHeadMountedDisplay::GetDeviceName mandatory instead of defaulting to "Unknown" #jira UE-21878 #jira UEVR-213 Change 3313467 on 2017/02/20 by Ryan.Vance #jira UE-41604 3278583 pCustomPresent->AllocateRenderTargetTexture may return false, if we blindly return true we can end up with an invalid render target since the fall back sceneviewport will be skipped. 3278536 Adding ovrError_NoHmd to our sanity check in OnStartGameFrame. Change 3314002 on 2017/02/21 by Keli.Hlodversson Fix compilation on PS4 and Linux Change 3326722 on 2017/03/01 by Jeff.Fisher Merging //UE4/Dev-Main to Dev-VR (//UE4/Dev-VR) Integrating 4.15 from main. Change 3327567 on 2017/03/01 by Jeff.Fisher UEVR-588 Oculus crash on "stereo on" when the proximity sensor is not triggered. Duplicating from Release-4.15 cl 3327481, 3327542 -Don't ovr_SubmitFrame when the layers need to be recreated. They stay dirty until rendering is unpaused. #jira UEVR-588 #review-3384107 Change 3328098 on 2017/03/01 by Jeff.Fisher 4.15 merge fixes -Fixed deprecated enum name function usage. -Fixed world scale usage in GoogleVRController. -Fixed compile break in PS4Tracker. Change 3328271 on 2017/03/01 by Jeff.Fisher 2.15 merge -restroging GoogleVRController::GetWorldToMetersScale... cause it is used everywhere. Change 3328307 on 2017/03/01 by Jeff.Fisher 4.15 merge -More googlevr worldscale fixes. Change 3328312 on 2017/03/01 by Jeff.Fisher 4.15 merge -removing 2 unused includes Change 3330610 on 2017/03/02 by Jeff.Fisher 4.15 merge -fixing linux build Change 3333952 on 2017/03/06 by Keli.Hlodversson Implement common stereo layer management base class and use it in SteamVR and PS4. Fixes an outstanding bug in SteamVR where texures are updated every frame regardles of whether the continous update flag is set or not. #jira UEVR-628 #jira UE-42555 Change 3334961 on 2017/03/07 by Keli.Hlodversson Add missing include to fix non-unity builds Change 3336200 on 2017/03/07 by Keli.Hlodversson Fix compilation issues. (https://ec-01.epicgames.net/commander/link/jobDetails/jobs/7568252?jobName=UE4+Dev-VR+-+CL+3334961+-+Nightly+Build&s=Jobs) * Pre VS2015 compilers don't like mixing wide and unmarked strings in concatenation. Unfortunately LOCTEXT hides the call to the TEXT macro, completely hinding the prefix (which only gets added to the first fragment.) * Switch apparently doesn't know how to format a size_t for analytics either. Also: Typo in backwards compatibility command name alias Change 3337347 on 2017/03/08 by Jeff.Fisher UE-42631 Stereo off while prox sensor uncovered causes low framerate -Setting maxfps appropriately on 'stereo on/off'. #review-3384107 #jira UE-42631 Change 3338385 on 2017/03/08 by Ryan.Vance r.DisableDistortion was only being used for the mobile renderer Change 3342301 on 2017/03/10 by patrickr.donovan Test updates to TM-VRSmoke. Increased lightmap resolution on QA_MeshTypes meshes to improve readbility and reliablility of tests involving said asset. Rebuilt lighting. Change 3348133 on 2017/03/15 by Ryan.Vance Moving mono cvars to scene rendering to avoid cross module references. There's not a good reason to have them in the hmd module anyway. Change 3348836 on 2017/03/15 by Ryan.Vance Direct multi-view support for gear vr Monoscopic far field with multi-view (blit and direct) support for gear vr Support for translucent objects on both sides of the mono clip plane (due to a sorting issue, objects that straddle the plane composite incorrectly) Fixed missing discards/clears in the multi-view blit Change 3348843 on 2017/03/15 by Ryan.Vance Fixing color/depth target size mismatch when screen percentage scaling results in a size that isn't divisible by 16. Change 3349276 on 2017/03/16 by Keli.Hlodversson Fixing compile errors in GoogleVR after merge from main. Change 3350932 on 2017/03/16 by Ryan.Vance Re-enabling the gearvr plugin on windows. Change 3351977 on 2017/03/17 by Jeff.Fisher Fixing masked member variable. Change 3352314 on 2017/03/17 by Ryan.Vance We need to ensure that we don't select different lod levels for each eye. Change 3352993 on 2017/03/17 by Nick.Whiting Integrating CL 3345824 from Android-DevVR to Dev-VR. Support for device depth pass in SceneCaptureComponent2D Change 3355185 on 2017/03/20 by Nick.Whiting Added ability to disable the autoloading splash screen, which would prevent the hide splash screen node from ever working Change 3355676 on 2017/03/20 by Nick.Whiting PR #3384: [GNUX] SteamVR, OpenGL patch. (Contributed by yaakuro), with some minor modifications Change 3357286 on 2017/03/21 by Jeff.Fisher Fixing GenerateProjectFiles, looks like the .config. was removed from these references in main some time ago. Change 3357435 on 2017/03/21 by Jeff.Fisher Fixing editor build break, looks like a merge mistake. Change 3359960 on 2017/03/23 by Keli.Hlodversson Prevent potential crash when drawing tracking sensor location. Also only fetch HMD location once instead of once per tracking sensor. Change 3361230 on 2017/03/23 by Jeff.Fisher Fixing linux build opengl include problem... maybe. Change 3361638 on 2017/03/23 by Jeff.Fisher Another guess at fixing linux build. Change 3364224 on 2017/03/24 by Keli.Hlodversson Initial implementation of UEVR-576 - Base emulated layer implementation #jira UEVR-668 - Base emulated layer implementation: Initial framework for overrideable default implementation #jira UEVR-669 - Base emulated layer implementation: Face Locked Layers Support #jira UEVR-670 - Base emulated layer implementation: Tracker Locked Layers Support #jira UEVR-671 - Base emulated layer implementation: World Locked Layers Support #jira UEVR-672 - Base emulated layer implementation: Add support for optionally rendering face locked layers into a separate layer Change 3364242 on 2017/03/24 by Keli.Hlodversson SteamVR layers do not support negatve Layer priorities Change 3364263 on 2017/03/24 by Jeff.Fisher Merging //UE4/Dev-Main to Dev-VR (//UE4/Dev-VR) Monoscopicfarfieldrendering was just 'accept source', Ryan is going to look at fixing it up. Change 3364472 on 2017/03/24 by Jeff.Fisher Merge fix Change 3364475 on 2017/03/24 by Jeff.Fisher Fixing gearvr include. Change 3364486 on 2017/03/24 by Jeff.Fisher merge fix Change 3364532 on 2017/03/24 by Ryan.Vance pso update for mono rendering and stereo layers. Change 3364599 on 2017/03/24 by Ryan.Vance Oculus changes for SI1.12 Change 3365159 on 2017/03/26 by Jeff.Fisher include fix Change 3365182 on 2017/03/26 by Jeff.Fisher include fix Change 3366087 on 2017/03/27 by Ryan.Vance Remaining files from Oculus changes for SI1.12 merge request. Fixing a bug in OnlineSubsystem. Temporarily changing the eye padding change to be a shader clear to work around a clear color binding issue. Change 3366492 on 2017/03/27 by Ryan.Vance #jira UE-43294 Moved the clear before we setup state for drawing the mirror window content. It was stomping over state after the pso changes. Going to leave the shader clear in the rift prerender for clearing the eye padding for now. Change 3366929 on 2017/03/27 by Ryan.Vance Fixing compile error Change 3368549 on 2017/03/28 by Jeff.Fisher Merging Change: 3357998 from //UE4/Partner-Google-VR/Engine/... to Dev-VR Upgrade Google VR Plugin to v1.3: *Upgraded GVR NDK to 1.30.0 *Changed some BlueprintFunction to use BlueprintPure *Add the missing bDaydream flag in UEDeployAndroid.cs #review-3384107 Change 3368975 on 2017/03/28 by Ryan.Vance CIS clean up #jira UE-43428, UE-43429, UE-43426, UE-43427 Change 3369028 on 2017/03/28 by Ryan.Vance This is not exacly 'correct', but it's at least what the code was trying to do. Change 3370203 on 2017/03/29 by Ryan.Vance Adding gear vr controller component support. Change 3370918 on 2017/03/29 by Ryan.Vance Merging 3370569 using Partner-Google-VR_to_DevVR Change 3371030 on 2017/03/29 by Ryan.Vance Fixing linux build errors #jira UE-43426 Change 3371036 on 2017/03/29 by Ryan.Vance Oculus 4.16 integration. Not terribly happy with the use of std::string. They promised to clean this up for the next release. Change 3373495 on 2017/03/30 by Jeff.Fisher Merging from Dev-Main, in preparation for 4.16 Change 3373578 on 2017/03/30 by Jeff.Fisher build break, one comma short Change 3373870 on 2017/03/31 by Jeff.Fisher Include order fix. Change 3374001 on 2017/03/31 by Keli.Hlodversson Use DefaultStereoLayers as base for Morpheus implementation. #jira UEVR-709 #jira UE-42919 #rb: Jeff.Fisher Change 3374004 on 2017/03/31 by Keli.Hlodversson Fix rendering for the default Stereo Layers implementation on mobile. Depth test was set to "Never" instead of "Always" Destination texture on GLES is flipped on the Y axis, the coordinates are reversed in the shade when compiled on the relevant platforms. Change 3375125 on 2017/03/31 by Jeff.Fisher UE-43506 Ensure using VRPreview with GoogleVR -Removed the ensure, there is code in there to handle that case, and it works. #jira UE-43506 Change 3375294 on 2017/03/31 by nick.bullard Resaving Plugin content to resovle "saved with empty engine version" #jira UE-43537 Change 3375480 on 2017/03/31 by Jeff.Fisher UEVR-9 PSVR: Social Screen Support -Experimental social screen support for 4.16. -This does the basics of driving output through the Aux port in the proper format for display on the mirror monitor. -Only supports 30fps on the mirror monitor. 60fps will require the implementation of sony system dialogs to deal with incompatable system features (video streaming, remote play). -There is a project setting in Morpheus, under experiemental bEnableSocialScreenSeparateMode. This must be set to true to use this feature. When it is false we avoid allocating the back buffers. -MorpheusFunctionLibrary blueprints now have a node "SetSocialScreenMode" which can switch between SystemMirror (hardware supported mirroring), SeparateTest (alternates black and white), SeparateTexture (displays a texture, eg a render target, specified via blueprint), and SeparateMirror(puts the hmd render buffer on screen - which is both eyes, like a debug mode). -Also finally updated the bEnabled flag in project settings to tell people it's only for PC. #jira UEVR-9 #review-3384107 Change 3375540 on 2017/03/31 by Ryan.Vance #jira UE-43504 Fixing android build break when using a 64 bit isa. Change 3375655 on 2017/03/31 by Jeff.Fisher Fixing missing RGBAToYUV shader problem -This at least unblocks our process. Will revisit before zbr. Change 3375820 on 2017/04/01 by Jeff.Fisher Fixing linux build warning about HAS_MORPHEUS Change 3376050 on 2017/04/02 by Jeff.Fisher UE-43515 Step 'UE4Editor Static Analysis Win64' - Module.OnlineSubsystemOculus.cpp Warnings -Temporary fix for static analysis annotation warnings in OnlineSubsytemOculus. Longer term plan is to eliminate the use of the headers that trigger the warnings. -Just wrap all standard headers in static analysis disables. #jira UE-43515 Change 3376609 on 2017/04/03 by Jeff.Fisher Fixing rgbatoyuvshader include. Change 3377001 on 2017/04/03 by Jeff.Fisher UE-43547 Launch On PS4 fails during Run command - Missing global shader FRGBAToYUV420CS - shader c++ must be compiled so that it can be cooked for ps4. #jira UE-43547 Change 3379858 on 2017/04/04 by Jeff.Fisher Merging //UE4/Dev-Main to Dev-VR (//UE4/Dev-VR) pulling main this should get us ps4 sdk 4.508 Change 3379938 on 2017/04/04 by Ryan.Vance #jira UE-43548 If stereo layers are not being used, don't setup overlay targets as we will never clear/initialize them. The clear happens as part of the default layers PostRenderView_RenderThread call which wont be called if layers aren't being used in the scene. Change 3381519 on 2017/04/05 by Jeff.Fisher UEVR-733 PS4 sdk 4.500 hmd connection api changes break hmd connect. -Handling failure of sceHmdGetDeviceInformation if the hmd is powered off. It now returns an error code about an invalid handle in that case, rather than reporting unready. We just treat the error code like an unready status. #jira UEVR-733 #review-3384107 Change 3382019 on 2017/04/05 by Ryan.Vance Linux: add Vulkan support from dev editor: 3381593 Change 3382021 on 2017/04/05 by Ryan.Vance SteamVR on Linux using Vulkan OpenVR rev to 1_0_6 PR #3412: [GNUX] Initial support for SteamVR using Vulkan on GNUX platform. (Contributed by yaakuro) Change 3382076 on 2017/04/05 by Ryan.Vance Fixing linux steamvr lib path. It changed to something less silly in 1.0.6 Removing the steamvr plugin from the white list for linux. It's looking for a runtime that no one will have installed. Change 3383237 on 2017/04/06 by Ryan.Vance #jira UE-43732 Fixing Android compile issues. We can't wrap portions of a macro with a definie. This should probably be some sort of recursive macro thing since there's so much overlap. Good enough for now. Change 3383353 on 2017/04/06 by Ryan.Vance Fixing include cycles. Change 3383509 on 2017/04/06 by Jeff.Fisher Merging //UE4/Dev-Main to Dev-VR (//UE4/Dev-VR) merging the stuff from dev-mobile [CL 3384106 by Ryan Vance in Main branch]
2017-04-06 22:03:51 -04:00
{
return;
}
FViewMatrices ModifiedViewMatrices = InView.ViewMatrices;
ModifiedViewMatrices.HackRemoveTemporalAAProjectionJitter();
const FMatrix& ProjectionMatrix = ModifiedViewMatrices.GetProjectionMatrix();
const FMatrix& ViewProjectionMatrix = ModifiedViewMatrices.GetViewProjectionMatrix();
Copying //UE4/Dev-VR to //UE4/Dev-Main (Source: //UE4/Dev-VR @ 3383750) #lockdown Nick.Penwarden ========================== MAJOR FEATURES + CHANGES ========================== Change 3012064 on 2016/06/13 by Nick.Whiting Merging Main -> DevVR Change 3048060 on 2016/07/13 by Nick.Whiting Integrating CL 3045721 from //depot/Partners/Google/AndroidVR-DevVR Upgrade Android and iOS GVR SDK to the latest. Fix the flipped vignette issue when using Unreal's post processing distortion. Change the Daydream & Cardboard mode to use scanline racing. Deprecate the ability to turn off individual UI elements. Change 3235307 on 2016/12/14 by Keli.Hlodversson Filter out excluded HMD modules during FEngineLoop:PreInitHMDDevice. The final selection still happens in UEngine::InitializeHMDDevice as all HMD plugins have not been loaded during PreInit Change 3235308 on 2016/12/14 by Ryan.Vance #jira UEVR-478 Monoscopic far field improvements Shader changes are now gated behind the read only cvar vr.MonoscopicFarField. Changing this requires a shader compile. Moved the mono rendering mode to the cvar vr.MonoscopicFarFieldMode. This is writable, so users can enable/disable mono rendering on the fly if the above cvar is enabled. Only write to the alpha channel in the mobile base pass if the object is opaque and MONOSCOPIC_FAR_FIELD is defined. Addressed code review comments. Change 3235397 on 2016/12/14 by Keli.Hlodversson [Oculus] Only enable GearVR platform on Windows if Oculus service is running Original author: Loren.McQuade Change 3235762 on 2016/12/14 by Keli.Hlodversson Add explicit parentheses to placate the build bots. Change 3242318 on 2016/12/21 by Ryan.Vance Working around pixel density crash. Change 3242522 on 2016/12/21 by Ryan.Vance Missing flag clear so our adaptive test was always returning true. Change 3243173 on 2016/12/22 by Ryan.Vance Integrating post present callback implementation from 4.14.1 Change 3248633 on 2017/01/05 by Keli.Hlodversson Copying //Tasks/UE4/Dev-VR-Refactoring to Dev-VR-Minimal (//UE4/Dev-VR-Minimal) Change 3248723 on 2017/01/05 by Keli.Hlodversson Fix after merge. EnablePositionalTracking no longer exists. Change 3249484 on 2017/01/06 by Keli.Hlodversson Add missing includes Change 3249714 on 2017/01/06 by Keli.Hlodversson Remove monolithic header include Change 3249980 on 2017/01/06 by Keli.Hlodversson SteamVR: Remove leftover unused WindowMirrorMode member variable Change 3252432 on 2017/01/10 by Keli.Hlodversson Submitting change by Loren McQuade to fix monolithic builds. Unshelved from pending changelist '3251436': Change 3257373 on 2017/01/13 by Keli.Hlodversson #jira UEVR-411: Finish renaming/removing/remodelling the remaining Oculus (Rift+GearVR) commands #jira UEVR-412: Rename and merge remaining Morpheus console commands #jira UEVR-417: Remove Exec from IHeadMountedDisplay Change 3269971 on 2017/01/24 by Jeff.Fisher UEVR-498 move controller is missing world to meters UEVR-522 PS4 motion controller worldscale support. -Passing world to meters scale into getControllerOrientationAndPosition because the thing asking about it ought to be part of a world, and know what it should be. This also avoids making PS4 motion controllers dependent on the HMD. Note Google VR Controller doesn't do position, so doesnt' care about scale. Oculus already had internal threadsafe tracking of world scale, so I left that. Steam handles world scale below our input level. -Also adding PlayerIndex member to FSceneView so we can figure out which view the MotionControllerComponent should get its worldscale from for the late render thread update. #jira UEVR-498 #review-3384107 Change 3288308 on 2017/02/06 by Jeff.Fisher UEVR-517 Detect MotionController Connectivity -PS4 can only track 2 controllers and 1 hmd. Support for dealing with that is needed. -Also need to support multiple motion controller components mapped to a single controller. Licencees have done that before. -Created a new interface IMotionTrackingSystemManagement, and implements it for PS4Tracker on PS4. -Created a MotionTrackedDeviceFunctionLibrary to expose that interface to blueprint. -With those one can enable and disable tracking on ps4 controllers and query their state to stay within the controller tracking limit. -PS4Tracker also keeps a blackboard of the enable/disable state so that one can enable or disable controllers that have not been connected yet, and have them enable tracking or not when they are connected. -DS4 controller no longer jumps back to 000 if it loses tracking. #review-3384107 #jira UEVR-517 Change 3288309 on 2017/02/06 by Keli.Hlodversson Add file missing from CL#3257373. Change 3288311 on 2017/02/06 by Jeff.Fisher UEVR-517 Detect MotionController Connectivity - Test content. -tm-motionControllers has a third mode where all playstation motion controllers for player 0 are availalbe. You can toggle them to track or not with ctrl-P,G,L,R for pad, gun, leftmove, rightmove or with alt-P,G,L,R. Ctrl tests doing so via MotionControllerComponent. Alt tests doing so by player index and controller type enum. -ctrl-A disables tracking of all controllers -alt-A disables tracking of all controllers for player 0 -ctrl-D toggles enabling new controllers by default -Also fixed one button not working in one of the other test modes for the Aim (gun) controller. -The controller 'models' have an arrow out the front. It is black if disabled. Red if enabled, but no tracker is active, yellow if tracked but inertial only, and green if fully tracked by the camera. -This logic is in the QA_MoCoAll blueprint. Change 3291601 on 2017/02/07 by Jeff.Fisher UEVR-536 PSVR motion controller tracking problem with multiple controllers -Previous code called GetRelativeTransform from the render thread, but the game thread could update it at any time. This caches that transform so that it can be safely used in the render thread. #jira UEVR-536 #review-3384107 @Ryan.Vance Change 3292460 on 2017/02/08 by Jeff.Fisher PS4 sceVrTrackerGetResult() error warning logging improved, and explanatory comment added. Change 3308771 on 2017/02/17 by Keli.Hlodversson Rename GoogleVR console commands #jira UEVR-412 Change 3309156 on 2017/02/17 by Keli.Hlodversson Track changes in r.ScreenPercentage on GoogleVR and set RenderTargetSize accordingly. Change 3311999 on 2017/02/20 by Keli.Hlodversson Create a default implementation for RecordAnalytics. Also create an initial stub for FHeadMountedDisplayBase for future default implementations of common HMD functionality. Make implementing IHeadMountedDisplay::GetDeviceName mandatory instead of defaulting to "Unknown" #jira UE-21878 #jira UEVR-213 Change 3313467 on 2017/02/20 by Ryan.Vance #jira UE-41604 3278583 pCustomPresent->AllocateRenderTargetTexture may return false, if we blindly return true we can end up with an invalid render target since the fall back sceneviewport will be skipped. 3278536 Adding ovrError_NoHmd to our sanity check in OnStartGameFrame. Change 3314002 on 2017/02/21 by Keli.Hlodversson Fix compilation on PS4 and Linux Change 3326722 on 2017/03/01 by Jeff.Fisher Merging //UE4/Dev-Main to Dev-VR (//UE4/Dev-VR) Integrating 4.15 from main. Change 3327567 on 2017/03/01 by Jeff.Fisher UEVR-588 Oculus crash on "stereo on" when the proximity sensor is not triggered. Duplicating from Release-4.15 cl 3327481, 3327542 -Don't ovr_SubmitFrame when the layers need to be recreated. They stay dirty until rendering is unpaused. #jira UEVR-588 #review-3384107 Change 3328098 on 2017/03/01 by Jeff.Fisher 4.15 merge fixes -Fixed deprecated enum name function usage. -Fixed world scale usage in GoogleVRController. -Fixed compile break in PS4Tracker. Change 3328271 on 2017/03/01 by Jeff.Fisher 2.15 merge -restroging GoogleVRController::GetWorldToMetersScale... cause it is used everywhere. Change 3328307 on 2017/03/01 by Jeff.Fisher 4.15 merge -More googlevr worldscale fixes. Change 3328312 on 2017/03/01 by Jeff.Fisher 4.15 merge -removing 2 unused includes Change 3330610 on 2017/03/02 by Jeff.Fisher 4.15 merge -fixing linux build Change 3333952 on 2017/03/06 by Keli.Hlodversson Implement common stereo layer management base class and use it in SteamVR and PS4. Fixes an outstanding bug in SteamVR where texures are updated every frame regardles of whether the continous update flag is set or not. #jira UEVR-628 #jira UE-42555 Change 3334961 on 2017/03/07 by Keli.Hlodversson Add missing include to fix non-unity builds Change 3336200 on 2017/03/07 by Keli.Hlodversson Fix compilation issues. (https://ec-01.epicgames.net/commander/link/jobDetails/jobs/7568252?jobName=UE4+Dev-VR+-+CL+3334961+-+Nightly+Build&s=Jobs) * Pre VS2015 compilers don't like mixing wide and unmarked strings in concatenation. Unfortunately LOCTEXT hides the call to the TEXT macro, completely hinding the prefix (which only gets added to the first fragment.) * Switch apparently doesn't know how to format a size_t for analytics either. Also: Typo in backwards compatibility command name alias Change 3337347 on 2017/03/08 by Jeff.Fisher UE-42631 Stereo off while prox sensor uncovered causes low framerate -Setting maxfps appropriately on 'stereo on/off'. #review-3384107 #jira UE-42631 Change 3338385 on 2017/03/08 by Ryan.Vance r.DisableDistortion was only being used for the mobile renderer Change 3342301 on 2017/03/10 by patrickr.donovan Test updates to TM-VRSmoke. Increased lightmap resolution on QA_MeshTypes meshes to improve readbility and reliablility of tests involving said asset. Rebuilt lighting. Change 3348133 on 2017/03/15 by Ryan.Vance Moving mono cvars to scene rendering to avoid cross module references. There's not a good reason to have them in the hmd module anyway. Change 3348836 on 2017/03/15 by Ryan.Vance Direct multi-view support for gear vr Monoscopic far field with multi-view (blit and direct) support for gear vr Support for translucent objects on both sides of the mono clip plane (due to a sorting issue, objects that straddle the plane composite incorrectly) Fixed missing discards/clears in the multi-view blit Change 3348843 on 2017/03/15 by Ryan.Vance Fixing color/depth target size mismatch when screen percentage scaling results in a size that isn't divisible by 16. Change 3349276 on 2017/03/16 by Keli.Hlodversson Fixing compile errors in GoogleVR after merge from main. Change 3350932 on 2017/03/16 by Ryan.Vance Re-enabling the gearvr plugin on windows. Change 3351977 on 2017/03/17 by Jeff.Fisher Fixing masked member variable. Change 3352314 on 2017/03/17 by Ryan.Vance We need to ensure that we don't select different lod levels for each eye. Change 3352993 on 2017/03/17 by Nick.Whiting Integrating CL 3345824 from Android-DevVR to Dev-VR. Support for device depth pass in SceneCaptureComponent2D Change 3355185 on 2017/03/20 by Nick.Whiting Added ability to disable the autoloading splash screen, which would prevent the hide splash screen node from ever working Change 3355676 on 2017/03/20 by Nick.Whiting PR #3384: [GNUX] SteamVR, OpenGL patch. (Contributed by yaakuro), with some minor modifications Change 3357286 on 2017/03/21 by Jeff.Fisher Fixing GenerateProjectFiles, looks like the .config. was removed from these references in main some time ago. Change 3357435 on 2017/03/21 by Jeff.Fisher Fixing editor build break, looks like a merge mistake. Change 3359960 on 2017/03/23 by Keli.Hlodversson Prevent potential crash when drawing tracking sensor location. Also only fetch HMD location once instead of once per tracking sensor. Change 3361230 on 2017/03/23 by Jeff.Fisher Fixing linux build opengl include problem... maybe. Change 3361638 on 2017/03/23 by Jeff.Fisher Another guess at fixing linux build. Change 3364224 on 2017/03/24 by Keli.Hlodversson Initial implementation of UEVR-576 - Base emulated layer implementation #jira UEVR-668 - Base emulated layer implementation: Initial framework for overrideable default implementation #jira UEVR-669 - Base emulated layer implementation: Face Locked Layers Support #jira UEVR-670 - Base emulated layer implementation: Tracker Locked Layers Support #jira UEVR-671 - Base emulated layer implementation: World Locked Layers Support #jira UEVR-672 - Base emulated layer implementation: Add support for optionally rendering face locked layers into a separate layer Change 3364242 on 2017/03/24 by Keli.Hlodversson SteamVR layers do not support negatve Layer priorities Change 3364263 on 2017/03/24 by Jeff.Fisher Merging //UE4/Dev-Main to Dev-VR (//UE4/Dev-VR) Monoscopicfarfieldrendering was just 'accept source', Ryan is going to look at fixing it up. Change 3364472 on 2017/03/24 by Jeff.Fisher Merge fix Change 3364475 on 2017/03/24 by Jeff.Fisher Fixing gearvr include. Change 3364486 on 2017/03/24 by Jeff.Fisher merge fix Change 3364532 on 2017/03/24 by Ryan.Vance pso update for mono rendering and stereo layers. Change 3364599 on 2017/03/24 by Ryan.Vance Oculus changes for SI1.12 Change 3365159 on 2017/03/26 by Jeff.Fisher include fix Change 3365182 on 2017/03/26 by Jeff.Fisher include fix Change 3366087 on 2017/03/27 by Ryan.Vance Remaining files from Oculus changes for SI1.12 merge request. Fixing a bug in OnlineSubsystem. Temporarily changing the eye padding change to be a shader clear to work around a clear color binding issue. Change 3366492 on 2017/03/27 by Ryan.Vance #jira UE-43294 Moved the clear before we setup state for drawing the mirror window content. It was stomping over state after the pso changes. Going to leave the shader clear in the rift prerender for clearing the eye padding for now. Change 3366929 on 2017/03/27 by Ryan.Vance Fixing compile error Change 3368549 on 2017/03/28 by Jeff.Fisher Merging Change: 3357998 from //UE4/Partner-Google-VR/Engine/... to Dev-VR Upgrade Google VR Plugin to v1.3: *Upgraded GVR NDK to 1.30.0 *Changed some BlueprintFunction to use BlueprintPure *Add the missing bDaydream flag in UEDeployAndroid.cs #review-3384107 Change 3368975 on 2017/03/28 by Ryan.Vance CIS clean up #jira UE-43428, UE-43429, UE-43426, UE-43427 Change 3369028 on 2017/03/28 by Ryan.Vance This is not exacly 'correct', but it's at least what the code was trying to do. Change 3370203 on 2017/03/29 by Ryan.Vance Adding gear vr controller component support. Change 3370918 on 2017/03/29 by Ryan.Vance Merging 3370569 using Partner-Google-VR_to_DevVR Change 3371030 on 2017/03/29 by Ryan.Vance Fixing linux build errors #jira UE-43426 Change 3371036 on 2017/03/29 by Ryan.Vance Oculus 4.16 integration. Not terribly happy with the use of std::string. They promised to clean this up for the next release. Change 3373495 on 2017/03/30 by Jeff.Fisher Merging from Dev-Main, in preparation for 4.16 Change 3373578 on 2017/03/30 by Jeff.Fisher build break, one comma short Change 3373870 on 2017/03/31 by Jeff.Fisher Include order fix. Change 3374001 on 2017/03/31 by Keli.Hlodversson Use DefaultStereoLayers as base for Morpheus implementation. #jira UEVR-709 #jira UE-42919 #rb: Jeff.Fisher Change 3374004 on 2017/03/31 by Keli.Hlodversson Fix rendering for the default Stereo Layers implementation on mobile. Depth test was set to "Never" instead of "Always" Destination texture on GLES is flipped on the Y axis, the coordinates are reversed in the shade when compiled on the relevant platforms. Change 3375125 on 2017/03/31 by Jeff.Fisher UE-43506 Ensure using VRPreview with GoogleVR -Removed the ensure, there is code in there to handle that case, and it works. #jira UE-43506 Change 3375294 on 2017/03/31 by nick.bullard Resaving Plugin content to resovle "saved with empty engine version" #jira UE-43537 Change 3375480 on 2017/03/31 by Jeff.Fisher UEVR-9 PSVR: Social Screen Support -Experimental social screen support for 4.16. -This does the basics of driving output through the Aux port in the proper format for display on the mirror monitor. -Only supports 30fps on the mirror monitor. 60fps will require the implementation of sony system dialogs to deal with incompatable system features (video streaming, remote play). -There is a project setting in Morpheus, under experiemental bEnableSocialScreenSeparateMode. This must be set to true to use this feature. When it is false we avoid allocating the back buffers. -MorpheusFunctionLibrary blueprints now have a node "SetSocialScreenMode" which can switch between SystemMirror (hardware supported mirroring), SeparateTest (alternates black and white), SeparateTexture (displays a texture, eg a render target, specified via blueprint), and SeparateMirror(puts the hmd render buffer on screen - which is both eyes, like a debug mode). -Also finally updated the bEnabled flag in project settings to tell people it's only for PC. #jira UEVR-9 #review-3384107 Change 3375540 on 2017/03/31 by Ryan.Vance #jira UE-43504 Fixing android build break when using a 64 bit isa. Change 3375655 on 2017/03/31 by Jeff.Fisher Fixing missing RGBAToYUV shader problem -This at least unblocks our process. Will revisit before zbr. Change 3375820 on 2017/04/01 by Jeff.Fisher Fixing linux build warning about HAS_MORPHEUS Change 3376050 on 2017/04/02 by Jeff.Fisher UE-43515 Step 'UE4Editor Static Analysis Win64' - Module.OnlineSubsystemOculus.cpp Warnings -Temporary fix for static analysis annotation warnings in OnlineSubsytemOculus. Longer term plan is to eliminate the use of the headers that trigger the warnings. -Just wrap all standard headers in static analysis disables. #jira UE-43515 Change 3376609 on 2017/04/03 by Jeff.Fisher Fixing rgbatoyuvshader include. Change 3377001 on 2017/04/03 by Jeff.Fisher UE-43547 Launch On PS4 fails during Run command - Missing global shader FRGBAToYUV420CS - shader c++ must be compiled so that it can be cooked for ps4. #jira UE-43547 Change 3379858 on 2017/04/04 by Jeff.Fisher Merging //UE4/Dev-Main to Dev-VR (//UE4/Dev-VR) pulling main this should get us ps4 sdk 4.508 Change 3379938 on 2017/04/04 by Ryan.Vance #jira UE-43548 If stereo layers are not being used, don't setup overlay targets as we will never clear/initialize them. The clear happens as part of the default layers PostRenderView_RenderThread call which wont be called if layers aren't being used in the scene. Change 3381519 on 2017/04/05 by Jeff.Fisher UEVR-733 PS4 sdk 4.500 hmd connection api changes break hmd connect. -Handling failure of sceHmdGetDeviceInformation if the hmd is powered off. It now returns an error code about an invalid handle in that case, rather than reporting unready. We just treat the error code like an unready status. #jira UEVR-733 #review-3384107 Change 3382019 on 2017/04/05 by Ryan.Vance Linux: add Vulkan support from dev editor: 3381593 Change 3382021 on 2017/04/05 by Ryan.Vance SteamVR on Linux using Vulkan OpenVR rev to 1_0_6 PR #3412: [GNUX] Initial support for SteamVR using Vulkan on GNUX platform. (Contributed by yaakuro) Change 3382076 on 2017/04/05 by Ryan.Vance Fixing linux steamvr lib path. It changed to something less silly in 1.0.6 Removing the steamvr plugin from the white list for linux. It's looking for a runtime that no one will have installed. Change 3383237 on 2017/04/06 by Ryan.Vance #jira UE-43732 Fixing Android compile issues. We can't wrap portions of a macro with a definie. This should probably be some sort of recursive macro thing since there's so much overlap. Good enough for now. Change 3383353 on 2017/04/06 by Ryan.Vance Fixing include cycles. Change 3383509 on 2017/04/06 by Jeff.Fisher Merging //UE4/Dev-Main to Dev-VR (//UE4/Dev-VR) merging the stuff from dev-mobile [CL 3384106 by Ryan Vance in Main branch]
2017-04-06 22:03:51 -04:00
// Calculate a view matrix that only adjusts for eye position, ignoring head position, orientation and world position.
Copying //UE4/Dev-VR to //UE4/Dev-Main (Source: //UE4/Dev-VR @ 3636795) #lockdown Nick.Penwarden ============================ MAJOR FEATURES & CHANGES ============================ Change 2932765 by Nick.Whiting Merging updated license files for Oculus libraries Change 3480552 by Dustin.Holmes Added map and gamemode for calibration #jira UEVR-808 Change 3502253 by Nick.Whiting Trying to fix up p4's botch of the merge Change 3513736 by Keli.Hlodversson Move duplicated late update code into a common FLateUpdateManager #jira UEVR-893 Change 3514798 by Mike.Beach #4.17 Exposing a way for Blueprint users to remap the SteamVR controller's d-pad buttons (clashes with the Oculus mappings). #jira UE-42634 Change 3516042 by Dustin.Holmes Runtime handedness changes in Vive controllers are now reflected when a new device is connected. Device mappings are also reset when a device disconnects, so that if it connects again it fully reregisters instead of just assuming the role it previously had. Change 3517781 by Keli.Hlodversson Remove unused local variable bUseCustomPresentTexture Change 3517951 by Mike.Beach #4.17 Guarding against dereferencing a null pointer. Defaulting to the identity when we don't (yet) have a valid head pose to use. #jira UE-43685 Change 3518142 by Mike.Beach #4.17 Resolving fallout from bad merge (CL 3514868) - checking for teminating null in array (which was added to keep ARRAY_COUNT from acting on an empty array). Change 3523183 by Ryan.Vance #jira UE-46493, UEVR-661 Fixes GearVR only displaying a black screen on startup Fixes GearVR rendering incorrectly with mobile multi-view w/o direct mode enabled Adding mobile multi-view direct support to Daydream Change 3523718 by Nick.Whiting Adding core controller recentering delegate, and moving Google over to that system. Change 3527263 by Dan.Oconnor Mirror 3526925 for Nick Donaldson Change 3533596 by Dustin.Holmes Add garbage matte map, gamemode, and blueprints. Change 3533598 by Dustin.Holmes Expose the Set Tint Color and Opacity function for Widget Components as a Blueprint node. Change 3538139 by Mike.Beach Moving Oculus debug shader directly into Oculus plugin. #jira UE-47134 Change 3543185 by Nick.Atamas Address UEVR-891 : Merge in changes to Google Tango plugin. #jira UEVR-891 Change 3543285 by Nick.Atamas Merging using //UE4/Release-4.17/... -> //UE4/Dev-VR/... : Fixed UEVR-852: Adjusted Google Tango Plugins copyright to Copyright Google 2017. Removed Apache 2.0 license. Change 3545505 by Nick.Atamas Fix UEVR-851 : some fix-ups to MeshReconHUD and overlay material now has a material parameter for tinting the reconstructed mesh to help debug visualization. Change 3547549 by Jeff.Fisher Fixing DefaultSpectatorScreenController comment. Change 3551339 by Ryan.Vance #jira UE-44947 Editor primitives we not being handled correctly with ISR. Change 3554169 by Dustin.Holmes Reconcile missed Mixed Reality blueprint Change 3566825 by Mike.Beach Fixing some bad merges from Main (fallout from CL 3566309) Change 3567143 by Mike.Beach Copying //Tasks/UE4/Dev-MixedReality to Dev-VR-Minimal (//UE4/Dev-VR-Minimal) Change 3567572 by Mike.Beach [WIP] Adding some MR plugin dependencies to keep CIS quiet (SteamVR is just temporary, and will be removed). Change 3569116 by Jeff.Fisher Mixed reality build breaks for PS4 -Module is dependent on steamvr, so don't build it for PS4. -Removed unused class that doesn't compile with clang. Change 3569362 by Mike.Beach Organizing MR plugin content, to make way for new calibration modes. Change 3572802 by Jeff.Fisher UEVR-832 Add save/load system for calibrated camera settings -Moved MixedRealityConfigurationSaveGame to c++. #review-3571779 #jira UEVR-832 Change 3573864 by Mike.Beach [WIP] Initial work on MR cam alignment controller - records point/frustum data from user input. Change 3575900 by Jeff.Fisher Vive spectator flat rect expanded to match other platforms. -The vive 'full flat eye' rect was narrower than other platforms. Expanded it to be closer to the other platforms. Change 3578684 by Mike.Beach Static analysis fixes for CIS. #jira UE-48204, UE-48203, UE-48206 Change 3579460 by Mike.Beach [WIP] New calibration mode for camera alignment. #jira UEVR-785 Change 3581232 by Mike.Beach [WIP] Saving off alignment calibration data, and loading it on initialization. We skip alignment calibration if it has been configured. #jira UEVR-832 Change 3588411 by Mike.Beach [WIP] Adding calibration for compositing (chroma color, etc.). #jira UEVR-785 Change 3588541 by Mike.Beach [WIP] Cleaning up some display issues with the MR calibration. #jira UEVR-785 Change 3588680 by Mike.Beach Re-organizing the MR content, now that the alignment controller calibrates more than just alignment (renaming, etc.). Change 3588694 by Mike.Beach Renaming the MR calibration pawn (since it doesn't do any calibrating itself). Change 3591518 by Mike.Beach Copying //Tasks/UE4/Dev-MixedReality to Dev-VR-Minimal (//UE4/Dev-VR-Minimal) Change 3591671 by Ryan.Vance Debug stereo layer support This adds an option to render the debug canvas to a stereo layer which greatly improves console and stat readability in an hmd. Change 3591812 by Ryan.Vance Don't snap motion controllers to the origin when tracking is lost. Change 3594681 by Mike.Beach [WIP] Copying //Tasks/UE4/Dev-MixedReality to Dev-VR-Minimal (//UE4/Dev-VR-Minimal) Change 3596679 by Mike.Beach CIS fix (likely fallout from CL 3591671) - changing the order of initialization to better match the order of declaration. Change 3598191 by Jeff.Fisher UEVR-807 Setup M_MRVidProcessing to use 3D garbage matte data. -Created MixedRealityGarbageMatteCaptureComponent. An instance of this is spawned by and attached to MixedRealityCaptureComponent. Saved config data is loaded into it. It spawns a garbage matte actor. It then captures the garbage matte actor into a render target (which is set on MixedRealityCaptureComponent). #jira UEVR-807 #review-3598179 Change 3598276 by Mike.Beach Copying //Tasks/UE4/Dev-MixedReality to Dev-VR-Minimal (//UE4/Dev-VR-Minimal) Change 3598332 by Mike.Beach Guarding against a blind cast in the SteamVRChaperone component, which can be used cross platform (can't assume SteamVR). Change 3605271 by Mike.Beach Copying //Tasks/UE4/Dev-MixedReality to Dev-VR-Minimal (//UE4/Dev-VR-Minimal) Change 3608490 by Jeff.Fisher UEVR-987 Social Screen PS4 need to go to 'mirroring' for hmd setup dialog because system dialogs are not visible in separate mode. UEVR-988 SpectatorScreen Flickering UE-47234 Spectator screen: need frame delay before assigning dynamically created rendertarget to spectator texture UE-47310 Spectator Screen: crash if you release a render target which is assigned as the spectator texture -Test level content for all of these bugs. Change 3608883 by Jeff.Fisher UEVR-807 Setup M_MRVidProcessing to use 3D garbage matte data. -Set material to use the garbage matte render target. Change 3613292 by Mike.Beach Moving header fcn decl up, under the proper interface section (for organization's sake). Change 3616943 by Nick.Whiting Updating SteamVR libraries to 1.0.9, so we can bring back macOS support Change 3616970 by Nick.Whiting Adding in steamvr visible area mesh support. Can be toggled with vr.SteamVR.UseVisibleAreaMesh Change 3617866 by Mike.Beach Updating the VR template to reflect Oculus HMD device naming that we've keyed off of in these Blueprints (when determining which VR system we're running on). Change 3620108 by Mike.Beach [WIP] Adding an intermediate calibration step to tweak the MR virtual cam's alignment. Change 3620982 by Mike.Beach Tying off some loose ends with the MR calibration map: * Saving after each calibration phase * Fixing blocked input from garbage matte creation * Blocking input handling while exiting/previewing * Adding minimum radius for random screen pt Change 3621551 by Mike.Beach [MR] Leveraging camera support in the new media framework - working for limited cameras in calibration. Change 3621552 by Mike.Beach [MR calibration] - fixing it so when you first switch into compoisiting calibration it updates the property readout. Change 3621660 by Mike.Beach [MR calibration] Cleaning up how we display text (adding a struct to wrap the coresponding properties). Change 3623323 by Dustin.Holmes Fix buffer overflow when using 5+ Vive generic trackers and add more Special hand designations to cover the maximum 11 trackers Vive supports Change 3625900 by Keli.Hlodversson Remove fixed 16:9 aspect ratio for SteamVR and Oculus splash screens. Oculus was already fixed in CL#3413801, but regressed with plugin renaming and unificiation with GearVR in CL#3502152. #jira UE-40220 StereoLayer splash layers are hardcoded to 8 by 4.5 meters (16:9 aspect ratio) Change 3628409 by Mike.Beach Speculative CIS fix. #jira UE-49339 Change 3628440 by Nick.Whiting Fix for SteamVR OSX build issues Change 3628489 by Nick.Whiting Fix for win32 build break Change 3629045 by Mike.Beach Shadowed variable name fix (CIS). Change 3629202 by Arciel.Rekman Copying //UE4/Partner-Valve@3629179 to Dev-VR (//UE4/Dev-VR) Change 3629340 by Nick.Atamas Unshelved and resolved changes from Oculus. Change 3629772 by Ryan.Vance Fixing Oculus Vulkan related compile issues. This will break Oculus Vulkan support, but the code needs to be refactored anyway. Change 3629833 by Mike.Beach Fixing up CIS warning introduced by Oculus 1.17 changes - "unsafe conversion" warning #jira UE-49376 Change 3630696 by Jeff.Fisher UE-49415 //UE4/Dev-VR: Incremental UE4Editor Win64 completed with errors - 5 Errors Switching an include to a forward declaration -Not sure why the previous version didn't compile on the build machine, but fewer dependencies is good. Change 3630783 by Mike.Beach Fixing CIS compiler failures for our vehicle templates. #jira UE-49417 Change 3630802 by Mike.Beach Better fix than 3630783 - updating the vehicle template's stereoscopic check (fixing the VehicleHud.cpp logic as well) #jira UE-49417 Change 3630870 by Mike.Beach Pragma'ing out a function pointer cast warning. Good warning, but I figure we know what we're doing here and there's no other way around it. #jira UE-49376 Change 3630993 by Ryan.Vance Check to ensure we have a valid third camera before trying to use it. We could check >= 3 or if the left and right cameras are left/right stereo etc. decided to go with the simple test for now. Change 3631322 by Jeff.Fisher UEVR-909 PIP in Garbage Matte -Added ExternalGarbageMatteActor to MixedRealityGarbageMatteCaptureComponent and exposed it to blueprint though MixedRealityCaptureComponent. This lets us switch from using the normal mixed reality component save/load garbage matte data and instead use an external actor, in this case the actor we use to setup the garbage matte. Then the mask is able to capture that actor live as it is edited. -Also implemented GetViewOwner() so that we can use SetOwnerOnlySee to prevent other cameras and captures from seeing the garbage matte actor. -Calibration level now uses the external garbage matte actor to let the garbate matte mask live update. It also does a picture-in-picture preview of the mixed reality scene. 'P' can show/hide the garbage matte actor on that PIP preview. -Added SetUnmaskedPixelHighlightColor to MixedRealityCaptureComponent and the material. With this one can make unmasked video pixels more obvious in the output. The calibration level has this mapped to shift-P and makes pixels bright yellow to white. -Added blueprint to calibration level to make the garbage matte actor visible in the mixed reality capture. That is bound to ctrl-g. -GarbageMatteActors spawned by the mixed reality capture component are now attached to the vr origin. The calibration level now saves garbage matte mesh transforms relative to the vr origin. -The garbage matte mesh is now plugin content, and is referenced in the mixedrealitycomponent default object, so it is cooked in any project that includes the plugin. -Fog and AtmosphericFog no longer affect the garbage matte mask capture... there may be other things we need to turn off there. #review-3618345 #jira UEVR-909 Change 3631362 by Keli.Hlodversson #jira UE-49418 Exiting Google Instant Preview displays half of the editor viewport as black. Note convoluted fix: passing bIsStereoScopic3D to IsActiveThisFrame. ISceneViewExtension code cannot rely on StereoRenderingDevice->IsStereoEnabled to know whether to render in stereo, as the current viewport widget may disable it. This was not a problem before the refactoring, as HMD-related viewextensions were only added to the active list after establishing that stereo indeed was enabled and allowed by the current view port widget. Change 3631887 by Jeff.Fisher Fixing IsActiveThisFrame build break. Change 3632206 by Nick.Atamas Fix for UE-49413. Registering FOculusHMD as an extensions the same way as others: now creates an XRCamera that passes all the calls back to the HMD. Change 3632264 by Nick.Whiting Fix for Vive rendering getting cropped off due to invalid subrect values being submitted to the compositor. Change 3632340 by Nick.Atamas Merged in change from Loren; opted for our solution to ViewExtensions instead of the one in the changelist. Original description below. Change 3632214 by Loren.McQuade@Loren.McQuade_Dev-VR on 2017/09/07 19:51:29 *pending* [Dev-VR] Added OculusHMD_SceneViewExtension, PlayerPosition/PlayerOrientation values, FOculusHMD::GetRelativeEyePose cross-eyed madness (CL 3631541, 3631687) Change 3632353 by Ryan.Vance #jira UE-49468 Don't apply xr camera rotation on the player controller when not using xr tracking. Change 3632735 by Keli.Hlodversson Better fix for #jira UE-49413. Revert oculus xr camera code and use that one can have more than one view extension registered instead. Use GetPriority to have the OculusHMD view extension code execute after the default xr camera. The xr camera subclass did not forward the calls to ISceneViewExtension to the parent, breaking various functionality such as late update. Fixes a crash when entering VR pie twice, back to back. Change 3632752 by Keli.Hlodversson Applying change 3632592 by Loren.McQuade@Loren.McQuade_Dev-VR_Branch on 2017/09/08 02:08:22 [Dev-VR] Push //UE4/Partner-Oculus@3632591 #rb merge //UE4/Partner-Oculus to //UE4/Dev-VR/... Reverted OculusHMD_XRCamera changes, as that clas has been removed in the interim. Change 3633211 by Mike.Beach Backing out Oculus MotionController hiding that accidently got submitted - we decided not to adopt this change originally. Change 3633315 by Jeff.Fisher merge from main with dev-platform problem children -expecting SDRBackBuffer stuff to be wrong. Change 3634006 by Mike.Beach Resurecting Oculus clip plane settings which got dropped in the IXR refactor. #jira UE-49520 Change 3634639 by Keli.Hlodversson Avoid include cycle https://ec-01.epicgames.net/commander/link/jobStepDetails/jobSteps/68863219?stepName=UE4Editor%20Static%20Analysis%20Win64%20%28IncludeTool%29&jobId=7995809&jobName=UE4%20Dev-VR%20-%20CL%203632752%20-%20Nightly%20Build&tabGroup=diagnosticHeader&firstPage=1 Change 3634641 by Jeff.Fisher UE-49535 Lighting is blown out when playing in VR Preview on Vive -Need pixel format to be PF_B8G8R8A8 for vr, now the plugins all build their render target and use that format. #review-3634623 Change 3634682 by Jeff.Fisher IHeadMountedDisplay forward declarations needed. Change 3634690 by Ryan.Vance We can't override the screen percentage when rendering for stereo #jira UE-49287 Change 3635970 by Keli.Hlodversson #jira UE-49563 Crash while opening QA-Game Referencing SharedPointer.h Verify that StereoRendering is valid before calling IsStereoEnabled() Change 3635979 by Mike.Beach CIS static analysis fix - checking a ptr for null before we use it. #jira UE-49531 Change 3636059 by Mike.Beach Fixing XR system name aliasing for the -hmd command. [CL 3638830 by Ryan Vance in Main branch]
2017-09-12 11:27:30 -04:00
FVector EyeShift;
FQuat EyeOrientation;
HMDDevice->GetRelativeEyePose(IXRTrackingSystem::HMDDeviceId, InView.StereoViewIndex, EyeOrientation, EyeShift);
Copying //UE4/Dev-VR to //UE4/Dev-Main (Source: //UE4/Dev-VR @ 3636795) #lockdown Nick.Penwarden ============================ MAJOR FEATURES & CHANGES ============================ Change 2932765 by Nick.Whiting Merging updated license files for Oculus libraries Change 3480552 by Dustin.Holmes Added map and gamemode for calibration #jira UEVR-808 Change 3502253 by Nick.Whiting Trying to fix up p4's botch of the merge Change 3513736 by Keli.Hlodversson Move duplicated late update code into a common FLateUpdateManager #jira UEVR-893 Change 3514798 by Mike.Beach #4.17 Exposing a way for Blueprint users to remap the SteamVR controller's d-pad buttons (clashes with the Oculus mappings). #jira UE-42634 Change 3516042 by Dustin.Holmes Runtime handedness changes in Vive controllers are now reflected when a new device is connected. Device mappings are also reset when a device disconnects, so that if it connects again it fully reregisters instead of just assuming the role it previously had. Change 3517781 by Keli.Hlodversson Remove unused local variable bUseCustomPresentTexture Change 3517951 by Mike.Beach #4.17 Guarding against dereferencing a null pointer. Defaulting to the identity when we don't (yet) have a valid head pose to use. #jira UE-43685 Change 3518142 by Mike.Beach #4.17 Resolving fallout from bad merge (CL 3514868) - checking for teminating null in array (which was added to keep ARRAY_COUNT from acting on an empty array). Change 3523183 by Ryan.Vance #jira UE-46493, UEVR-661 Fixes GearVR only displaying a black screen on startup Fixes GearVR rendering incorrectly with mobile multi-view w/o direct mode enabled Adding mobile multi-view direct support to Daydream Change 3523718 by Nick.Whiting Adding core controller recentering delegate, and moving Google over to that system. Change 3527263 by Dan.Oconnor Mirror 3526925 for Nick Donaldson Change 3533596 by Dustin.Holmes Add garbage matte map, gamemode, and blueprints. Change 3533598 by Dustin.Holmes Expose the Set Tint Color and Opacity function for Widget Components as a Blueprint node. Change 3538139 by Mike.Beach Moving Oculus debug shader directly into Oculus plugin. #jira UE-47134 Change 3543185 by Nick.Atamas Address UEVR-891 : Merge in changes to Google Tango plugin. #jira UEVR-891 Change 3543285 by Nick.Atamas Merging using //UE4/Release-4.17/... -> //UE4/Dev-VR/... : Fixed UEVR-852: Adjusted Google Tango Plugins copyright to Copyright Google 2017. Removed Apache 2.0 license. Change 3545505 by Nick.Atamas Fix UEVR-851 : some fix-ups to MeshReconHUD and overlay material now has a material parameter for tinting the reconstructed mesh to help debug visualization. Change 3547549 by Jeff.Fisher Fixing DefaultSpectatorScreenController comment. Change 3551339 by Ryan.Vance #jira UE-44947 Editor primitives we not being handled correctly with ISR. Change 3554169 by Dustin.Holmes Reconcile missed Mixed Reality blueprint Change 3566825 by Mike.Beach Fixing some bad merges from Main (fallout from CL 3566309) Change 3567143 by Mike.Beach Copying //Tasks/UE4/Dev-MixedReality to Dev-VR-Minimal (//UE4/Dev-VR-Minimal) Change 3567572 by Mike.Beach [WIP] Adding some MR plugin dependencies to keep CIS quiet (SteamVR is just temporary, and will be removed). Change 3569116 by Jeff.Fisher Mixed reality build breaks for PS4 -Module is dependent on steamvr, so don't build it for PS4. -Removed unused class that doesn't compile with clang. Change 3569362 by Mike.Beach Organizing MR plugin content, to make way for new calibration modes. Change 3572802 by Jeff.Fisher UEVR-832 Add save/load system for calibrated camera settings -Moved MixedRealityConfigurationSaveGame to c++. #review-3571779 #jira UEVR-832 Change 3573864 by Mike.Beach [WIP] Initial work on MR cam alignment controller - records point/frustum data from user input. Change 3575900 by Jeff.Fisher Vive spectator flat rect expanded to match other platforms. -The vive 'full flat eye' rect was narrower than other platforms. Expanded it to be closer to the other platforms. Change 3578684 by Mike.Beach Static analysis fixes for CIS. #jira UE-48204, UE-48203, UE-48206 Change 3579460 by Mike.Beach [WIP] New calibration mode for camera alignment. #jira UEVR-785 Change 3581232 by Mike.Beach [WIP] Saving off alignment calibration data, and loading it on initialization. We skip alignment calibration if it has been configured. #jira UEVR-832 Change 3588411 by Mike.Beach [WIP] Adding calibration for compositing (chroma color, etc.). #jira UEVR-785 Change 3588541 by Mike.Beach [WIP] Cleaning up some display issues with the MR calibration. #jira UEVR-785 Change 3588680 by Mike.Beach Re-organizing the MR content, now that the alignment controller calibrates more than just alignment (renaming, etc.). Change 3588694 by Mike.Beach Renaming the MR calibration pawn (since it doesn't do any calibrating itself). Change 3591518 by Mike.Beach Copying //Tasks/UE4/Dev-MixedReality to Dev-VR-Minimal (//UE4/Dev-VR-Minimal) Change 3591671 by Ryan.Vance Debug stereo layer support This adds an option to render the debug canvas to a stereo layer which greatly improves console and stat readability in an hmd. Change 3591812 by Ryan.Vance Don't snap motion controllers to the origin when tracking is lost. Change 3594681 by Mike.Beach [WIP] Copying //Tasks/UE4/Dev-MixedReality to Dev-VR-Minimal (//UE4/Dev-VR-Minimal) Change 3596679 by Mike.Beach CIS fix (likely fallout from CL 3591671) - changing the order of initialization to better match the order of declaration. Change 3598191 by Jeff.Fisher UEVR-807 Setup M_MRVidProcessing to use 3D garbage matte data. -Created MixedRealityGarbageMatteCaptureComponent. An instance of this is spawned by and attached to MixedRealityCaptureComponent. Saved config data is loaded into it. It spawns a garbage matte actor. It then captures the garbage matte actor into a render target (which is set on MixedRealityCaptureComponent). #jira UEVR-807 #review-3598179 Change 3598276 by Mike.Beach Copying //Tasks/UE4/Dev-MixedReality to Dev-VR-Minimal (//UE4/Dev-VR-Minimal) Change 3598332 by Mike.Beach Guarding against a blind cast in the SteamVRChaperone component, which can be used cross platform (can't assume SteamVR). Change 3605271 by Mike.Beach Copying //Tasks/UE4/Dev-MixedReality to Dev-VR-Minimal (//UE4/Dev-VR-Minimal) Change 3608490 by Jeff.Fisher UEVR-987 Social Screen PS4 need to go to 'mirroring' for hmd setup dialog because system dialogs are not visible in separate mode. UEVR-988 SpectatorScreen Flickering UE-47234 Spectator screen: need frame delay before assigning dynamically created rendertarget to spectator texture UE-47310 Spectator Screen: crash if you release a render target which is assigned as the spectator texture -Test level content for all of these bugs. Change 3608883 by Jeff.Fisher UEVR-807 Setup M_MRVidProcessing to use 3D garbage matte data. -Set material to use the garbage matte render target. Change 3613292 by Mike.Beach Moving header fcn decl up, under the proper interface section (for organization's sake). Change 3616943 by Nick.Whiting Updating SteamVR libraries to 1.0.9, so we can bring back macOS support Change 3616970 by Nick.Whiting Adding in steamvr visible area mesh support. Can be toggled with vr.SteamVR.UseVisibleAreaMesh Change 3617866 by Mike.Beach Updating the VR template to reflect Oculus HMD device naming that we've keyed off of in these Blueprints (when determining which VR system we're running on). Change 3620108 by Mike.Beach [WIP] Adding an intermediate calibration step to tweak the MR virtual cam's alignment. Change 3620982 by Mike.Beach Tying off some loose ends with the MR calibration map: * Saving after each calibration phase * Fixing blocked input from garbage matte creation * Blocking input handling while exiting/previewing * Adding minimum radius for random screen pt Change 3621551 by Mike.Beach [MR] Leveraging camera support in the new media framework - working for limited cameras in calibration. Change 3621552 by Mike.Beach [MR calibration] - fixing it so when you first switch into compoisiting calibration it updates the property readout. Change 3621660 by Mike.Beach [MR calibration] Cleaning up how we display text (adding a struct to wrap the coresponding properties). Change 3623323 by Dustin.Holmes Fix buffer overflow when using 5+ Vive generic trackers and add more Special hand designations to cover the maximum 11 trackers Vive supports Change 3625900 by Keli.Hlodversson Remove fixed 16:9 aspect ratio for SteamVR and Oculus splash screens. Oculus was already fixed in CL#3413801, but regressed with plugin renaming and unificiation with GearVR in CL#3502152. #jira UE-40220 StereoLayer splash layers are hardcoded to 8 by 4.5 meters (16:9 aspect ratio) Change 3628409 by Mike.Beach Speculative CIS fix. #jira UE-49339 Change 3628440 by Nick.Whiting Fix for SteamVR OSX build issues Change 3628489 by Nick.Whiting Fix for win32 build break Change 3629045 by Mike.Beach Shadowed variable name fix (CIS). Change 3629202 by Arciel.Rekman Copying //UE4/Partner-Valve@3629179 to Dev-VR (//UE4/Dev-VR) Change 3629340 by Nick.Atamas Unshelved and resolved changes from Oculus. Change 3629772 by Ryan.Vance Fixing Oculus Vulkan related compile issues. This will break Oculus Vulkan support, but the code needs to be refactored anyway. Change 3629833 by Mike.Beach Fixing up CIS warning introduced by Oculus 1.17 changes - "unsafe conversion" warning #jira UE-49376 Change 3630696 by Jeff.Fisher UE-49415 //UE4/Dev-VR: Incremental UE4Editor Win64 completed with errors - 5 Errors Switching an include to a forward declaration -Not sure why the previous version didn't compile on the build machine, but fewer dependencies is good. Change 3630783 by Mike.Beach Fixing CIS compiler failures for our vehicle templates. #jira UE-49417 Change 3630802 by Mike.Beach Better fix than 3630783 - updating the vehicle template's stereoscopic check (fixing the VehicleHud.cpp logic as well) #jira UE-49417 Change 3630870 by Mike.Beach Pragma'ing out a function pointer cast warning. Good warning, but I figure we know what we're doing here and there's no other way around it. #jira UE-49376 Change 3630993 by Ryan.Vance Check to ensure we have a valid third camera before trying to use it. We could check >= 3 or if the left and right cameras are left/right stereo etc. decided to go with the simple test for now. Change 3631322 by Jeff.Fisher UEVR-909 PIP in Garbage Matte -Added ExternalGarbageMatteActor to MixedRealityGarbageMatteCaptureComponent and exposed it to blueprint though MixedRealityCaptureComponent. This lets us switch from using the normal mixed reality component save/load garbage matte data and instead use an external actor, in this case the actor we use to setup the garbage matte. Then the mask is able to capture that actor live as it is edited. -Also implemented GetViewOwner() so that we can use SetOwnerOnlySee to prevent other cameras and captures from seeing the garbage matte actor. -Calibration level now uses the external garbage matte actor to let the garbate matte mask live update. It also does a picture-in-picture preview of the mixed reality scene. 'P' can show/hide the garbage matte actor on that PIP preview. -Added SetUnmaskedPixelHighlightColor to MixedRealityCaptureComponent and the material. With this one can make unmasked video pixels more obvious in the output. The calibration level has this mapped to shift-P and makes pixels bright yellow to white. -Added blueprint to calibration level to make the garbage matte actor visible in the mixed reality capture. That is bound to ctrl-g. -GarbageMatteActors spawned by the mixed reality capture component are now attached to the vr origin. The calibration level now saves garbage matte mesh transforms relative to the vr origin. -The garbage matte mesh is now plugin content, and is referenced in the mixedrealitycomponent default object, so it is cooked in any project that includes the plugin. -Fog and AtmosphericFog no longer affect the garbage matte mask capture... there may be other things we need to turn off there. #review-3618345 #jira UEVR-909 Change 3631362 by Keli.Hlodversson #jira UE-49418 Exiting Google Instant Preview displays half of the editor viewport as black. Note convoluted fix: passing bIsStereoScopic3D to IsActiveThisFrame. ISceneViewExtension code cannot rely on StereoRenderingDevice->IsStereoEnabled to know whether to render in stereo, as the current viewport widget may disable it. This was not a problem before the refactoring, as HMD-related viewextensions were only added to the active list after establishing that stereo indeed was enabled and allowed by the current view port widget. Change 3631887 by Jeff.Fisher Fixing IsActiveThisFrame build break. Change 3632206 by Nick.Atamas Fix for UE-49413. Registering FOculusHMD as an extensions the same way as others: now creates an XRCamera that passes all the calls back to the HMD. Change 3632264 by Nick.Whiting Fix for Vive rendering getting cropped off due to invalid subrect values being submitted to the compositor. Change 3632340 by Nick.Atamas Merged in change from Loren; opted for our solution to ViewExtensions instead of the one in the changelist. Original description below. Change 3632214 by Loren.McQuade@Loren.McQuade_Dev-VR on 2017/09/07 19:51:29 *pending* [Dev-VR] Added OculusHMD_SceneViewExtension, PlayerPosition/PlayerOrientation values, FOculusHMD::GetRelativeEyePose cross-eyed madness (CL 3631541, 3631687) Change 3632353 by Ryan.Vance #jira UE-49468 Don't apply xr camera rotation on the player controller when not using xr tracking. Change 3632735 by Keli.Hlodversson Better fix for #jira UE-49413. Revert oculus xr camera code and use that one can have more than one view extension registered instead. Use GetPriority to have the OculusHMD view extension code execute after the default xr camera. The xr camera subclass did not forward the calls to ISceneViewExtension to the parent, breaking various functionality such as late update. Fixes a crash when entering VR pie twice, back to back. Change 3632752 by Keli.Hlodversson Applying change 3632592 by Loren.McQuade@Loren.McQuade_Dev-VR_Branch on 2017/09/08 02:08:22 [Dev-VR] Push //UE4/Partner-Oculus@3632591 #rb merge //UE4/Partner-Oculus to //UE4/Dev-VR/... Reverted OculusHMD_XRCamera changes, as that clas has been removed in the interim. Change 3633211 by Mike.Beach Backing out Oculus MotionController hiding that accidently got submitted - we decided not to adopt this change originally. Change 3633315 by Jeff.Fisher merge from main with dev-platform problem children -expecting SDRBackBuffer stuff to be wrong. Change 3634006 by Mike.Beach Resurecting Oculus clip plane settings which got dropped in the IXR refactor. #jira UE-49520 Change 3634639 by Keli.Hlodversson Avoid include cycle https://ec-01.epicgames.net/commander/link/jobStepDetails/jobSteps/68863219?stepName=UE4Editor%20Static%20Analysis%20Win64%20%28IncludeTool%29&jobId=7995809&jobName=UE4%20Dev-VR%20-%20CL%203632752%20-%20Nightly%20Build&tabGroup=diagnosticHeader&firstPage=1 Change 3634641 by Jeff.Fisher UE-49535 Lighting is blown out when playing in VR Preview on Vive -Need pixel format to be PF_B8G8R8A8 for vr, now the plugins all build their render target and use that format. #review-3634623 Change 3634682 by Jeff.Fisher IHeadMountedDisplay forward declarations needed. Change 3634690 by Ryan.Vance We can't override the screen percentage when rendering for stereo #jira UE-49287 Change 3635970 by Keli.Hlodversson #jira UE-49563 Crash while opening QA-Game Referencing SharedPointer.h Verify that StereoRendering is valid before calling IsStereoEnabled() Change 3635979 by Mike.Beach CIS static analysis fix - checking a ptr for null before we use it. #jira UE-49531 Change 3636059 by Mike.Beach Fixing XR system name aliasing for the -hmd command. [CL 3638830 by Ryan Vance in Main branch]
2017-09-12 11:27:30 -04:00
FMatrix EyeMatrix = FTranslationMatrix(-EyeShift) * FInverseRotationMatrix(EyeOrientation.Rotator()) * FMatrix(
Copying //UE4/Dev-VR to //UE4/Dev-Main (Source: //UE4/Dev-VR @ 3383750) #lockdown Nick.Penwarden ========================== MAJOR FEATURES + CHANGES ========================== Change 3012064 on 2016/06/13 by Nick.Whiting Merging Main -> DevVR Change 3048060 on 2016/07/13 by Nick.Whiting Integrating CL 3045721 from //depot/Partners/Google/AndroidVR-DevVR Upgrade Android and iOS GVR SDK to the latest. Fix the flipped vignette issue when using Unreal's post processing distortion. Change the Daydream & Cardboard mode to use scanline racing. Deprecate the ability to turn off individual UI elements. Change 3235307 on 2016/12/14 by Keli.Hlodversson Filter out excluded HMD modules during FEngineLoop:PreInitHMDDevice. The final selection still happens in UEngine::InitializeHMDDevice as all HMD plugins have not been loaded during PreInit Change 3235308 on 2016/12/14 by Ryan.Vance #jira UEVR-478 Monoscopic far field improvements Shader changes are now gated behind the read only cvar vr.MonoscopicFarField. Changing this requires a shader compile. Moved the mono rendering mode to the cvar vr.MonoscopicFarFieldMode. This is writable, so users can enable/disable mono rendering on the fly if the above cvar is enabled. Only write to the alpha channel in the mobile base pass if the object is opaque and MONOSCOPIC_FAR_FIELD is defined. Addressed code review comments. Change 3235397 on 2016/12/14 by Keli.Hlodversson [Oculus] Only enable GearVR platform on Windows if Oculus service is running Original author: Loren.McQuade Change 3235762 on 2016/12/14 by Keli.Hlodversson Add explicit parentheses to placate the build bots. Change 3242318 on 2016/12/21 by Ryan.Vance Working around pixel density crash. Change 3242522 on 2016/12/21 by Ryan.Vance Missing flag clear so our adaptive test was always returning true. Change 3243173 on 2016/12/22 by Ryan.Vance Integrating post present callback implementation from 4.14.1 Change 3248633 on 2017/01/05 by Keli.Hlodversson Copying //Tasks/UE4/Dev-VR-Refactoring to Dev-VR-Minimal (//UE4/Dev-VR-Minimal) Change 3248723 on 2017/01/05 by Keli.Hlodversson Fix after merge. EnablePositionalTracking no longer exists. Change 3249484 on 2017/01/06 by Keli.Hlodversson Add missing includes Change 3249714 on 2017/01/06 by Keli.Hlodversson Remove monolithic header include Change 3249980 on 2017/01/06 by Keli.Hlodversson SteamVR: Remove leftover unused WindowMirrorMode member variable Change 3252432 on 2017/01/10 by Keli.Hlodversson Submitting change by Loren McQuade to fix monolithic builds. Unshelved from pending changelist '3251436': Change 3257373 on 2017/01/13 by Keli.Hlodversson #jira UEVR-411: Finish renaming/removing/remodelling the remaining Oculus (Rift+GearVR) commands #jira UEVR-412: Rename and merge remaining Morpheus console commands #jira UEVR-417: Remove Exec from IHeadMountedDisplay Change 3269971 on 2017/01/24 by Jeff.Fisher UEVR-498 move controller is missing world to meters UEVR-522 PS4 motion controller worldscale support. -Passing world to meters scale into getControllerOrientationAndPosition because the thing asking about it ought to be part of a world, and know what it should be. This also avoids making PS4 motion controllers dependent on the HMD. Note Google VR Controller doesn't do position, so doesnt' care about scale. Oculus already had internal threadsafe tracking of world scale, so I left that. Steam handles world scale below our input level. -Also adding PlayerIndex member to FSceneView so we can figure out which view the MotionControllerComponent should get its worldscale from for the late render thread update. #jira UEVR-498 #review-3384107 Change 3288308 on 2017/02/06 by Jeff.Fisher UEVR-517 Detect MotionController Connectivity -PS4 can only track 2 controllers and 1 hmd. Support for dealing with that is needed. -Also need to support multiple motion controller components mapped to a single controller. Licencees have done that before. -Created a new interface IMotionTrackingSystemManagement, and implements it for PS4Tracker on PS4. -Created a MotionTrackedDeviceFunctionLibrary to expose that interface to blueprint. -With those one can enable and disable tracking on ps4 controllers and query their state to stay within the controller tracking limit. -PS4Tracker also keeps a blackboard of the enable/disable state so that one can enable or disable controllers that have not been connected yet, and have them enable tracking or not when they are connected. -DS4 controller no longer jumps back to 000 if it loses tracking. #review-3384107 #jira UEVR-517 Change 3288309 on 2017/02/06 by Keli.Hlodversson Add file missing from CL#3257373. Change 3288311 on 2017/02/06 by Jeff.Fisher UEVR-517 Detect MotionController Connectivity - Test content. -tm-motionControllers has a third mode where all playstation motion controllers for player 0 are availalbe. You can toggle them to track or not with ctrl-P,G,L,R for pad, gun, leftmove, rightmove or with alt-P,G,L,R. Ctrl tests doing so via MotionControllerComponent. Alt tests doing so by player index and controller type enum. -ctrl-A disables tracking of all controllers -alt-A disables tracking of all controllers for player 0 -ctrl-D toggles enabling new controllers by default -Also fixed one button not working in one of the other test modes for the Aim (gun) controller. -The controller 'models' have an arrow out the front. It is black if disabled. Red if enabled, but no tracker is active, yellow if tracked but inertial only, and green if fully tracked by the camera. -This logic is in the QA_MoCoAll blueprint. Change 3291601 on 2017/02/07 by Jeff.Fisher UEVR-536 PSVR motion controller tracking problem with multiple controllers -Previous code called GetRelativeTransform from the render thread, but the game thread could update it at any time. This caches that transform so that it can be safely used in the render thread. #jira UEVR-536 #review-3384107 @Ryan.Vance Change 3292460 on 2017/02/08 by Jeff.Fisher PS4 sceVrTrackerGetResult() error warning logging improved, and explanatory comment added. Change 3308771 on 2017/02/17 by Keli.Hlodversson Rename GoogleVR console commands #jira UEVR-412 Change 3309156 on 2017/02/17 by Keli.Hlodversson Track changes in r.ScreenPercentage on GoogleVR and set RenderTargetSize accordingly. Change 3311999 on 2017/02/20 by Keli.Hlodversson Create a default implementation for RecordAnalytics. Also create an initial stub for FHeadMountedDisplayBase for future default implementations of common HMD functionality. Make implementing IHeadMountedDisplay::GetDeviceName mandatory instead of defaulting to "Unknown" #jira UE-21878 #jira UEVR-213 Change 3313467 on 2017/02/20 by Ryan.Vance #jira UE-41604 3278583 pCustomPresent->AllocateRenderTargetTexture may return false, if we blindly return true we can end up with an invalid render target since the fall back sceneviewport will be skipped. 3278536 Adding ovrError_NoHmd to our sanity check in OnStartGameFrame. Change 3314002 on 2017/02/21 by Keli.Hlodversson Fix compilation on PS4 and Linux Change 3326722 on 2017/03/01 by Jeff.Fisher Merging //UE4/Dev-Main to Dev-VR (//UE4/Dev-VR) Integrating 4.15 from main. Change 3327567 on 2017/03/01 by Jeff.Fisher UEVR-588 Oculus crash on "stereo on" when the proximity sensor is not triggered. Duplicating from Release-4.15 cl 3327481, 3327542 -Don't ovr_SubmitFrame when the layers need to be recreated. They stay dirty until rendering is unpaused. #jira UEVR-588 #review-3384107 Change 3328098 on 2017/03/01 by Jeff.Fisher 4.15 merge fixes -Fixed deprecated enum name function usage. -Fixed world scale usage in GoogleVRController. -Fixed compile break in PS4Tracker. Change 3328271 on 2017/03/01 by Jeff.Fisher 2.15 merge -restroging GoogleVRController::GetWorldToMetersScale... cause it is used everywhere. Change 3328307 on 2017/03/01 by Jeff.Fisher 4.15 merge -More googlevr worldscale fixes. Change 3328312 on 2017/03/01 by Jeff.Fisher 4.15 merge -removing 2 unused includes Change 3330610 on 2017/03/02 by Jeff.Fisher 4.15 merge -fixing linux build Change 3333952 on 2017/03/06 by Keli.Hlodversson Implement common stereo layer management base class and use it in SteamVR and PS4. Fixes an outstanding bug in SteamVR where texures are updated every frame regardles of whether the continous update flag is set or not. #jira UEVR-628 #jira UE-42555 Change 3334961 on 2017/03/07 by Keli.Hlodversson Add missing include to fix non-unity builds Change 3336200 on 2017/03/07 by Keli.Hlodversson Fix compilation issues. (https://ec-01.epicgames.net/commander/link/jobDetails/jobs/7568252?jobName=UE4+Dev-VR+-+CL+3334961+-+Nightly+Build&s=Jobs) * Pre VS2015 compilers don't like mixing wide and unmarked strings in concatenation. Unfortunately LOCTEXT hides the call to the TEXT macro, completely hinding the prefix (which only gets added to the first fragment.) * Switch apparently doesn't know how to format a size_t for analytics either. Also: Typo in backwards compatibility command name alias Change 3337347 on 2017/03/08 by Jeff.Fisher UE-42631 Stereo off while prox sensor uncovered causes low framerate -Setting maxfps appropriately on 'stereo on/off'. #review-3384107 #jira UE-42631 Change 3338385 on 2017/03/08 by Ryan.Vance r.DisableDistortion was only being used for the mobile renderer Change 3342301 on 2017/03/10 by patrickr.donovan Test updates to TM-VRSmoke. Increased lightmap resolution on QA_MeshTypes meshes to improve readbility and reliablility of tests involving said asset. Rebuilt lighting. Change 3348133 on 2017/03/15 by Ryan.Vance Moving mono cvars to scene rendering to avoid cross module references. There's not a good reason to have them in the hmd module anyway. Change 3348836 on 2017/03/15 by Ryan.Vance Direct multi-view support for gear vr Monoscopic far field with multi-view (blit and direct) support for gear vr Support for translucent objects on both sides of the mono clip plane (due to a sorting issue, objects that straddle the plane composite incorrectly) Fixed missing discards/clears in the multi-view blit Change 3348843 on 2017/03/15 by Ryan.Vance Fixing color/depth target size mismatch when screen percentage scaling results in a size that isn't divisible by 16. Change 3349276 on 2017/03/16 by Keli.Hlodversson Fixing compile errors in GoogleVR after merge from main. Change 3350932 on 2017/03/16 by Ryan.Vance Re-enabling the gearvr plugin on windows. Change 3351977 on 2017/03/17 by Jeff.Fisher Fixing masked member variable. Change 3352314 on 2017/03/17 by Ryan.Vance We need to ensure that we don't select different lod levels for each eye. Change 3352993 on 2017/03/17 by Nick.Whiting Integrating CL 3345824 from Android-DevVR to Dev-VR. Support for device depth pass in SceneCaptureComponent2D Change 3355185 on 2017/03/20 by Nick.Whiting Added ability to disable the autoloading splash screen, which would prevent the hide splash screen node from ever working Change 3355676 on 2017/03/20 by Nick.Whiting PR #3384: [GNUX] SteamVR, OpenGL patch. (Contributed by yaakuro), with some minor modifications Change 3357286 on 2017/03/21 by Jeff.Fisher Fixing GenerateProjectFiles, looks like the .config. was removed from these references in main some time ago. Change 3357435 on 2017/03/21 by Jeff.Fisher Fixing editor build break, looks like a merge mistake. Change 3359960 on 2017/03/23 by Keli.Hlodversson Prevent potential crash when drawing tracking sensor location. Also only fetch HMD location once instead of once per tracking sensor. Change 3361230 on 2017/03/23 by Jeff.Fisher Fixing linux build opengl include problem... maybe. Change 3361638 on 2017/03/23 by Jeff.Fisher Another guess at fixing linux build. Change 3364224 on 2017/03/24 by Keli.Hlodversson Initial implementation of UEVR-576 - Base emulated layer implementation #jira UEVR-668 - Base emulated layer implementation: Initial framework for overrideable default implementation #jira UEVR-669 - Base emulated layer implementation: Face Locked Layers Support #jira UEVR-670 - Base emulated layer implementation: Tracker Locked Layers Support #jira UEVR-671 - Base emulated layer implementation: World Locked Layers Support #jira UEVR-672 - Base emulated layer implementation: Add support for optionally rendering face locked layers into a separate layer Change 3364242 on 2017/03/24 by Keli.Hlodversson SteamVR layers do not support negatve Layer priorities Change 3364263 on 2017/03/24 by Jeff.Fisher Merging //UE4/Dev-Main to Dev-VR (//UE4/Dev-VR) Monoscopicfarfieldrendering was just 'accept source', Ryan is going to look at fixing it up. Change 3364472 on 2017/03/24 by Jeff.Fisher Merge fix Change 3364475 on 2017/03/24 by Jeff.Fisher Fixing gearvr include. Change 3364486 on 2017/03/24 by Jeff.Fisher merge fix Change 3364532 on 2017/03/24 by Ryan.Vance pso update for mono rendering and stereo layers. Change 3364599 on 2017/03/24 by Ryan.Vance Oculus changes for SI1.12 Change 3365159 on 2017/03/26 by Jeff.Fisher include fix Change 3365182 on 2017/03/26 by Jeff.Fisher include fix Change 3366087 on 2017/03/27 by Ryan.Vance Remaining files from Oculus changes for SI1.12 merge request. Fixing a bug in OnlineSubsystem. Temporarily changing the eye padding change to be a shader clear to work around a clear color binding issue. Change 3366492 on 2017/03/27 by Ryan.Vance #jira UE-43294 Moved the clear before we setup state for drawing the mirror window content. It was stomping over state after the pso changes. Going to leave the shader clear in the rift prerender for clearing the eye padding for now. Change 3366929 on 2017/03/27 by Ryan.Vance Fixing compile error Change 3368549 on 2017/03/28 by Jeff.Fisher Merging Change: 3357998 from //UE4/Partner-Google-VR/Engine/... to Dev-VR Upgrade Google VR Plugin to v1.3: *Upgraded GVR NDK to 1.30.0 *Changed some BlueprintFunction to use BlueprintPure *Add the missing bDaydream flag in UEDeployAndroid.cs #review-3384107 Change 3368975 on 2017/03/28 by Ryan.Vance CIS clean up #jira UE-43428, UE-43429, UE-43426, UE-43427 Change 3369028 on 2017/03/28 by Ryan.Vance This is not exacly 'correct', but it's at least what the code was trying to do. Change 3370203 on 2017/03/29 by Ryan.Vance Adding gear vr controller component support. Change 3370918 on 2017/03/29 by Ryan.Vance Merging 3370569 using Partner-Google-VR_to_DevVR Change 3371030 on 2017/03/29 by Ryan.Vance Fixing linux build errors #jira UE-43426 Change 3371036 on 2017/03/29 by Ryan.Vance Oculus 4.16 integration. Not terribly happy with the use of std::string. They promised to clean this up for the next release. Change 3373495 on 2017/03/30 by Jeff.Fisher Merging from Dev-Main, in preparation for 4.16 Change 3373578 on 2017/03/30 by Jeff.Fisher build break, one comma short Change 3373870 on 2017/03/31 by Jeff.Fisher Include order fix. Change 3374001 on 2017/03/31 by Keli.Hlodversson Use DefaultStereoLayers as base for Morpheus implementation. #jira UEVR-709 #jira UE-42919 #rb: Jeff.Fisher Change 3374004 on 2017/03/31 by Keli.Hlodversson Fix rendering for the default Stereo Layers implementation on mobile. Depth test was set to "Never" instead of "Always" Destination texture on GLES is flipped on the Y axis, the coordinates are reversed in the shade when compiled on the relevant platforms. Change 3375125 on 2017/03/31 by Jeff.Fisher UE-43506 Ensure using VRPreview with GoogleVR -Removed the ensure, there is code in there to handle that case, and it works. #jira UE-43506 Change 3375294 on 2017/03/31 by nick.bullard Resaving Plugin content to resovle "saved with empty engine version" #jira UE-43537 Change 3375480 on 2017/03/31 by Jeff.Fisher UEVR-9 PSVR: Social Screen Support -Experimental social screen support for 4.16. -This does the basics of driving output through the Aux port in the proper format for display on the mirror monitor. -Only supports 30fps on the mirror monitor. 60fps will require the implementation of sony system dialogs to deal with incompatable system features (video streaming, remote play). -There is a project setting in Morpheus, under experiemental bEnableSocialScreenSeparateMode. This must be set to true to use this feature. When it is false we avoid allocating the back buffers. -MorpheusFunctionLibrary blueprints now have a node "SetSocialScreenMode" which can switch between SystemMirror (hardware supported mirroring), SeparateTest (alternates black and white), SeparateTexture (displays a texture, eg a render target, specified via blueprint), and SeparateMirror(puts the hmd render buffer on screen - which is both eyes, like a debug mode). -Also finally updated the bEnabled flag in project settings to tell people it's only for PC. #jira UEVR-9 #review-3384107 Change 3375540 on 2017/03/31 by Ryan.Vance #jira UE-43504 Fixing android build break when using a 64 bit isa. Change 3375655 on 2017/03/31 by Jeff.Fisher Fixing missing RGBAToYUV shader problem -This at least unblocks our process. Will revisit before zbr. Change 3375820 on 2017/04/01 by Jeff.Fisher Fixing linux build warning about HAS_MORPHEUS Change 3376050 on 2017/04/02 by Jeff.Fisher UE-43515 Step 'UE4Editor Static Analysis Win64' - Module.OnlineSubsystemOculus.cpp Warnings -Temporary fix for static analysis annotation warnings in OnlineSubsytemOculus. Longer term plan is to eliminate the use of the headers that trigger the warnings. -Just wrap all standard headers in static analysis disables. #jira UE-43515 Change 3376609 on 2017/04/03 by Jeff.Fisher Fixing rgbatoyuvshader include. Change 3377001 on 2017/04/03 by Jeff.Fisher UE-43547 Launch On PS4 fails during Run command - Missing global shader FRGBAToYUV420CS - shader c++ must be compiled so that it can be cooked for ps4. #jira UE-43547 Change 3379858 on 2017/04/04 by Jeff.Fisher Merging //UE4/Dev-Main to Dev-VR (//UE4/Dev-VR) pulling main this should get us ps4 sdk 4.508 Change 3379938 on 2017/04/04 by Ryan.Vance #jira UE-43548 If stereo layers are not being used, don't setup overlay targets as we will never clear/initialize them. The clear happens as part of the default layers PostRenderView_RenderThread call which wont be called if layers aren't being used in the scene. Change 3381519 on 2017/04/05 by Jeff.Fisher UEVR-733 PS4 sdk 4.500 hmd connection api changes break hmd connect. -Handling failure of sceHmdGetDeviceInformation if the hmd is powered off. It now returns an error code about an invalid handle in that case, rather than reporting unready. We just treat the error code like an unready status. #jira UEVR-733 #review-3384107 Change 3382019 on 2017/04/05 by Ryan.Vance Linux: add Vulkan support from dev editor: 3381593 Change 3382021 on 2017/04/05 by Ryan.Vance SteamVR on Linux using Vulkan OpenVR rev to 1_0_6 PR #3412: [GNUX] Initial support for SteamVR using Vulkan on GNUX platform. (Contributed by yaakuro) Change 3382076 on 2017/04/05 by Ryan.Vance Fixing linux steamvr lib path. It changed to something less silly in 1.0.6 Removing the steamvr plugin from the white list for linux. It's looking for a runtime that no one will have installed. Change 3383237 on 2017/04/06 by Ryan.Vance #jira UE-43732 Fixing Android compile issues. We can't wrap portions of a macro with a definie. This should probably be some sort of recursive macro thing since there's so much overlap. Good enough for now. Change 3383353 on 2017/04/06 by Ryan.Vance Fixing include cycles. Change 3383509 on 2017/04/06 by Jeff.Fisher Merging //UE4/Dev-Main to Dev-VR (//UE4/Dev-VR) merging the stuff from dev-mobile [CL 3384106 by Ryan Vance in Main branch]
2017-04-06 22:03:51 -04:00
FPlane(0, 0, 1, 0),
FPlane(1, 0, 0, 0),
FPlane(0, 1, 0, 0),
FPlane(0, 0, 0, 1));
FQuat HmdOrientation = HmdTransform.GetRotation();
FVector HmdLocation = HmdTransform.GetTranslation();
FMatrix TrackerMatrix = FTranslationMatrix(-HmdLocation) * FInverseRotationMatrix(HmdOrientation.Rotator()) * EyeMatrix;
FLayerRenderParams RenderParams{
Copying //UE4/Dev-Rendering to //UE4/Dev-Main (Source: //UE4/Dev-Rendering @ 3760894) #rb Rendering #lockdown Nick.Penwarden ============================ MAJOR FEATURES & CHANGES ============================ Change 3658809 by Chris.Bunner Changing default HDR display gamut to P3 as in practice that's more common than Rec2020, this should be a user-facing option where possible though as we can't automatically retrieve that data. Change 3658842 by Chris.Bunner Backing out previous HDR default gamut change as it conflicts with mandatory platform defaults. Change 3695269 by Arne.Schober DR - Make clang happy wreorder Change 3695418 by Guillaume.Abadie Fixes compilation failure in FoliageType_InstancedStaticMesh.cpp. Change 3695430 by Guillaume.Abadie Fixes missing BeginFrame dynamic resolution event in EngineTest. Change 3695469 by Guillaume.Abadie Fixes crash when passing down an invalid parameter on the sample material expression's DDX, DDY parameters. Change 3696091 by Guillaume.Abadie Fixes Linux compilation failure in DynamicResolution.cpp Change 3696593 by Chris.Bunner Fixed typo in vetex factory enum. Change 3696596 by Chris.Bunner Added material attributes type checking to If material expression. Updated If material expression to validate compilation of inputs. Change 3696597 by Chris.Bunner Allow visible parameter retrieval to correctly traverse through internally called functions. Previous check was intended to prevent function previews from leaving their graph through unhooked inputs, but unintentionally blocked all function inputs. Change 3696599 by Chris.Bunner Fixed material instance parameter visiblity when using nested static switches across functions. #jira UE-50878 Change 3696734 by Chris.Bunner Return type fix. Change 3697123 by Guillaume.Abadie Fixes compilation failure in PostProcessWeightedSampleSum.cpp on Windows 32bits. Change 3697125 by Guillaume.Abadie Fixes compilation failure in MaterialExpressionIf.h Change 3697127 by Guillaume.Abadie Fixes compilation failure in DynamicResolution.cpp on shipping build. Change 3697135 by Guillaume.Abadie Fixes crash in dynamic resolution event frontend when resizing game play viewport in EngineTest. Change 3697199 by Guillaume.Abadie Fixes TAA upsample's shader compilation failure on Mac. Change 3697220 by Guillaume.Abadie Makes static analysis happy again. Change 3697280 by Chris.Bunner Fixing up invalid casts in material layers validation. Change 3697366 by Rolando.Caloca DR - hlslcc - Fix warning #jira UE-43988 Change 3697451 by Rolando.Caloca DR - vk - Per pipeline descriptor pools Descriptor pool are now allocated per PSO instead of globally to reduce peak mem consumption and fragmentation Enabled on Windows only via VULKAN_USE_PER_PIPELINE_DESCRIPTOR_POOLS Change 3697477 by Rolando.Caloca DR - vk - Custom memory allocator Remove old/unused stats Change 3697486 by Rolando.Caloca DR - vk - Fix validation issue Change 3697488 by Richard.Wallis Fix for Mac editor session no longer accurately tracking Mouse location after moving between Desktops in Mission Control on 10.12.6. Problem stems from the extra call to update the slate cached window position in mouse move while dragging, which is itself is a hack but apparently this is needed as we don't get window position updates on Mac while dragging (although I couldn't see any -ve side effects without it) then the OS (in 10.12.6) doesn't always push out a final window did move notificaiton when changing desktops which leaves the window according to slate incorrectly positoned to it's frame. Solution is to either remove the mouse-move-while-drag window position hack or add a final window position update to the mouse-up event while dragging - this change is the latter. #jira UE-37553 Change 3697501 by Richard.Wallis Move audio processing over to audio bus tap. Currently on Mac Media audio playback uses OS media player mixer rather than Engine as existing implemtation, using AVAssetReader, now suffers from poor performance with new Media Framework. This audio tap version replaces that asset reader implementation but also suffers from bad quality audio hence is still disabled at the top of AvfMediaTracks.cpp. Original Code Review Description: Convert Mac to Play audio through the engine MediaFramework API rather than using AVMediaPlayer. This is the Mac implementation only - this should work ok on iOS but unable to test due to missing audio type implementation (throws error "Init Buffer on unsupported sound type name = Synth type = 5"), as such is only enabled for Mac. There maybe some extra tweaks required for iOS on app backgrounding etc if this feature is enabled. - Stuttering Audio Performace issue investiagation: Re-Tested this implementation against [now fixed] current Mac implementation which was working fine last year and that implementation now has the same audio output quality (performance) issues as this one. Basic investigation seems to point to somewhere in the engine audio handing. When poor audio is heard the FMediaAudioResampler::Generate() function is dequeing an IMediaAudioSample sample buffer and the audio sample queue usually has 50-100 of these IMediaAudioSample buffers waiting in the queue. I think the AvfMedia playback system is providing the sample buffers in good time but they are not getting consumed "fast" enough. This under consuming also occurs if I force the Core Audio - Audio Unit mixer to use 48000 samples/sec. #jira UEPLAT-1677 Change 3697517 by Richard.Wallis XCode 9.0 extra nullability specifiers required. Change 3697537 by Richard.Wallis Back out revision 23 from //UE4/Dev-Rendering/Engine/Plugins/Media/AvfMedia/Source/AvfMedia/Private/Player/AvfMediaTracks.cpp Change 3697670 by Rolando.Caloca DR - vk - Fix mapstaging surface Change 3697846 by Uriel.Doyon Allow denormalized values when converting float32 to float16. Change 3697892 by Uriel.Doyon Fix for unaligned structure elements Change 3699335 by Richard.Wallis Mac compile fix - turns out I did need these nullability specifiers here. Change 3699663 by Guillaume.Abadie Fixes time unit conversions from microseconds to milliseconds error in dynamic resolution heuristic when using GPU busy time queries. Change 3699959 by Rolando.Caloca DR - Fix barrier in the middle of render pass Change 3699969 by Rolando.Caloca DR - vk - Change dump layer location so it prints out validation ids Change 3700356 by Guillaume.Abadie Implements secondary screen percentage to be able to do TAA upsample followed spatial upscale so that the editor viewport still have same TAA upsample screen percentage range to test the content with no matter monitor's DPI. Change 3701105 by Guillaume.Abadie Ignore per view automatic mip bias on texture type other than 2d textures. #jira UE-51396 Change 3702297 by Richard.Wallis Mac compile fix for nullable specifier. Looks like Obj class using the C++ class also needs this otherwise it throws. Seems to be some kind of xcode/compiler caching bug with this stuff as it'll report the error once then on subsequent compiles say everything is ok. #jira UE-51386 Change 3702357 by Richard.Wallis Mac nullability compile fix - again. Looks like I fell foul of that xcode compile caching! #jira UE-51386 Change 3702424 by Guillaume.Abadie Fixes planar reflection from drowing themselves in their own FSceneRenderer in forward shading. #jira UE-51395 Change 3702464 by Guillaume.Abadie Fixes wrong viewport to buffer conversion of the distortion. #jira UE-51406 Change 3702819 by Guillaume.Abadie Fixes planar reflections with secondary screen percentage for HighDPI editor viewports. Change 3703732 by Guillaume.Abadie Removes unecessary check(); when there is more than 2 players with planar reflections. #jira UE-51436 Change 3704302 by Guillaume.Abadie Removes unecessary Interface suffix on new dynamic resolution related interfaces Change 3704390 by Chris.Bunner Fixed a coincidentally correct define. Change 3704730 by Rolando.Caloca DR - vk - Fix map for depth surfaces Change 3704739 by Rolando.Caloca DR - Debug label on D3D11 UAVs - Validate when running -d3debug Change 3705000 by Chris.Bunner Skip compiling opacity and opacity mask inputs on opaque surface materials. Previously the code was always added to the shader, sometimes we force opaque materials down a masked path which then calls the dormant code unintentionally. A safer fix for UE-48254. Partially reverted previous fix in CL 3608303 which removed a material instance optimization caching the overridden base properties. Change 3706065 by Guillaume.Abadie Does some renaming for primary screen percentage, and move the primary screen percentage method selection from dynamic resolution driver to FSceneView. Change 3706464 by Chris.Bunner Fixed material property translate overrides that were generating code in the wrong entry. Fixed conditions in If material expression GetInputType and IsMA check. #jira UE-51368 Change 3706641 by Chris.Bunner Missing "break" in switch statement (which unfortunately needs another bump to resolve). Change 3706642 by Guillaume.Abadie Fixes assertion failure when r.TemporalAA.EnableUpscale = 1 Change 3706650 by Gil.Gribb UE4 - UE4 - Changes from intel. Increase number of worker threads on Windows to if hyperthreads (hyperthreads √ 2) else cores √ 1 up to a max of 22 workers. Increase MAX_THREADS multiplier per bank from 22 to 26. Intel VTune ITT event annotations. Wrapped in same function as your existing CPU events and enabled with √vtune. Optimize NV cloth by consuming FVector instead of FVector4 out of the solver. Vertex buffers were using FVector all along. ~15% improvement. Optimize cloth copy to vertex buffer by adding prefetch (similar to how bones are already done). Move local to world cloth transform from CPU to GPU. When simulating lots of vertices game thread was becoming bottleneck doing matrix multiply. Add your TaskGraph task switch latency test code. Change 3706733 by Daniel.Wright Print Embree Build time Change 3706841 by Daniel.Wright EmbreeFilterFunc4 now handles masked out intersections properly Change 3707437 by Rolando.Caloca DR - vk - Android compile fix #jira UE-51474 Change 3707785 by Guillaume.Abadie Fixes viewport issue in bloom setup pass with TAA upsample. Change 3709623 by Rolando.Caloca DR - vk - Missing barrier for reading into cpu Change 3709633 by Rolando.Caloca DR - vk - Compile fix Change 3710454 by Mark.Satterthwaite Refactor the way we compile Buffer<> & RWBuffer<> types for Metal so that we can support the type-conversion semantics of HLSL/D3D. - Buffer<> types are converted to Linear Textures unless the internal type is 3-compnent or the STRONG_TYPE macro is added as a type-qualifier. Linear Textures require an MTLTexture "view" object be created around the MTLBuffer which is the backing-store and it is typically best if that buffer is marked as Private (GPU-only) memory, reading from this in the shader then uses the texture-fetch hardware to perform the format conversion on load. - RWBuffer<> & 3-compnent Buffer<> types are converted to use template functions to load/store - the implementation of which will read the format from the BufferSizes meta-table and determine which type-conversion to apply. Function-constants are used to specialise the shader where feasible to reduce branch costs (function-constants are a Metal feature that allow efficient runtime recompilation of bytecode shaders). - Buffer<> & RWBuffer<> types where the STRONG_TYPE macro is added as a type-qualifier (only does something on Metal, everywhere else it is #define'd away) are compiled as "raw" Metal buffers of the inner-type (e.g. float4 for Buffer<float4>) and the MetalRHI runtime will enforce that only SRVs/UAVs of the proper format are bound to it. This is necessary in a couple of cases (BoneMatrices, NumCulledLightsGrid, CulledLightDataGrid & ForwardLocalLightBuffer buffers) which are used in a larger number of shaders as Linear Textures have poorer performance than Buffer<>/RWBuffer<>. - Most of the complications to generating subtly different Metal code for different OS/device combinations have been factored out into ue4_stdlib.metal which acts as an extension to the Metal shader standard-library and helps simplify the MetalBackend code - particularly helpful for Buffer<>/RWBuffer<> but also texturecube_array and the SM6 wave-related intrinsics. - Reverted some of the awkward Metal-specific changes Richard.Wallis & Arne had to make to the high-level shaders as they aren't necessary anymore. - Made the existing Metal-specific changes to use uint32 for all light-grid injection buffers apply to all Metal platforms again (I had hoped that it would not be necessary anymore, but it is much faster this way). - STRONG_TYPE is actually hlslcc's "invariant" keyword applied as a type-qualifier to a Buffer<>/RWBuffer<> type - only valid when using Metal which exports this through ILanguageSpec and #define'd out for everyone else. - Old versions of iOS (anything earlier than iOS 10.3) won't be able to use this new code, so every buffer will be treated as "raw" and the MetalRHI will now properly report when something goes awry rather than it leading to mysterious rendering errors and crashes. Change 3710456 by Mark.Satterthwaite Fix the Eddie workset project generator so that Enterprise projects don't get mixed in with regular projects at the top-level because of the way Eddie combines workset groups. Change 3710457 by Mark.Satterthwaite DX11 texture formats for Mac Metal please! Change 3710480 by Mark.Satterthwaite Permit RHI thread and parallel execution in Mac -game mode again. Change 3710522 by Mark.Satterthwaite MSVC type-mismatch error fixes. Change 3710580 by Mark.Satterthwaite Alright then - if I can't use the C++11 extended string semantics I'll have to use "xxd -i" to generate a hex-dump include header from ue4_stdlib.metal instead. This can only be updated from a machine with access to the POSIX xxd command (Mac & Linux, possibly the new Linux sub-system for Win10). Change 3710616 by Mark.Satterthwaite Missing file. Change 3712972 by Guillaume.Abadie Fixes Circle DOF's negative alpha channel getting clamped to 0 in TAA pass. Change 3712979 by Guillaume.Abadie Fixes wrong RT reallocation when doing TAA upsample in editor viewports with secondary upscale. Change 3713406 by Mark.Satterthwaite Use GPU morph targets on Mac - the necessary buffer conversions will always be available there. For iOS it can only be supported if iOS 10 is the minimum OS & Metal standard so leave that on the CPU path for now. Change 3713494 by Richard.Wallis Fix for hitch when PIE unloading sublevel. PerformReachabilityAnalysisOnObjects is spawing multiple threads in Editor builds as there is an extra code path that results in Critical Section locking within a singleton type static object - this is a bottle neck for multiple threads. However they all just need to read the data not change it. Replaced FScopeLock with a Read/Write version allowing these threads to all take a read lock at the same time to reduce contention. Changed the FUObjectAnnotationDense implementation only - left the sparse implementation alone as its not currently affecting this - although we could proactivly change that too. Also tested again repro in linked bug UE-24711. #jira UE-40533 Change 3713612 by Mark.Satterthwaite Integrate LPV_STORE_INDEX_IN_HEAD_BUFFER related changes from //depot/Partners/Microsoft/UE4-MS/Engine-Fable @ 2954744 This should make Light Propagation Volumes potentially viable on non-Microsoft platforms. Change 3713623 by Mark.Satterthwaite Implement ByteAddressBuffer/RWByteAddressBuffer in hlslcc in a similar manner to StructuredBuffer/RWStructuredBuffer so that the backends don't need too much modification. Implement the necessary changes into MetalBackend to make this work for Metal. Load/Store{+2,3,4} & Atomics are supported. Counter operations are not supported and aren't likely to be. Change 3713636 by Mark.Satterthwaite Enable LPVs for Mac Metal. - Rework some multi-dimensional arrays & array-index dependent HLSL code that hlslcc simply can't cope with, the mesa-glsl compiler core is only capable of dealing with 1 dimensional arrays and array-indexing can't itself be directly dependent on the result of an array-index operation. - MetalRHI needs to ignore any SetRenderTargets call that binds nothing at all as you must bind at least one target (UAV, RT, Depth/Stencil) for it to be able to do anything sensible. - Turn on LPVs for Metal as it works now. Change 3714049 by Guillaume.Abadie Do not set screen percentage method to TAA upsample when anti aliasing method is not TAA even if there is automatic fallback in the renderer. Change 3714306 by Guillaume.Abadie Fixes assertion failure in dynamic resolution state proxy with GPU busy time queries. Change 3714714 by Mark.Satterthwaite Tweak Metal GPU identification so that it works with eGPU boxes and protoype hardware - these changes only apply to macOS 10.13 so the system as a whole remains. Change 3716104 by Mark.Satterthwaite Fix 10.12/Xcode 8 compile errors from the build-farm which is still split until Fortnite can update. Change 3716120 by Mark.Satterthwaite Silence static-analysis. Change 3716158 by Guillaume.Abadie Rewrites editor primitive compositing to support TAA upsample. This takes the oportunity to remove the manual depth testing in base pass pixel shader of editor primitives. Change 3716271 by Daniel.Wright Lightmass correctness fixes * After these changes, point, spot, directional and sky lights closely match reference renderer Mitsuba after light unit conversions * Photon density trimming intended for direct photons was affecting indirect photons as well. This caused high noise for point / spot lights with a large attenuation radius. Indirect photon density even for small lights is 5x with this change, which improves 2nd bounce quality. * Removed legacy fudge factor on point / spot light photon energy * Spotlights no longer emit based on indirect photon paths. Fixes excessive photon energy from spot lights as they were emitting outside of the cone. * Fixed photons computing one more bounce than requested. * Added an option to use the Radiosity solver for all multibounce, replacing photons. Useful as a reference but generally too much noise indoors. * Fixed visualization of photons without final gather Change 3716434 by Mark.Satterthwaite Backout the remaining change from 3632041 that is no longer necessary - this was the last of the 4.18 Metal workarounds. Change 3716491 by Chris.Bunner Fixing up an edge-case on a recent optimization. Change 3716611 by Guillaume.Abadie Allows secondary screen percentage >= 100%. Change 3716977 by Guillaume.Abadie Back out changelist 3716158 to unblock QA pass. #jira UE-51580 Change 3717111 by Arne.Schober Fixing nomalization of Morph Tangents https://udn.unrealengine.com/questions/392462/ Also implemanted batching of the dispatches which should help worst case perfomance where dispatches become too small. CalculateInverseAccumulatedWeights is not cheap and proably should be moved onto a task thread that runs as soon as the input weights are ready. Change 3717127 by Mark.Satterthwaite Fix a mismerge from the reversion of 3632041 - part of the modified code had been moved into another file and I didn't initially notice. Change 3717178 by Mark.Satterthwaite Remove useless copy-pasted expressions from glsl_type::GetByteAddressBufferInstance & force MetalBackend to relink. Apparently the previous Mac libs were mysteriously broken. #jira UE-51583 Change 3717476 by Marcus.Wassmer Fix PS4 compile. funciton local statics not allowed on PSSL Also enabled the new atomics method for LPVs for all platforms Change 3717502 by Arne.Schober DR - Compiletime option for compressed ruleset (0.02ms perf gain on PS4 and disabled by default as it limits array size to 2million entries) Change 3717601 by Arne.Schober DR - Move cycle counter into more meaningfull locations. Change 3718054 by Guillaume.Abadie Removes unecessary check() failure on secondary upscale that fires when testing raw output screen percentage method. Change 3718066 by Guillaume.Abadie Reland: Rewrites editor primitive compositing to support TAA upsample. This takes the oportunity to remove the manual depth testing in base pass pixel shader of editor primitives. Change 3718589 by Mark.Satterthwaite Console-variable to enable and disable Manual-Vertex-Fetch for Metal and fix the internal code to handle the subtle changes in behaviour for vertex-declarations so we don't explode under the Metal validation layer. MVF works on macOS, though testing did expose an error with Tessellation on Nvidia (true for MVF enabled & disabled). Change 3718633 by Guillaume.Abadie Fixes temporal instability issue of TAA upsample with secondary screen percentage. Change 3718658 by Arne.Schober DR - 25% MorphTarget Speed increase because there was a bit of cache thrashing between the waves going on. Change 3718818 by Mark.Satterthwaite Fix compilation on hlslcc - integral values are not automatically converted into comparisons with zero. Change 3719004 by Guillaume.Abadie Lets the game viewport client automatically set raw output screen percentage method when doing dynamic resolution with stereo rendering but without TAA upsample. Change 3719375 by Mark.Satterthwaite Extend mtlpp compiler testing app to support Metal tessellation compute shaders so we can send Nvidia a much simpler reproduction of their regression. Change 3720099 by Mark.Satterthwaite Make the left-hand arguments work in airdiff. Change 3720413 by Mark.Satterthwaite Support standalone compute shaders in the mtlpp compiler test app. Change 3721232 by Mark.Satterthwaite No more Metal Shader Model 4 - instead we have to have a Metal Shader Model 5 w/o Tessellation as Nvidia's shader compiler is broken on all tessellation shaders in 10.13.0 and above. There is no guarantee that they will fix this prior to 10.14 and I can't afford to disable tessellation entirely as if I do that then the AMD & Intel compilers will also regress. As there is no Shader Model 4 platform on Mac anymore I've amended the LevelEditorActions to disable the preview modes when no appropriate shader platform is available. Change 3721244 by Mark.Satterthwaite Fix incorrect enum handling for Metal features due to overflow. #jira UE-51643 Change 3721338 by Mark.Satterthwaite MIssing file from 3721232 Change 3721818 by Mark.Satterthwaite Fix the Intel vector-array-dereference workaround so that it doesn't cause the AMD compiler to explode instead. Change 3722139 by Arne.Schober DR - [UE-51602] -Fixed Typo that accidently bound the LightingInstancebuffer to the Transform one #jira UE-51602 Change 3722165 by Rolando.Caloca DR - Default -opengl to GL4 Change 3722682 by Guillaume.Abadie Fixes wrong clear color in SSR important for VR that has a HMD mesh. Change 3722766 by Rolando.Caloca DR - Fix static analysis Change 3722943 by Mark.Satterthwaite Disable the METAL_SM5_NOTESS shader platform again - I can workaround the Nvidia pipeline state compiler crash by changing the buffer address space from "constant" to "device" as we're managing to confuse the poor thing. This won't materially affect AMD or Intel as they don't care much about this, but to limit performance issues on Nvidia we only need to do this for Tessellation Compute shaders. Change 3723100 by Mark.Satterthwaite Apparently users like enabling Metal shader standards that won't work on their current OS, so don't display those that aren't going to work & display an error message before quitting rather than crashing when trying to load a project that tries to use an incompatible shader version. Change 3723121 by Mark.Satterthwaite Fix build error. Change 3723245 by Daniel.Wright Ensure for when a reflection capture upload fails due to incorrect lighting scenario level handling Reflection captures with no data use an array index of 0, instead of -1. Might avoid reading uninitialized memory on PS4. Change 3723387 by Arne.Schober DR - Metal already applies the instance and vertexoffset in the shader Change 3723393 by Mark.Satterthwaite More fixes to the mtlpp compiler test application. Change 3725258 by Guillaume.Abadie Improves fast TAA upsample shader permutation by 15% on console. Change 3725555 by Chris.Bunner [Dupliate] CL 3725548 - Fixed invalid screenpercentage value in VehicleGame sample (was setting -1 but should default to 100). This has always been broken but was recently exposed by CL 3686200. Change 3726845 by Guillaume.Abadie Exposes SvPosition to material through screen position material expression, so that material no longer have SvPosition * InvViewSize * ViewSize precision loss. #jira UE-51428 Change 3728014 by Guillaume.Abadie Uses ScreenPosition material expression's PixelPosition pin in existing engine functions to improve precision. #jira UE-51428 Change 3728053 by Richard.Wallis Duplicate CL 3727958: Crash fix when using shared material libraries. Initial shader code library offset is not zero'd so all entry offsets were garbage. Change 3728339 by Guillaume.Abadie Adds project setting for TAA upample, and officialises TAA upsampling CVar. Change 3728549 by Guillaume.Abadie CsvProfiler is pretty cool, but even better with console autocompletion for lazy developers. Change 3728752 by nick.bullard Built and re-saved QA-MeshPaint #jira UE-50978 Change 3728775 by Guillaume.Abadie Implements r.DynamicRes.ChangePercentageThreshold to stabilize primary screen percentage. Change 3729224 by Uriel.Doyon Hidden levels now keep their last build data when using lighting scenarios. Hidden levels don't affect the scene anymore volumetric lighting when not using lighting scenarios. #jira UE-40454 #jira UE-38131 Change 3729243 by Marcus.Wassmer Update Ansel to 1.4 #github 4159 #jira UE-51545 Change 3729325 by zachary.wilson Adding indirect lighting to TM-LightingChannels #jira UE-47069 Change 3729485 by zachary.wilson Fixing ambient occlusion bias on QA-LightsStationary. Removed global PPV with bad settings, also fixed the shadow on the roof. #jira UE-50972 Change 3729629 by Uriel.Doyon Fixed crash when using debug view modes. Fixed d3ddebug error when clearing quad overdraw buffer. #jira UE-51836 Change 3730053 by Guillaume.Abadie Allows edititing of AScreenshotFunctionalTestBase::ScreenshotCamera. Change 3730308 by Guillaume.Abadie Disables TAA upsample on buffer visualization, and disallow screen percentage preview in editor viewport with any buffer visualization. Change 3730355 by Guillaume.Abadie Sacrifices consistency for good cvar name for TAA upsample. Change 3731403 by Daniel.Wright Reduced slider for ContactShadowLength to .1, algorithm produces poor results with larger values. Change 3731404 by Daniel.Wright Checkpoint for ScreenShadowMaskTexture, allowing 'vis ScreenShadowMaskTexture' Change 3731407 by Daniel.Wright Must opt-in for FDistanceFieldSceneData::VerifyIntegrity Change 3731517 by Guillaume.Abadie Freezes dynamic resolution heuristic when doing pause. Change 3732168 by Guillaume.Abadie Renames TAA upsampling cvar. Change 3732295 by Guillaume.Abadie Lets the scene texture's size and texel size return the correct sizes after TAA upsample. Change 3732313 by Guillaume.Abadie Implements SceneTexture material expressions' automated tests. Change 3734928 by Guillaume.Abadie Adds panic mode when the last N frames are over budget to the dynamic resolution heuristic. Change 3735966 by Ryan.Vance Fixing mac steamvr compile issue. Missed a few lines in the refactor because mac. Change 3736104 by Guillaume.Abadie Removes FSceneViewInitOptions::bDisableGameScreenPercentage brought by 4.18, that new screen percentage API do in a better way. Change 3736346 by Daniel.Wright Volumetric fog is always interpolated in the pixel shader, since per-vertex interpolation gives consistently poor results. Fixes Volumetric Fog on opaque in Forward, and on transparent in Deferred. Forward shading: per-pixel height fog is always done in the base pass, to work with MSAA correctly Change 3736348 by Daniel.Wright Forward shadowing of directional light for translucency * Static shadowing and CSM supported with minimal filtering (1 PCF) * Deferred renderer: affects translucency using 'Surface ForwardShading' lighting mode. Forward renderer: affects all translucency. Change 3736650 by Rolando.Caloca DR - vk - # of desc pools Change 3737985 by Guillaume.Abadie Fixes pixel inspector with primary and secondary screen percentage. Change 3738638 by Michael.Lentine Compile fix due to unclear operator precendence. Change 3739417 by Daniel.Wright Fixed a few issues with irradiance cache visualization Change 3739447 by Daniel.Wright Skip forward static shadowing in projects with static lighting disabled Change 3739595 by Daniel.Wright ConditionalPostLoad DistanceFieldReplacementMesh. Should fix a crash on load when static mesh derived data is being rebuilt, and the DistanceFieldReplacementMesh is in use. Change 3739598 by Daniel.Wright Disable capsules shadows on lowest shadow quality Change 3739611 by Daniel.Wright Added r.CapsuleDirectShadows and r.CapsuleIndirectShadows for more specific scalability control over capsule shadow features New Lighting Feature show flags for RTDF shadows and Capsule Shadows Change 3740516 by Guillaume.Abadie Fixes VR editor rendering only on eye with TAA upsample. #jira UE-52016 Change 3740580 by Guillaume.Abadie Fixes chromatic aberration with TAA upsample and multiple view rendering. #jira UE-51993 Change 3740588 by Guillaume.Abadie Gives to FXAA a more explicit draw event name for easier UDN support. Change 3740845 by Michael.Lentine Fix shipping build. Change 3740903 by Guillaume.Abadie Disables dynamic resolution threading outliers detection by default and includes editor UI GPU cost within dynamic resolution's begin/end frame events for better reliability of timestamp query based dynamic res in editor. Change 3741355 by Daniel.Wright Normalize planar reflection plane - fixes crash when scaling a BP with a planar reflection component Change 3741357 by Daniel.Wright More info on volumetric lightmap import failure Change 3742535 by Ryan.Vance Fix for view rect changes. Change 3743282 by Guillaume.Abadie Fixes a bug in dynamic resolution heuristic's outlier detection that was preventing the over budget panic to react. Change 3743559 by Michael.Lentine Port Siren changes for recompute tangents. This adds recompute tangents for cloth as well as the ability for recompute tangents to work across seams where vertices are duplicated. Change 3743679 by Guillaume.Abadie Cherry-pick 3743621: Fixes subsurface profile fallback to lit shading model when Opacity == 0, introduced by 3447144. #jira UE-51569 Change 3743906 by Ryan.Brucks BlueprintMaterialAndTextureNodes Plugin: Fix for clamping sampled HDR render target values by setting ERangeCompressionMode in the FReadSurfaceDataFlags to RCM_MinMax Change 3744096 by Ryan.Brucks BlueprintMaterialAndTextureNodes Plugin: removed Mip option from Texture2D_SampleUV_EditorOnly for now since reads from source data cannot access mips and it can be misleading. Change 3744253 by Guillaume.Abadie Fixes merge collisions of debug canvas rendering with High DPI, fixes stat unit on high DPI monitors, and fixes secondary screen percentages. Change 3744953 by Chris.Bunner Crash workaround. Change 3745628 by Marcus.Wassmer Temporarily disable recalctangent normal-smoothing #jira UE-52166 Change 3745942 by Guillaume.Abadie Fixes a todo in FCommonViewportClient Change 3746005 by Guillaume.Abadie Fixes stat UnitGraph on high DPI monitor. Change 3746029 by Guillaume.Abadie Oups.... Fix compilation. :D Change 3748322 by Guillaume.Abadie Shows dynamic resolution's primary screen percentage on stat unit/unitgraph console commands. Change 3748346 by Chris.Bunner Potential static analysis fix. Change 3748349 by Chris.Bunner Mac feature support flag fix on versions < 10.30. Change 3749336 by Guillaume.Abadie Fixes some spelling mistakes in dynamic resolution cvars. Thanks Daniel! Change 3749374 by Guillaume.Abadie Adds a black background on the stat unitgraph so timing curves can be seen no matter the content. Change 3749437 by Guillaume.Abadie Final UI polish up for `stat unitgraph` Change 3749719 by Guillaume.Abadie Fixes a crash when changing r.DynamicRes.MaxScreenPercentage below current screen percentage. Change 3750243 by Chris.Bunner Increasing controller's automated test timeout to allow for slower machines to complete the longest tests. #jira UE-48494, UE-51907 Change 3750728 by Guillaume.Abadie Fixes merge collision in chromatic aberration. #jira UE-52282 Change 3750791 by Guillaume.Abadie Fixes chromatic baerration R and G channel swap. Change 3751246 by Guillaume.Abadie Bypasses screen percentage apply with mobile LDR rendering. #jira UE-52089 Change 3752624 by Guillaume.Abadie Simplies dyn res state's event interface to a single virtual method. Change 3753766 by Chris.Bunner Rebuilt volumetric baked lighting test map and updated screenshots. #jira UE-52322 Change 3755108 by Guillaume.Abadie Fixes a bug where default dynamic resolution state was created at startup of server build. #jira UE-52345 Change 3755267 by Mark.Satterthwaite Fix condition controlling which features are enabled when iOS >= 10.3 - it wasn't working for iOS 11+ which was causing all kinds of problems. #jira UE-52301 Change 3755811 by Chris.Bunner Disable some new logging that was causing a stack overflow during EnginePreInit. #jira UE-52345 Change 3756983 by Mark.Satterthwaite Prevent different versions of metal_stdlib/ue4_stdlib from causing shader compilation failures due to a time-stamp mismatch between the local file & the PCH. This can happen when working with Xcode Beta releases that change the modification date, but not the content or compiler version, amongst other possibilities. #jira UE-52073 Change 3757156 by Guillaume.Abadie Fixes editor compositing with wireframe rendering. #jira UE-52017 Change 3757435 by Mark.Satterthwaite Workaround a bug in the MobileSceneCaptureRendering where it was copying the ViewInfo's ViewRect prior to it being configured by the mobile renderer. #jira UE-52327 Change 3757523 by Uriel.Doyon Fixed d3ddebug warning with unused inputs Change 3758318 by Guillaume.Abadie Cleaner fix for mobile scene captures. #jira UE-52327 Change 3759541 by Mark.Satterthwaite Don't enable Manual Vertex Fetch on iOS Metal for the moment as it isn't well tested there and will probably need further changes. Change 3695086 by Guillaume.Abadie Render thread dynamic resolution & TAA upsample. Merging //Tasks/UE4/Dev-DynamicRes/...@3694528 to //UE4/Dev-Rendering/... New features breakdown: - TAA upsample compute shader that accepts screen percentage from 50% to 200%, with a faster shader permutation for consoles; - Material no longer have to deal with BufferUV, and post process material after TAA upsample can sample any scene buffer seamlessly; - Material texture per view mip bias to produce sharper images with TAA upsample; - Render thread dynamic resolution heuristic is fully plugable by game code (for VR plugin specific heuristics); - Dynamic resolution in PIE and game builds; - Busy time queries in the RHI to be implemented on the different platforms so that the dynamic resolution heuristic can exactly associate GPU frame times with screen percentages in its history; - Game user settings to enable/disable dynamic resolution; - In editor viewport screen percentage config to previsualise and test content at different screen percentage. Fixes: - Various fixes for algorithms producing different outputs at different screen percentage. - Various fixes for algorithms sampling outside view rects. Refactors: - TAA shader - Moved some screen percentage specific members from FSceneView to FViewInfo for thread race bullet proofing. Aknowledgements: - VR plugins are broken - DFAO still have some artifacts Premiliminary review: Marcus.Wassmer Review for TAA refactor and TAA upsample shader: Brian.Karis Review for dynamic resolution: Brian.Karis [CL 3761165 by Chris Bunner in Main branch]
2017-11-16 11:36:35 -05:00
InView.UnscaledViewRect, // Viewport
Copying //UE4/Dev-VR to //UE4/Dev-Main (Source: //UE4/Dev-VR @ 3383750) #lockdown Nick.Penwarden ========================== MAJOR FEATURES + CHANGES ========================== Change 3012064 on 2016/06/13 by Nick.Whiting Merging Main -> DevVR Change 3048060 on 2016/07/13 by Nick.Whiting Integrating CL 3045721 from //depot/Partners/Google/AndroidVR-DevVR Upgrade Android and iOS GVR SDK to the latest. Fix the flipped vignette issue when using Unreal's post processing distortion. Change the Daydream & Cardboard mode to use scanline racing. Deprecate the ability to turn off individual UI elements. Change 3235307 on 2016/12/14 by Keli.Hlodversson Filter out excluded HMD modules during FEngineLoop:PreInitHMDDevice. The final selection still happens in UEngine::InitializeHMDDevice as all HMD plugins have not been loaded during PreInit Change 3235308 on 2016/12/14 by Ryan.Vance #jira UEVR-478 Monoscopic far field improvements Shader changes are now gated behind the read only cvar vr.MonoscopicFarField. Changing this requires a shader compile. Moved the mono rendering mode to the cvar vr.MonoscopicFarFieldMode. This is writable, so users can enable/disable mono rendering on the fly if the above cvar is enabled. Only write to the alpha channel in the mobile base pass if the object is opaque and MONOSCOPIC_FAR_FIELD is defined. Addressed code review comments. Change 3235397 on 2016/12/14 by Keli.Hlodversson [Oculus] Only enable GearVR platform on Windows if Oculus service is running Original author: Loren.McQuade Change 3235762 on 2016/12/14 by Keli.Hlodversson Add explicit parentheses to placate the build bots. Change 3242318 on 2016/12/21 by Ryan.Vance Working around pixel density crash. Change 3242522 on 2016/12/21 by Ryan.Vance Missing flag clear so our adaptive test was always returning true. Change 3243173 on 2016/12/22 by Ryan.Vance Integrating post present callback implementation from 4.14.1 Change 3248633 on 2017/01/05 by Keli.Hlodversson Copying //Tasks/UE4/Dev-VR-Refactoring to Dev-VR-Minimal (//UE4/Dev-VR-Minimal) Change 3248723 on 2017/01/05 by Keli.Hlodversson Fix after merge. EnablePositionalTracking no longer exists. Change 3249484 on 2017/01/06 by Keli.Hlodversson Add missing includes Change 3249714 on 2017/01/06 by Keli.Hlodversson Remove monolithic header include Change 3249980 on 2017/01/06 by Keli.Hlodversson SteamVR: Remove leftover unused WindowMirrorMode member variable Change 3252432 on 2017/01/10 by Keli.Hlodversson Submitting change by Loren McQuade to fix monolithic builds. Unshelved from pending changelist '3251436': Change 3257373 on 2017/01/13 by Keli.Hlodversson #jira UEVR-411: Finish renaming/removing/remodelling the remaining Oculus (Rift+GearVR) commands #jira UEVR-412: Rename and merge remaining Morpheus console commands #jira UEVR-417: Remove Exec from IHeadMountedDisplay Change 3269971 on 2017/01/24 by Jeff.Fisher UEVR-498 move controller is missing world to meters UEVR-522 PS4 motion controller worldscale support. -Passing world to meters scale into getControllerOrientationAndPosition because the thing asking about it ought to be part of a world, and know what it should be. This also avoids making PS4 motion controllers dependent on the HMD. Note Google VR Controller doesn't do position, so doesnt' care about scale. Oculus already had internal threadsafe tracking of world scale, so I left that. Steam handles world scale below our input level. -Also adding PlayerIndex member to FSceneView so we can figure out which view the MotionControllerComponent should get its worldscale from for the late render thread update. #jira UEVR-498 #review-3384107 Change 3288308 on 2017/02/06 by Jeff.Fisher UEVR-517 Detect MotionController Connectivity -PS4 can only track 2 controllers and 1 hmd. Support for dealing with that is needed. -Also need to support multiple motion controller components mapped to a single controller. Licencees have done that before. -Created a new interface IMotionTrackingSystemManagement, and implements it for PS4Tracker on PS4. -Created a MotionTrackedDeviceFunctionLibrary to expose that interface to blueprint. -With those one can enable and disable tracking on ps4 controllers and query their state to stay within the controller tracking limit. -PS4Tracker also keeps a blackboard of the enable/disable state so that one can enable or disable controllers that have not been connected yet, and have them enable tracking or not when they are connected. -DS4 controller no longer jumps back to 000 if it loses tracking. #review-3384107 #jira UEVR-517 Change 3288309 on 2017/02/06 by Keli.Hlodversson Add file missing from CL#3257373. Change 3288311 on 2017/02/06 by Jeff.Fisher UEVR-517 Detect MotionController Connectivity - Test content. -tm-motionControllers has a third mode where all playstation motion controllers for player 0 are availalbe. You can toggle them to track or not with ctrl-P,G,L,R for pad, gun, leftmove, rightmove or with alt-P,G,L,R. Ctrl tests doing so via MotionControllerComponent. Alt tests doing so by player index and controller type enum. -ctrl-A disables tracking of all controllers -alt-A disables tracking of all controllers for player 0 -ctrl-D toggles enabling new controllers by default -Also fixed one button not working in one of the other test modes for the Aim (gun) controller. -The controller 'models' have an arrow out the front. It is black if disabled. Red if enabled, but no tracker is active, yellow if tracked but inertial only, and green if fully tracked by the camera. -This logic is in the QA_MoCoAll blueprint. Change 3291601 on 2017/02/07 by Jeff.Fisher UEVR-536 PSVR motion controller tracking problem with multiple controllers -Previous code called GetRelativeTransform from the render thread, but the game thread could update it at any time. This caches that transform so that it can be safely used in the render thread. #jira UEVR-536 #review-3384107 @Ryan.Vance Change 3292460 on 2017/02/08 by Jeff.Fisher PS4 sceVrTrackerGetResult() error warning logging improved, and explanatory comment added. Change 3308771 on 2017/02/17 by Keli.Hlodversson Rename GoogleVR console commands #jira UEVR-412 Change 3309156 on 2017/02/17 by Keli.Hlodversson Track changes in r.ScreenPercentage on GoogleVR and set RenderTargetSize accordingly. Change 3311999 on 2017/02/20 by Keli.Hlodversson Create a default implementation for RecordAnalytics. Also create an initial stub for FHeadMountedDisplayBase for future default implementations of common HMD functionality. Make implementing IHeadMountedDisplay::GetDeviceName mandatory instead of defaulting to "Unknown" #jira UE-21878 #jira UEVR-213 Change 3313467 on 2017/02/20 by Ryan.Vance #jira UE-41604 3278583 pCustomPresent->AllocateRenderTargetTexture may return false, if we blindly return true we can end up with an invalid render target since the fall back sceneviewport will be skipped. 3278536 Adding ovrError_NoHmd to our sanity check in OnStartGameFrame. Change 3314002 on 2017/02/21 by Keli.Hlodversson Fix compilation on PS4 and Linux Change 3326722 on 2017/03/01 by Jeff.Fisher Merging //UE4/Dev-Main to Dev-VR (//UE4/Dev-VR) Integrating 4.15 from main. Change 3327567 on 2017/03/01 by Jeff.Fisher UEVR-588 Oculus crash on "stereo on" when the proximity sensor is not triggered. Duplicating from Release-4.15 cl 3327481, 3327542 -Don't ovr_SubmitFrame when the layers need to be recreated. They stay dirty until rendering is unpaused. #jira UEVR-588 #review-3384107 Change 3328098 on 2017/03/01 by Jeff.Fisher 4.15 merge fixes -Fixed deprecated enum name function usage. -Fixed world scale usage in GoogleVRController. -Fixed compile break in PS4Tracker. Change 3328271 on 2017/03/01 by Jeff.Fisher 2.15 merge -restroging GoogleVRController::GetWorldToMetersScale... cause it is used everywhere. Change 3328307 on 2017/03/01 by Jeff.Fisher 4.15 merge -More googlevr worldscale fixes. Change 3328312 on 2017/03/01 by Jeff.Fisher 4.15 merge -removing 2 unused includes Change 3330610 on 2017/03/02 by Jeff.Fisher 4.15 merge -fixing linux build Change 3333952 on 2017/03/06 by Keli.Hlodversson Implement common stereo layer management base class and use it in SteamVR and PS4. Fixes an outstanding bug in SteamVR where texures are updated every frame regardles of whether the continous update flag is set or not. #jira UEVR-628 #jira UE-42555 Change 3334961 on 2017/03/07 by Keli.Hlodversson Add missing include to fix non-unity builds Change 3336200 on 2017/03/07 by Keli.Hlodversson Fix compilation issues. (https://ec-01.epicgames.net/commander/link/jobDetails/jobs/7568252?jobName=UE4+Dev-VR+-+CL+3334961+-+Nightly+Build&s=Jobs) * Pre VS2015 compilers don't like mixing wide and unmarked strings in concatenation. Unfortunately LOCTEXT hides the call to the TEXT macro, completely hinding the prefix (which only gets added to the first fragment.) * Switch apparently doesn't know how to format a size_t for analytics either. Also: Typo in backwards compatibility command name alias Change 3337347 on 2017/03/08 by Jeff.Fisher UE-42631 Stereo off while prox sensor uncovered causes low framerate -Setting maxfps appropriately on 'stereo on/off'. #review-3384107 #jira UE-42631 Change 3338385 on 2017/03/08 by Ryan.Vance r.DisableDistortion was only being used for the mobile renderer Change 3342301 on 2017/03/10 by patrickr.donovan Test updates to TM-VRSmoke. Increased lightmap resolution on QA_MeshTypes meshes to improve readbility and reliablility of tests involving said asset. Rebuilt lighting. Change 3348133 on 2017/03/15 by Ryan.Vance Moving mono cvars to scene rendering to avoid cross module references. There's not a good reason to have them in the hmd module anyway. Change 3348836 on 2017/03/15 by Ryan.Vance Direct multi-view support for gear vr Monoscopic far field with multi-view (blit and direct) support for gear vr Support for translucent objects on both sides of the mono clip plane (due to a sorting issue, objects that straddle the plane composite incorrectly) Fixed missing discards/clears in the multi-view blit Change 3348843 on 2017/03/15 by Ryan.Vance Fixing color/depth target size mismatch when screen percentage scaling results in a size that isn't divisible by 16. Change 3349276 on 2017/03/16 by Keli.Hlodversson Fixing compile errors in GoogleVR after merge from main. Change 3350932 on 2017/03/16 by Ryan.Vance Re-enabling the gearvr plugin on windows. Change 3351977 on 2017/03/17 by Jeff.Fisher Fixing masked member variable. Change 3352314 on 2017/03/17 by Ryan.Vance We need to ensure that we don't select different lod levels for each eye. Change 3352993 on 2017/03/17 by Nick.Whiting Integrating CL 3345824 from Android-DevVR to Dev-VR. Support for device depth pass in SceneCaptureComponent2D Change 3355185 on 2017/03/20 by Nick.Whiting Added ability to disable the autoloading splash screen, which would prevent the hide splash screen node from ever working Change 3355676 on 2017/03/20 by Nick.Whiting PR #3384: [GNUX] SteamVR, OpenGL patch. (Contributed by yaakuro), with some minor modifications Change 3357286 on 2017/03/21 by Jeff.Fisher Fixing GenerateProjectFiles, looks like the .config. was removed from these references in main some time ago. Change 3357435 on 2017/03/21 by Jeff.Fisher Fixing editor build break, looks like a merge mistake. Change 3359960 on 2017/03/23 by Keli.Hlodversson Prevent potential crash when drawing tracking sensor location. Also only fetch HMD location once instead of once per tracking sensor. Change 3361230 on 2017/03/23 by Jeff.Fisher Fixing linux build opengl include problem... maybe. Change 3361638 on 2017/03/23 by Jeff.Fisher Another guess at fixing linux build. Change 3364224 on 2017/03/24 by Keli.Hlodversson Initial implementation of UEVR-576 - Base emulated layer implementation #jira UEVR-668 - Base emulated layer implementation: Initial framework for overrideable default implementation #jira UEVR-669 - Base emulated layer implementation: Face Locked Layers Support #jira UEVR-670 - Base emulated layer implementation: Tracker Locked Layers Support #jira UEVR-671 - Base emulated layer implementation: World Locked Layers Support #jira UEVR-672 - Base emulated layer implementation: Add support for optionally rendering face locked layers into a separate layer Change 3364242 on 2017/03/24 by Keli.Hlodversson SteamVR layers do not support negatve Layer priorities Change 3364263 on 2017/03/24 by Jeff.Fisher Merging //UE4/Dev-Main to Dev-VR (//UE4/Dev-VR) Monoscopicfarfieldrendering was just 'accept source', Ryan is going to look at fixing it up. Change 3364472 on 2017/03/24 by Jeff.Fisher Merge fix Change 3364475 on 2017/03/24 by Jeff.Fisher Fixing gearvr include. Change 3364486 on 2017/03/24 by Jeff.Fisher merge fix Change 3364532 on 2017/03/24 by Ryan.Vance pso update for mono rendering and stereo layers. Change 3364599 on 2017/03/24 by Ryan.Vance Oculus changes for SI1.12 Change 3365159 on 2017/03/26 by Jeff.Fisher include fix Change 3365182 on 2017/03/26 by Jeff.Fisher include fix Change 3366087 on 2017/03/27 by Ryan.Vance Remaining files from Oculus changes for SI1.12 merge request. Fixing a bug in OnlineSubsystem. Temporarily changing the eye padding change to be a shader clear to work around a clear color binding issue. Change 3366492 on 2017/03/27 by Ryan.Vance #jira UE-43294 Moved the clear before we setup state for drawing the mirror window content. It was stomping over state after the pso changes. Going to leave the shader clear in the rift prerender for clearing the eye padding for now. Change 3366929 on 2017/03/27 by Ryan.Vance Fixing compile error Change 3368549 on 2017/03/28 by Jeff.Fisher Merging Change: 3357998 from //UE4/Partner-Google-VR/Engine/... to Dev-VR Upgrade Google VR Plugin to v1.3: *Upgraded GVR NDK to 1.30.0 *Changed some BlueprintFunction to use BlueprintPure *Add the missing bDaydream flag in UEDeployAndroid.cs #review-3384107 Change 3368975 on 2017/03/28 by Ryan.Vance CIS clean up #jira UE-43428, UE-43429, UE-43426, UE-43427 Change 3369028 on 2017/03/28 by Ryan.Vance This is not exacly 'correct', but it's at least what the code was trying to do. Change 3370203 on 2017/03/29 by Ryan.Vance Adding gear vr controller component support. Change 3370918 on 2017/03/29 by Ryan.Vance Merging 3370569 using Partner-Google-VR_to_DevVR Change 3371030 on 2017/03/29 by Ryan.Vance Fixing linux build errors #jira UE-43426 Change 3371036 on 2017/03/29 by Ryan.Vance Oculus 4.16 integration. Not terribly happy with the use of std::string. They promised to clean this up for the next release. Change 3373495 on 2017/03/30 by Jeff.Fisher Merging from Dev-Main, in preparation for 4.16 Change 3373578 on 2017/03/30 by Jeff.Fisher build break, one comma short Change 3373870 on 2017/03/31 by Jeff.Fisher Include order fix. Change 3374001 on 2017/03/31 by Keli.Hlodversson Use DefaultStereoLayers as base for Morpheus implementation. #jira UEVR-709 #jira UE-42919 #rb: Jeff.Fisher Change 3374004 on 2017/03/31 by Keli.Hlodversson Fix rendering for the default Stereo Layers implementation on mobile. Depth test was set to "Never" instead of "Always" Destination texture on GLES is flipped on the Y axis, the coordinates are reversed in the shade when compiled on the relevant platforms. Change 3375125 on 2017/03/31 by Jeff.Fisher UE-43506 Ensure using VRPreview with GoogleVR -Removed the ensure, there is code in there to handle that case, and it works. #jira UE-43506 Change 3375294 on 2017/03/31 by nick.bullard Resaving Plugin content to resovle "saved with empty engine version" #jira UE-43537 Change 3375480 on 2017/03/31 by Jeff.Fisher UEVR-9 PSVR: Social Screen Support -Experimental social screen support for 4.16. -This does the basics of driving output through the Aux port in the proper format for display on the mirror monitor. -Only supports 30fps on the mirror monitor. 60fps will require the implementation of sony system dialogs to deal with incompatable system features (video streaming, remote play). -There is a project setting in Morpheus, under experiemental bEnableSocialScreenSeparateMode. This must be set to true to use this feature. When it is false we avoid allocating the back buffers. -MorpheusFunctionLibrary blueprints now have a node "SetSocialScreenMode" which can switch between SystemMirror (hardware supported mirroring), SeparateTest (alternates black and white), SeparateTexture (displays a texture, eg a render target, specified via blueprint), and SeparateMirror(puts the hmd render buffer on screen - which is both eyes, like a debug mode). -Also finally updated the bEnabled flag in project settings to tell people it's only for PC. #jira UEVR-9 #review-3384107 Change 3375540 on 2017/03/31 by Ryan.Vance #jira UE-43504 Fixing android build break when using a 64 bit isa. Change 3375655 on 2017/03/31 by Jeff.Fisher Fixing missing RGBAToYUV shader problem -This at least unblocks our process. Will revisit before zbr. Change 3375820 on 2017/04/01 by Jeff.Fisher Fixing linux build warning about HAS_MORPHEUS Change 3376050 on 2017/04/02 by Jeff.Fisher UE-43515 Step 'UE4Editor Static Analysis Win64' - Module.OnlineSubsystemOculus.cpp Warnings -Temporary fix for static analysis annotation warnings in OnlineSubsytemOculus. Longer term plan is to eliminate the use of the headers that trigger the warnings. -Just wrap all standard headers in static analysis disables. #jira UE-43515 Change 3376609 on 2017/04/03 by Jeff.Fisher Fixing rgbatoyuvshader include. Change 3377001 on 2017/04/03 by Jeff.Fisher UE-43547 Launch On PS4 fails during Run command - Missing global shader FRGBAToYUV420CS - shader c++ must be compiled so that it can be cooked for ps4. #jira UE-43547 Change 3379858 on 2017/04/04 by Jeff.Fisher Merging //UE4/Dev-Main to Dev-VR (//UE4/Dev-VR) pulling main this should get us ps4 sdk 4.508 Change 3379938 on 2017/04/04 by Ryan.Vance #jira UE-43548 If stereo layers are not being used, don't setup overlay targets as we will never clear/initialize them. The clear happens as part of the default layers PostRenderView_RenderThread call which wont be called if layers aren't being used in the scene. Change 3381519 on 2017/04/05 by Jeff.Fisher UEVR-733 PS4 sdk 4.500 hmd connection api changes break hmd connect. -Handling failure of sceHmdGetDeviceInformation if the hmd is powered off. It now returns an error code about an invalid handle in that case, rather than reporting unready. We just treat the error code like an unready status. #jira UEVR-733 #review-3384107 Change 3382019 on 2017/04/05 by Ryan.Vance Linux: add Vulkan support from dev editor: 3381593 Change 3382021 on 2017/04/05 by Ryan.Vance SteamVR on Linux using Vulkan OpenVR rev to 1_0_6 PR #3412: [GNUX] Initial support for SteamVR using Vulkan on GNUX platform. (Contributed by yaakuro) Change 3382076 on 2017/04/05 by Ryan.Vance Fixing linux steamvr lib path. It changed to something less silly in 1.0.6 Removing the steamvr plugin from the white list for linux. It's looking for a runtime that no one will have installed. Change 3383237 on 2017/04/06 by Ryan.Vance #jira UE-43732 Fixing Android compile issues. We can't wrap portions of a macro with a definie. This should probably be some sort of recursive macro thing since there's so much overlap. Good enough for now. Change 3383353 on 2017/04/06 by Ryan.Vance Fixing include cycles. Change 3383509 on 2017/04/06 by Jeff.Fisher Merging //UE4/Dev-Main to Dev-VR (//UE4/Dev-VR) merging the stuff from dev-mobile [CL 3384106 by Ryan Vance in Main branch]
2017-04-06 22:03:51 -04:00
{
ViewProjectionMatrix, // WorldLocked,
TrackerMatrix * ProjectionMatrix, // TrackerLocked,
EyeMatrix * ProjectionMatrix // FaceLocked
}
};
TArray<FRHITransitionInfo, TInlineAllocator<16>> Infos;
for (uint32 LayerIndex : SortedSceneLayers)
{
Infos.Add(FRHITransitionInfo(RenderThreadLayers[LayerIndex].Texture, ERHIAccess::Unknown, ERHIAccess::SRVGraphics));
}
for (uint32 LayerIndex : SortedOverlayLayers)
{
Infos.Add(FRHITransitionInfo(RenderThreadLayers[LayerIndex].Texture, ERHIAccess::Unknown, ERHIAccess::SRVGraphics));
}
if (Infos.Num())
{
RHICmdList.Transition(Infos);
}
FTexture2DRHIRef RenderTarget = HMDDevice->GetSceneLayerTarget_RenderThread(InView.StereoViewIndex, RenderParams.Viewport);
Copying //UE4/Dev-VR to //UE4/Dev-Main (Source: //UE4/Dev-VR @ 3383750) #lockdown Nick.Penwarden ========================== MAJOR FEATURES + CHANGES ========================== Change 3012064 on 2016/06/13 by Nick.Whiting Merging Main -> DevVR Change 3048060 on 2016/07/13 by Nick.Whiting Integrating CL 3045721 from //depot/Partners/Google/AndroidVR-DevVR Upgrade Android and iOS GVR SDK to the latest. Fix the flipped vignette issue when using Unreal's post processing distortion. Change the Daydream & Cardboard mode to use scanline racing. Deprecate the ability to turn off individual UI elements. Change 3235307 on 2016/12/14 by Keli.Hlodversson Filter out excluded HMD modules during FEngineLoop:PreInitHMDDevice. The final selection still happens in UEngine::InitializeHMDDevice as all HMD plugins have not been loaded during PreInit Change 3235308 on 2016/12/14 by Ryan.Vance #jira UEVR-478 Monoscopic far field improvements Shader changes are now gated behind the read only cvar vr.MonoscopicFarField. Changing this requires a shader compile. Moved the mono rendering mode to the cvar vr.MonoscopicFarFieldMode. This is writable, so users can enable/disable mono rendering on the fly if the above cvar is enabled. Only write to the alpha channel in the mobile base pass if the object is opaque and MONOSCOPIC_FAR_FIELD is defined. Addressed code review comments. Change 3235397 on 2016/12/14 by Keli.Hlodversson [Oculus] Only enable GearVR platform on Windows if Oculus service is running Original author: Loren.McQuade Change 3235762 on 2016/12/14 by Keli.Hlodversson Add explicit parentheses to placate the build bots. Change 3242318 on 2016/12/21 by Ryan.Vance Working around pixel density crash. Change 3242522 on 2016/12/21 by Ryan.Vance Missing flag clear so our adaptive test was always returning true. Change 3243173 on 2016/12/22 by Ryan.Vance Integrating post present callback implementation from 4.14.1 Change 3248633 on 2017/01/05 by Keli.Hlodversson Copying //Tasks/UE4/Dev-VR-Refactoring to Dev-VR-Minimal (//UE4/Dev-VR-Minimal) Change 3248723 on 2017/01/05 by Keli.Hlodversson Fix after merge. EnablePositionalTracking no longer exists. Change 3249484 on 2017/01/06 by Keli.Hlodversson Add missing includes Change 3249714 on 2017/01/06 by Keli.Hlodversson Remove monolithic header include Change 3249980 on 2017/01/06 by Keli.Hlodversson SteamVR: Remove leftover unused WindowMirrorMode member variable Change 3252432 on 2017/01/10 by Keli.Hlodversson Submitting change by Loren McQuade to fix monolithic builds. Unshelved from pending changelist '3251436': Change 3257373 on 2017/01/13 by Keli.Hlodversson #jira UEVR-411: Finish renaming/removing/remodelling the remaining Oculus (Rift+GearVR) commands #jira UEVR-412: Rename and merge remaining Morpheus console commands #jira UEVR-417: Remove Exec from IHeadMountedDisplay Change 3269971 on 2017/01/24 by Jeff.Fisher UEVR-498 move controller is missing world to meters UEVR-522 PS4 motion controller worldscale support. -Passing world to meters scale into getControllerOrientationAndPosition because the thing asking about it ought to be part of a world, and know what it should be. This also avoids making PS4 motion controllers dependent on the HMD. Note Google VR Controller doesn't do position, so doesnt' care about scale. Oculus already had internal threadsafe tracking of world scale, so I left that. Steam handles world scale below our input level. -Also adding PlayerIndex member to FSceneView so we can figure out which view the MotionControllerComponent should get its worldscale from for the late render thread update. #jira UEVR-498 #review-3384107 Change 3288308 on 2017/02/06 by Jeff.Fisher UEVR-517 Detect MotionController Connectivity -PS4 can only track 2 controllers and 1 hmd. Support for dealing with that is needed. -Also need to support multiple motion controller components mapped to a single controller. Licencees have done that before. -Created a new interface IMotionTrackingSystemManagement, and implements it for PS4Tracker on PS4. -Created a MotionTrackedDeviceFunctionLibrary to expose that interface to blueprint. -With those one can enable and disable tracking on ps4 controllers and query their state to stay within the controller tracking limit. -PS4Tracker also keeps a blackboard of the enable/disable state so that one can enable or disable controllers that have not been connected yet, and have them enable tracking or not when they are connected. -DS4 controller no longer jumps back to 000 if it loses tracking. #review-3384107 #jira UEVR-517 Change 3288309 on 2017/02/06 by Keli.Hlodversson Add file missing from CL#3257373. Change 3288311 on 2017/02/06 by Jeff.Fisher UEVR-517 Detect MotionController Connectivity - Test content. -tm-motionControllers has a third mode where all playstation motion controllers for player 0 are availalbe. You can toggle them to track or not with ctrl-P,G,L,R for pad, gun, leftmove, rightmove or with alt-P,G,L,R. Ctrl tests doing so via MotionControllerComponent. Alt tests doing so by player index and controller type enum. -ctrl-A disables tracking of all controllers -alt-A disables tracking of all controllers for player 0 -ctrl-D toggles enabling new controllers by default -Also fixed one button not working in one of the other test modes for the Aim (gun) controller. -The controller 'models' have an arrow out the front. It is black if disabled. Red if enabled, but no tracker is active, yellow if tracked but inertial only, and green if fully tracked by the camera. -This logic is in the QA_MoCoAll blueprint. Change 3291601 on 2017/02/07 by Jeff.Fisher UEVR-536 PSVR motion controller tracking problem with multiple controllers -Previous code called GetRelativeTransform from the render thread, but the game thread could update it at any time. This caches that transform so that it can be safely used in the render thread. #jira UEVR-536 #review-3384107 @Ryan.Vance Change 3292460 on 2017/02/08 by Jeff.Fisher PS4 sceVrTrackerGetResult() error warning logging improved, and explanatory comment added. Change 3308771 on 2017/02/17 by Keli.Hlodversson Rename GoogleVR console commands #jira UEVR-412 Change 3309156 on 2017/02/17 by Keli.Hlodversson Track changes in r.ScreenPercentage on GoogleVR and set RenderTargetSize accordingly. Change 3311999 on 2017/02/20 by Keli.Hlodversson Create a default implementation for RecordAnalytics. Also create an initial stub for FHeadMountedDisplayBase for future default implementations of common HMD functionality. Make implementing IHeadMountedDisplay::GetDeviceName mandatory instead of defaulting to "Unknown" #jira UE-21878 #jira UEVR-213 Change 3313467 on 2017/02/20 by Ryan.Vance #jira UE-41604 3278583 pCustomPresent->AllocateRenderTargetTexture may return false, if we blindly return true we can end up with an invalid render target since the fall back sceneviewport will be skipped. 3278536 Adding ovrError_NoHmd to our sanity check in OnStartGameFrame. Change 3314002 on 2017/02/21 by Keli.Hlodversson Fix compilation on PS4 and Linux Change 3326722 on 2017/03/01 by Jeff.Fisher Merging //UE4/Dev-Main to Dev-VR (//UE4/Dev-VR) Integrating 4.15 from main. Change 3327567 on 2017/03/01 by Jeff.Fisher UEVR-588 Oculus crash on "stereo on" when the proximity sensor is not triggered. Duplicating from Release-4.15 cl 3327481, 3327542 -Don't ovr_SubmitFrame when the layers need to be recreated. They stay dirty until rendering is unpaused. #jira UEVR-588 #review-3384107 Change 3328098 on 2017/03/01 by Jeff.Fisher 4.15 merge fixes -Fixed deprecated enum name function usage. -Fixed world scale usage in GoogleVRController. -Fixed compile break in PS4Tracker. Change 3328271 on 2017/03/01 by Jeff.Fisher 2.15 merge -restroging GoogleVRController::GetWorldToMetersScale... cause it is used everywhere. Change 3328307 on 2017/03/01 by Jeff.Fisher 4.15 merge -More googlevr worldscale fixes. Change 3328312 on 2017/03/01 by Jeff.Fisher 4.15 merge -removing 2 unused includes Change 3330610 on 2017/03/02 by Jeff.Fisher 4.15 merge -fixing linux build Change 3333952 on 2017/03/06 by Keli.Hlodversson Implement common stereo layer management base class and use it in SteamVR and PS4. Fixes an outstanding bug in SteamVR where texures are updated every frame regardles of whether the continous update flag is set or not. #jira UEVR-628 #jira UE-42555 Change 3334961 on 2017/03/07 by Keli.Hlodversson Add missing include to fix non-unity builds Change 3336200 on 2017/03/07 by Keli.Hlodversson Fix compilation issues. (https://ec-01.epicgames.net/commander/link/jobDetails/jobs/7568252?jobName=UE4+Dev-VR+-+CL+3334961+-+Nightly+Build&s=Jobs) * Pre VS2015 compilers don't like mixing wide and unmarked strings in concatenation. Unfortunately LOCTEXT hides the call to the TEXT macro, completely hinding the prefix (which only gets added to the first fragment.) * Switch apparently doesn't know how to format a size_t for analytics either. Also: Typo in backwards compatibility command name alias Change 3337347 on 2017/03/08 by Jeff.Fisher UE-42631 Stereo off while prox sensor uncovered causes low framerate -Setting maxfps appropriately on 'stereo on/off'. #review-3384107 #jira UE-42631 Change 3338385 on 2017/03/08 by Ryan.Vance r.DisableDistortion was only being used for the mobile renderer Change 3342301 on 2017/03/10 by patrickr.donovan Test updates to TM-VRSmoke. Increased lightmap resolution on QA_MeshTypes meshes to improve readbility and reliablility of tests involving said asset. Rebuilt lighting. Change 3348133 on 2017/03/15 by Ryan.Vance Moving mono cvars to scene rendering to avoid cross module references. There's not a good reason to have them in the hmd module anyway. Change 3348836 on 2017/03/15 by Ryan.Vance Direct multi-view support for gear vr Monoscopic far field with multi-view (blit and direct) support for gear vr Support for translucent objects on both sides of the mono clip plane (due to a sorting issue, objects that straddle the plane composite incorrectly) Fixed missing discards/clears in the multi-view blit Change 3348843 on 2017/03/15 by Ryan.Vance Fixing color/depth target size mismatch when screen percentage scaling results in a size that isn't divisible by 16. Change 3349276 on 2017/03/16 by Keli.Hlodversson Fixing compile errors in GoogleVR after merge from main. Change 3350932 on 2017/03/16 by Ryan.Vance Re-enabling the gearvr plugin on windows. Change 3351977 on 2017/03/17 by Jeff.Fisher Fixing masked member variable. Change 3352314 on 2017/03/17 by Ryan.Vance We need to ensure that we don't select different lod levels for each eye. Change 3352993 on 2017/03/17 by Nick.Whiting Integrating CL 3345824 from Android-DevVR to Dev-VR. Support for device depth pass in SceneCaptureComponent2D Change 3355185 on 2017/03/20 by Nick.Whiting Added ability to disable the autoloading splash screen, which would prevent the hide splash screen node from ever working Change 3355676 on 2017/03/20 by Nick.Whiting PR #3384: [GNUX] SteamVR, OpenGL patch. (Contributed by yaakuro), with some minor modifications Change 3357286 on 2017/03/21 by Jeff.Fisher Fixing GenerateProjectFiles, looks like the .config. was removed from these references in main some time ago. Change 3357435 on 2017/03/21 by Jeff.Fisher Fixing editor build break, looks like a merge mistake. Change 3359960 on 2017/03/23 by Keli.Hlodversson Prevent potential crash when drawing tracking sensor location. Also only fetch HMD location once instead of once per tracking sensor. Change 3361230 on 2017/03/23 by Jeff.Fisher Fixing linux build opengl include problem... maybe. Change 3361638 on 2017/03/23 by Jeff.Fisher Another guess at fixing linux build. Change 3364224 on 2017/03/24 by Keli.Hlodversson Initial implementation of UEVR-576 - Base emulated layer implementation #jira UEVR-668 - Base emulated layer implementation: Initial framework for overrideable default implementation #jira UEVR-669 - Base emulated layer implementation: Face Locked Layers Support #jira UEVR-670 - Base emulated layer implementation: Tracker Locked Layers Support #jira UEVR-671 - Base emulated layer implementation: World Locked Layers Support #jira UEVR-672 - Base emulated layer implementation: Add support for optionally rendering face locked layers into a separate layer Change 3364242 on 2017/03/24 by Keli.Hlodversson SteamVR layers do not support negatve Layer priorities Change 3364263 on 2017/03/24 by Jeff.Fisher Merging //UE4/Dev-Main to Dev-VR (//UE4/Dev-VR) Monoscopicfarfieldrendering was just 'accept source', Ryan is going to look at fixing it up. Change 3364472 on 2017/03/24 by Jeff.Fisher Merge fix Change 3364475 on 2017/03/24 by Jeff.Fisher Fixing gearvr include. Change 3364486 on 2017/03/24 by Jeff.Fisher merge fix Change 3364532 on 2017/03/24 by Ryan.Vance pso update for mono rendering and stereo layers. Change 3364599 on 2017/03/24 by Ryan.Vance Oculus changes for SI1.12 Change 3365159 on 2017/03/26 by Jeff.Fisher include fix Change 3365182 on 2017/03/26 by Jeff.Fisher include fix Change 3366087 on 2017/03/27 by Ryan.Vance Remaining files from Oculus changes for SI1.12 merge request. Fixing a bug in OnlineSubsystem. Temporarily changing the eye padding change to be a shader clear to work around a clear color binding issue. Change 3366492 on 2017/03/27 by Ryan.Vance #jira UE-43294 Moved the clear before we setup state for drawing the mirror window content. It was stomping over state after the pso changes. Going to leave the shader clear in the rift prerender for clearing the eye padding for now. Change 3366929 on 2017/03/27 by Ryan.Vance Fixing compile error Change 3368549 on 2017/03/28 by Jeff.Fisher Merging Change: 3357998 from //UE4/Partner-Google-VR/Engine/... to Dev-VR Upgrade Google VR Plugin to v1.3: *Upgraded GVR NDK to 1.30.0 *Changed some BlueprintFunction to use BlueprintPure *Add the missing bDaydream flag in UEDeployAndroid.cs #review-3384107 Change 3368975 on 2017/03/28 by Ryan.Vance CIS clean up #jira UE-43428, UE-43429, UE-43426, UE-43427 Change 3369028 on 2017/03/28 by Ryan.Vance This is not exacly 'correct', but it's at least what the code was trying to do. Change 3370203 on 2017/03/29 by Ryan.Vance Adding gear vr controller component support. Change 3370918 on 2017/03/29 by Ryan.Vance Merging 3370569 using Partner-Google-VR_to_DevVR Change 3371030 on 2017/03/29 by Ryan.Vance Fixing linux build errors #jira UE-43426 Change 3371036 on 2017/03/29 by Ryan.Vance Oculus 4.16 integration. Not terribly happy with the use of std::string. They promised to clean this up for the next release. Change 3373495 on 2017/03/30 by Jeff.Fisher Merging from Dev-Main, in preparation for 4.16 Change 3373578 on 2017/03/30 by Jeff.Fisher build break, one comma short Change 3373870 on 2017/03/31 by Jeff.Fisher Include order fix. Change 3374001 on 2017/03/31 by Keli.Hlodversson Use DefaultStereoLayers as base for Morpheus implementation. #jira UEVR-709 #jira UE-42919 #rb: Jeff.Fisher Change 3374004 on 2017/03/31 by Keli.Hlodversson Fix rendering for the default Stereo Layers implementation on mobile. Depth test was set to "Never" instead of "Always" Destination texture on GLES is flipped on the Y axis, the coordinates are reversed in the shade when compiled on the relevant platforms. Change 3375125 on 2017/03/31 by Jeff.Fisher UE-43506 Ensure using VRPreview with GoogleVR -Removed the ensure, there is code in there to handle that case, and it works. #jira UE-43506 Change 3375294 on 2017/03/31 by nick.bullard Resaving Plugin content to resovle "saved with empty engine version" #jira UE-43537 Change 3375480 on 2017/03/31 by Jeff.Fisher UEVR-9 PSVR: Social Screen Support -Experimental social screen support for 4.16. -This does the basics of driving output through the Aux port in the proper format for display on the mirror monitor. -Only supports 30fps on the mirror monitor. 60fps will require the implementation of sony system dialogs to deal with incompatable system features (video streaming, remote play). -There is a project setting in Morpheus, under experiemental bEnableSocialScreenSeparateMode. This must be set to true to use this feature. When it is false we avoid allocating the back buffers. -MorpheusFunctionLibrary blueprints now have a node "SetSocialScreenMode" which can switch between SystemMirror (hardware supported mirroring), SeparateTest (alternates black and white), SeparateTexture (displays a texture, eg a render target, specified via blueprint), and SeparateMirror(puts the hmd render buffer on screen - which is both eyes, like a debug mode). -Also finally updated the bEnabled flag in project settings to tell people it's only for PC. #jira UEVR-9 #review-3384107 Change 3375540 on 2017/03/31 by Ryan.Vance #jira UE-43504 Fixing android build break when using a 64 bit isa. Change 3375655 on 2017/03/31 by Jeff.Fisher Fixing missing RGBAToYUV shader problem -This at least unblocks our process. Will revisit before zbr. Change 3375820 on 2017/04/01 by Jeff.Fisher Fixing linux build warning about HAS_MORPHEUS Change 3376050 on 2017/04/02 by Jeff.Fisher UE-43515 Step 'UE4Editor Static Analysis Win64' - Module.OnlineSubsystemOculus.cpp Warnings -Temporary fix for static analysis annotation warnings in OnlineSubsytemOculus. Longer term plan is to eliminate the use of the headers that trigger the warnings. -Just wrap all standard headers in static analysis disables. #jira UE-43515 Change 3376609 on 2017/04/03 by Jeff.Fisher Fixing rgbatoyuvshader include. Change 3377001 on 2017/04/03 by Jeff.Fisher UE-43547 Launch On PS4 fails during Run command - Missing global shader FRGBAToYUV420CS - shader c++ must be compiled so that it can be cooked for ps4. #jira UE-43547 Change 3379858 on 2017/04/04 by Jeff.Fisher Merging //UE4/Dev-Main to Dev-VR (//UE4/Dev-VR) pulling main this should get us ps4 sdk 4.508 Change 3379938 on 2017/04/04 by Ryan.Vance #jira UE-43548 If stereo layers are not being used, don't setup overlay targets as we will never clear/initialize them. The clear happens as part of the default layers PostRenderView_RenderThread call which wont be called if layers aren't being used in the scene. Change 3381519 on 2017/04/05 by Jeff.Fisher UEVR-733 PS4 sdk 4.500 hmd connection api changes break hmd connect. -Handling failure of sceHmdGetDeviceInformation if the hmd is powered off. It now returns an error code about an invalid handle in that case, rather than reporting unready. We just treat the error code like an unready status. #jira UEVR-733 #review-3384107 Change 3382019 on 2017/04/05 by Ryan.Vance Linux: add Vulkan support from dev editor: 3381593 Change 3382021 on 2017/04/05 by Ryan.Vance SteamVR on Linux using Vulkan OpenVR rev to 1_0_6 PR #3412: [GNUX] Initial support for SteamVR using Vulkan on GNUX platform. (Contributed by yaakuro) Change 3382076 on 2017/04/05 by Ryan.Vance Fixing linux steamvr lib path. It changed to something less silly in 1.0.6 Removing the steamvr plugin from the white list for linux. It's looking for a runtime that no one will have installed. Change 3383237 on 2017/04/06 by Ryan.Vance #jira UE-43732 Fixing Android compile issues. We can't wrap portions of a macro with a definie. This should probably be some sort of recursive macro thing since there's so much overlap. Good enough for now. Change 3383353 on 2017/04/06 by Ryan.Vance Fixing include cycles. Change 3383509 on 2017/04/06 by Jeff.Fisher Merging //UE4/Dev-Main to Dev-VR (//UE4/Dev-VR) merging the stuff from dev-mobile [CL 3384106 by Ryan Vance in Main branch]
2017-04-06 22:03:51 -04:00
if (!RenderTarget.IsValid())
{
RenderTarget = InView.Family->RenderTarget->GetRenderTargetTexture();
}
FRHIRenderPassInfo RPInfo(RenderTarget, ERenderTargetActions::Load_Store);
RHICmdList.BeginRenderPass(RPInfo, TEXT("StereoLayerRender"));
RHICmdList.SetViewport((float)RenderParams.Viewport.Min.X, (float)RenderParams.Viewport.Min.Y, 0.0f, (float)RenderParams.Viewport.Max.X, (float)RenderParams.Viewport.Max.Y, 1.0f);
if (bSplashIsShown || !IsBackgroundLayerVisible())
{
DrawClearQuad(RHICmdList, FLinearColor::Black);
}
Copying //UE4/Dev-VR to //UE4/Dev-Main (Source: //UE4/Dev-VR @ 3383750) #lockdown Nick.Penwarden ========================== MAJOR FEATURES + CHANGES ========================== Change 3012064 on 2016/06/13 by Nick.Whiting Merging Main -> DevVR Change 3048060 on 2016/07/13 by Nick.Whiting Integrating CL 3045721 from //depot/Partners/Google/AndroidVR-DevVR Upgrade Android and iOS GVR SDK to the latest. Fix the flipped vignette issue when using Unreal's post processing distortion. Change the Daydream & Cardboard mode to use scanline racing. Deprecate the ability to turn off individual UI elements. Change 3235307 on 2016/12/14 by Keli.Hlodversson Filter out excluded HMD modules during FEngineLoop:PreInitHMDDevice. The final selection still happens in UEngine::InitializeHMDDevice as all HMD plugins have not been loaded during PreInit Change 3235308 on 2016/12/14 by Ryan.Vance #jira UEVR-478 Monoscopic far field improvements Shader changes are now gated behind the read only cvar vr.MonoscopicFarField. Changing this requires a shader compile. Moved the mono rendering mode to the cvar vr.MonoscopicFarFieldMode. This is writable, so users can enable/disable mono rendering on the fly if the above cvar is enabled. Only write to the alpha channel in the mobile base pass if the object is opaque and MONOSCOPIC_FAR_FIELD is defined. Addressed code review comments. Change 3235397 on 2016/12/14 by Keli.Hlodversson [Oculus] Only enable GearVR platform on Windows if Oculus service is running Original author: Loren.McQuade Change 3235762 on 2016/12/14 by Keli.Hlodversson Add explicit parentheses to placate the build bots. Change 3242318 on 2016/12/21 by Ryan.Vance Working around pixel density crash. Change 3242522 on 2016/12/21 by Ryan.Vance Missing flag clear so our adaptive test was always returning true. Change 3243173 on 2016/12/22 by Ryan.Vance Integrating post present callback implementation from 4.14.1 Change 3248633 on 2017/01/05 by Keli.Hlodversson Copying //Tasks/UE4/Dev-VR-Refactoring to Dev-VR-Minimal (//UE4/Dev-VR-Minimal) Change 3248723 on 2017/01/05 by Keli.Hlodversson Fix after merge. EnablePositionalTracking no longer exists. Change 3249484 on 2017/01/06 by Keli.Hlodversson Add missing includes Change 3249714 on 2017/01/06 by Keli.Hlodversson Remove monolithic header include Change 3249980 on 2017/01/06 by Keli.Hlodversson SteamVR: Remove leftover unused WindowMirrorMode member variable Change 3252432 on 2017/01/10 by Keli.Hlodversson Submitting change by Loren McQuade to fix monolithic builds. Unshelved from pending changelist '3251436': Change 3257373 on 2017/01/13 by Keli.Hlodversson #jira UEVR-411: Finish renaming/removing/remodelling the remaining Oculus (Rift+GearVR) commands #jira UEVR-412: Rename and merge remaining Morpheus console commands #jira UEVR-417: Remove Exec from IHeadMountedDisplay Change 3269971 on 2017/01/24 by Jeff.Fisher UEVR-498 move controller is missing world to meters UEVR-522 PS4 motion controller worldscale support. -Passing world to meters scale into getControllerOrientationAndPosition because the thing asking about it ought to be part of a world, and know what it should be. This also avoids making PS4 motion controllers dependent on the HMD. Note Google VR Controller doesn't do position, so doesnt' care about scale. Oculus already had internal threadsafe tracking of world scale, so I left that. Steam handles world scale below our input level. -Also adding PlayerIndex member to FSceneView so we can figure out which view the MotionControllerComponent should get its worldscale from for the late render thread update. #jira UEVR-498 #review-3384107 Change 3288308 on 2017/02/06 by Jeff.Fisher UEVR-517 Detect MotionController Connectivity -PS4 can only track 2 controllers and 1 hmd. Support for dealing with that is needed. -Also need to support multiple motion controller components mapped to a single controller. Licencees have done that before. -Created a new interface IMotionTrackingSystemManagement, and implements it for PS4Tracker on PS4. -Created a MotionTrackedDeviceFunctionLibrary to expose that interface to blueprint. -With those one can enable and disable tracking on ps4 controllers and query their state to stay within the controller tracking limit. -PS4Tracker also keeps a blackboard of the enable/disable state so that one can enable or disable controllers that have not been connected yet, and have them enable tracking or not when they are connected. -DS4 controller no longer jumps back to 000 if it loses tracking. #review-3384107 #jira UEVR-517 Change 3288309 on 2017/02/06 by Keli.Hlodversson Add file missing from CL#3257373. Change 3288311 on 2017/02/06 by Jeff.Fisher UEVR-517 Detect MotionController Connectivity - Test content. -tm-motionControllers has a third mode where all playstation motion controllers for player 0 are availalbe. You can toggle them to track or not with ctrl-P,G,L,R for pad, gun, leftmove, rightmove or with alt-P,G,L,R. Ctrl tests doing so via MotionControllerComponent. Alt tests doing so by player index and controller type enum. -ctrl-A disables tracking of all controllers -alt-A disables tracking of all controllers for player 0 -ctrl-D toggles enabling new controllers by default -Also fixed one button not working in one of the other test modes for the Aim (gun) controller. -The controller 'models' have an arrow out the front. It is black if disabled. Red if enabled, but no tracker is active, yellow if tracked but inertial only, and green if fully tracked by the camera. -This logic is in the QA_MoCoAll blueprint. Change 3291601 on 2017/02/07 by Jeff.Fisher UEVR-536 PSVR motion controller tracking problem with multiple controllers -Previous code called GetRelativeTransform from the render thread, but the game thread could update it at any time. This caches that transform so that it can be safely used in the render thread. #jira UEVR-536 #review-3384107 @Ryan.Vance Change 3292460 on 2017/02/08 by Jeff.Fisher PS4 sceVrTrackerGetResult() error warning logging improved, and explanatory comment added. Change 3308771 on 2017/02/17 by Keli.Hlodversson Rename GoogleVR console commands #jira UEVR-412 Change 3309156 on 2017/02/17 by Keli.Hlodversson Track changes in r.ScreenPercentage on GoogleVR and set RenderTargetSize accordingly. Change 3311999 on 2017/02/20 by Keli.Hlodversson Create a default implementation for RecordAnalytics. Also create an initial stub for FHeadMountedDisplayBase for future default implementations of common HMD functionality. Make implementing IHeadMountedDisplay::GetDeviceName mandatory instead of defaulting to "Unknown" #jira UE-21878 #jira UEVR-213 Change 3313467 on 2017/02/20 by Ryan.Vance #jira UE-41604 3278583 pCustomPresent->AllocateRenderTargetTexture may return false, if we blindly return true we can end up with an invalid render target since the fall back sceneviewport will be skipped. 3278536 Adding ovrError_NoHmd to our sanity check in OnStartGameFrame. Change 3314002 on 2017/02/21 by Keli.Hlodversson Fix compilation on PS4 and Linux Change 3326722 on 2017/03/01 by Jeff.Fisher Merging //UE4/Dev-Main to Dev-VR (//UE4/Dev-VR) Integrating 4.15 from main. Change 3327567 on 2017/03/01 by Jeff.Fisher UEVR-588 Oculus crash on "stereo on" when the proximity sensor is not triggered. Duplicating from Release-4.15 cl 3327481, 3327542 -Don't ovr_SubmitFrame when the layers need to be recreated. They stay dirty until rendering is unpaused. #jira UEVR-588 #review-3384107 Change 3328098 on 2017/03/01 by Jeff.Fisher 4.15 merge fixes -Fixed deprecated enum name function usage. -Fixed world scale usage in GoogleVRController. -Fixed compile break in PS4Tracker. Change 3328271 on 2017/03/01 by Jeff.Fisher 2.15 merge -restroging GoogleVRController::GetWorldToMetersScale... cause it is used everywhere. Change 3328307 on 2017/03/01 by Jeff.Fisher 4.15 merge -More googlevr worldscale fixes. Change 3328312 on 2017/03/01 by Jeff.Fisher 4.15 merge -removing 2 unused includes Change 3330610 on 2017/03/02 by Jeff.Fisher 4.15 merge -fixing linux build Change 3333952 on 2017/03/06 by Keli.Hlodversson Implement common stereo layer management base class and use it in SteamVR and PS4. Fixes an outstanding bug in SteamVR where texures are updated every frame regardles of whether the continous update flag is set or not. #jira UEVR-628 #jira UE-42555 Change 3334961 on 2017/03/07 by Keli.Hlodversson Add missing include to fix non-unity builds Change 3336200 on 2017/03/07 by Keli.Hlodversson Fix compilation issues. (https://ec-01.epicgames.net/commander/link/jobDetails/jobs/7568252?jobName=UE4+Dev-VR+-+CL+3334961+-+Nightly+Build&s=Jobs) * Pre VS2015 compilers don't like mixing wide and unmarked strings in concatenation. Unfortunately LOCTEXT hides the call to the TEXT macro, completely hinding the prefix (which only gets added to the first fragment.) * Switch apparently doesn't know how to format a size_t for analytics either. Also: Typo in backwards compatibility command name alias Change 3337347 on 2017/03/08 by Jeff.Fisher UE-42631 Stereo off while prox sensor uncovered causes low framerate -Setting maxfps appropriately on 'stereo on/off'. #review-3384107 #jira UE-42631 Change 3338385 on 2017/03/08 by Ryan.Vance r.DisableDistortion was only being used for the mobile renderer Change 3342301 on 2017/03/10 by patrickr.donovan Test updates to TM-VRSmoke. Increased lightmap resolution on QA_MeshTypes meshes to improve readbility and reliablility of tests involving said asset. Rebuilt lighting. Change 3348133 on 2017/03/15 by Ryan.Vance Moving mono cvars to scene rendering to avoid cross module references. There's not a good reason to have them in the hmd module anyway. Change 3348836 on 2017/03/15 by Ryan.Vance Direct multi-view support for gear vr Monoscopic far field with multi-view (blit and direct) support for gear vr Support for translucent objects on both sides of the mono clip plane (due to a sorting issue, objects that straddle the plane composite incorrectly) Fixed missing discards/clears in the multi-view blit Change 3348843 on 2017/03/15 by Ryan.Vance Fixing color/depth target size mismatch when screen percentage scaling results in a size that isn't divisible by 16. Change 3349276 on 2017/03/16 by Keli.Hlodversson Fixing compile errors in GoogleVR after merge from main. Change 3350932 on 2017/03/16 by Ryan.Vance Re-enabling the gearvr plugin on windows. Change 3351977 on 2017/03/17 by Jeff.Fisher Fixing masked member variable. Change 3352314 on 2017/03/17 by Ryan.Vance We need to ensure that we don't select different lod levels for each eye. Change 3352993 on 2017/03/17 by Nick.Whiting Integrating CL 3345824 from Android-DevVR to Dev-VR. Support for device depth pass in SceneCaptureComponent2D Change 3355185 on 2017/03/20 by Nick.Whiting Added ability to disable the autoloading splash screen, which would prevent the hide splash screen node from ever working Change 3355676 on 2017/03/20 by Nick.Whiting PR #3384: [GNUX] SteamVR, OpenGL patch. (Contributed by yaakuro), with some minor modifications Change 3357286 on 2017/03/21 by Jeff.Fisher Fixing GenerateProjectFiles, looks like the .config. was removed from these references in main some time ago. Change 3357435 on 2017/03/21 by Jeff.Fisher Fixing editor build break, looks like a merge mistake. Change 3359960 on 2017/03/23 by Keli.Hlodversson Prevent potential crash when drawing tracking sensor location. Also only fetch HMD location once instead of once per tracking sensor. Change 3361230 on 2017/03/23 by Jeff.Fisher Fixing linux build opengl include problem... maybe. Change 3361638 on 2017/03/23 by Jeff.Fisher Another guess at fixing linux build. Change 3364224 on 2017/03/24 by Keli.Hlodversson Initial implementation of UEVR-576 - Base emulated layer implementation #jira UEVR-668 - Base emulated layer implementation: Initial framework for overrideable default implementation #jira UEVR-669 - Base emulated layer implementation: Face Locked Layers Support #jira UEVR-670 - Base emulated layer implementation: Tracker Locked Layers Support #jira UEVR-671 - Base emulated layer implementation: World Locked Layers Support #jira UEVR-672 - Base emulated layer implementation: Add support for optionally rendering face locked layers into a separate layer Change 3364242 on 2017/03/24 by Keli.Hlodversson SteamVR layers do not support negatve Layer priorities Change 3364263 on 2017/03/24 by Jeff.Fisher Merging //UE4/Dev-Main to Dev-VR (//UE4/Dev-VR) Monoscopicfarfieldrendering was just 'accept source', Ryan is going to look at fixing it up. Change 3364472 on 2017/03/24 by Jeff.Fisher Merge fix Change 3364475 on 2017/03/24 by Jeff.Fisher Fixing gearvr include. Change 3364486 on 2017/03/24 by Jeff.Fisher merge fix Change 3364532 on 2017/03/24 by Ryan.Vance pso update for mono rendering and stereo layers. Change 3364599 on 2017/03/24 by Ryan.Vance Oculus changes for SI1.12 Change 3365159 on 2017/03/26 by Jeff.Fisher include fix Change 3365182 on 2017/03/26 by Jeff.Fisher include fix Change 3366087 on 2017/03/27 by Ryan.Vance Remaining files from Oculus changes for SI1.12 merge request. Fixing a bug in OnlineSubsystem. Temporarily changing the eye padding change to be a shader clear to work around a clear color binding issue. Change 3366492 on 2017/03/27 by Ryan.Vance #jira UE-43294 Moved the clear before we setup state for drawing the mirror window content. It was stomping over state after the pso changes. Going to leave the shader clear in the rift prerender for clearing the eye padding for now. Change 3366929 on 2017/03/27 by Ryan.Vance Fixing compile error Change 3368549 on 2017/03/28 by Jeff.Fisher Merging Change: 3357998 from //UE4/Partner-Google-VR/Engine/... to Dev-VR Upgrade Google VR Plugin to v1.3: *Upgraded GVR NDK to 1.30.0 *Changed some BlueprintFunction to use BlueprintPure *Add the missing bDaydream flag in UEDeployAndroid.cs #review-3384107 Change 3368975 on 2017/03/28 by Ryan.Vance CIS clean up #jira UE-43428, UE-43429, UE-43426, UE-43427 Change 3369028 on 2017/03/28 by Ryan.Vance This is not exacly 'correct', but it's at least what the code was trying to do. Change 3370203 on 2017/03/29 by Ryan.Vance Adding gear vr controller component support. Change 3370918 on 2017/03/29 by Ryan.Vance Merging 3370569 using Partner-Google-VR_to_DevVR Change 3371030 on 2017/03/29 by Ryan.Vance Fixing linux build errors #jira UE-43426 Change 3371036 on 2017/03/29 by Ryan.Vance Oculus 4.16 integration. Not terribly happy with the use of std::string. They promised to clean this up for the next release. Change 3373495 on 2017/03/30 by Jeff.Fisher Merging from Dev-Main, in preparation for 4.16 Change 3373578 on 2017/03/30 by Jeff.Fisher build break, one comma short Change 3373870 on 2017/03/31 by Jeff.Fisher Include order fix. Change 3374001 on 2017/03/31 by Keli.Hlodversson Use DefaultStereoLayers as base for Morpheus implementation. #jira UEVR-709 #jira UE-42919 #rb: Jeff.Fisher Change 3374004 on 2017/03/31 by Keli.Hlodversson Fix rendering for the default Stereo Layers implementation on mobile. Depth test was set to "Never" instead of "Always" Destination texture on GLES is flipped on the Y axis, the coordinates are reversed in the shade when compiled on the relevant platforms. Change 3375125 on 2017/03/31 by Jeff.Fisher UE-43506 Ensure using VRPreview with GoogleVR -Removed the ensure, there is code in there to handle that case, and it works. #jira UE-43506 Change 3375294 on 2017/03/31 by nick.bullard Resaving Plugin content to resovle "saved with empty engine version" #jira UE-43537 Change 3375480 on 2017/03/31 by Jeff.Fisher UEVR-9 PSVR: Social Screen Support -Experimental social screen support for 4.16. -This does the basics of driving output through the Aux port in the proper format for display on the mirror monitor. -Only supports 30fps on the mirror monitor. 60fps will require the implementation of sony system dialogs to deal with incompatable system features (video streaming, remote play). -There is a project setting in Morpheus, under experiemental bEnableSocialScreenSeparateMode. This must be set to true to use this feature. When it is false we avoid allocating the back buffers. -MorpheusFunctionLibrary blueprints now have a node "SetSocialScreenMode" which can switch between SystemMirror (hardware supported mirroring), SeparateTest (alternates black and white), SeparateTexture (displays a texture, eg a render target, specified via blueprint), and SeparateMirror(puts the hmd render buffer on screen - which is both eyes, like a debug mode). -Also finally updated the bEnabled flag in project settings to tell people it's only for PC. #jira UEVR-9 #review-3384107 Change 3375540 on 2017/03/31 by Ryan.Vance #jira UE-43504 Fixing android build break when using a 64 bit isa. Change 3375655 on 2017/03/31 by Jeff.Fisher Fixing missing RGBAToYUV shader problem -This at least unblocks our process. Will revisit before zbr. Change 3375820 on 2017/04/01 by Jeff.Fisher Fixing linux build warning about HAS_MORPHEUS Change 3376050 on 2017/04/02 by Jeff.Fisher UE-43515 Step 'UE4Editor Static Analysis Win64' - Module.OnlineSubsystemOculus.cpp Warnings -Temporary fix for static analysis annotation warnings in OnlineSubsytemOculus. Longer term plan is to eliminate the use of the headers that trigger the warnings. -Just wrap all standard headers in static analysis disables. #jira UE-43515 Change 3376609 on 2017/04/03 by Jeff.Fisher Fixing rgbatoyuvshader include. Change 3377001 on 2017/04/03 by Jeff.Fisher UE-43547 Launch On PS4 fails during Run command - Missing global shader FRGBAToYUV420CS - shader c++ must be compiled so that it can be cooked for ps4. #jira UE-43547 Change 3379858 on 2017/04/04 by Jeff.Fisher Merging //UE4/Dev-Main to Dev-VR (//UE4/Dev-VR) pulling main this should get us ps4 sdk 4.508 Change 3379938 on 2017/04/04 by Ryan.Vance #jira UE-43548 If stereo layers are not being used, don't setup overlay targets as we will never clear/initialize them. The clear happens as part of the default layers PostRenderView_RenderThread call which wont be called if layers aren't being used in the scene. Change 3381519 on 2017/04/05 by Jeff.Fisher UEVR-733 PS4 sdk 4.500 hmd connection api changes break hmd connect. -Handling failure of sceHmdGetDeviceInformation if the hmd is powered off. It now returns an error code about an invalid handle in that case, rather than reporting unready. We just treat the error code like an unready status. #jira UEVR-733 #review-3384107 Change 3382019 on 2017/04/05 by Ryan.Vance Linux: add Vulkan support from dev editor: 3381593 Change 3382021 on 2017/04/05 by Ryan.Vance SteamVR on Linux using Vulkan OpenVR rev to 1_0_6 PR #3412: [GNUX] Initial support for SteamVR using Vulkan on GNUX platform. (Contributed by yaakuro) Change 3382076 on 2017/04/05 by Ryan.Vance Fixing linux steamvr lib path. It changed to something less silly in 1.0.6 Removing the steamvr plugin from the white list for linux. It's looking for a runtime that no one will have installed. Change 3383237 on 2017/04/06 by Ryan.Vance #jira UE-43732 Fixing Android compile issues. We can't wrap portions of a macro with a definie. This should probably be some sort of recursive macro thing since there's so much overlap. Good enough for now. Change 3383353 on 2017/04/06 by Ryan.Vance Fixing include cycles. Change 3383509 on 2017/04/06 by Jeff.Fisher Merging //UE4/Dev-Main to Dev-VR (//UE4/Dev-VR) merging the stuff from dev-mobile [CL 3384106 by Ryan Vance in Main branch]
2017-04-06 22:03:51 -04:00
StereoLayerRender(RHICmdList, SortedSceneLayers, RenderParams);
// Optionally render face-locked layers into a non-reprojected target if supported by the HMD platform
FTexture2DRHIRef OverlayRenderTarget = HMDDevice->GetOverlayLayerTarget_RenderThread(InView.StereoViewIndex, RenderParams.Viewport);
Copying //UE4/Dev-VR to //UE4/Dev-Main (Source: //UE4/Dev-VR @ 3383750) #lockdown Nick.Penwarden ========================== MAJOR FEATURES + CHANGES ========================== Change 3012064 on 2016/06/13 by Nick.Whiting Merging Main -> DevVR Change 3048060 on 2016/07/13 by Nick.Whiting Integrating CL 3045721 from //depot/Partners/Google/AndroidVR-DevVR Upgrade Android and iOS GVR SDK to the latest. Fix the flipped vignette issue when using Unreal's post processing distortion. Change the Daydream & Cardboard mode to use scanline racing. Deprecate the ability to turn off individual UI elements. Change 3235307 on 2016/12/14 by Keli.Hlodversson Filter out excluded HMD modules during FEngineLoop:PreInitHMDDevice. The final selection still happens in UEngine::InitializeHMDDevice as all HMD plugins have not been loaded during PreInit Change 3235308 on 2016/12/14 by Ryan.Vance #jira UEVR-478 Monoscopic far field improvements Shader changes are now gated behind the read only cvar vr.MonoscopicFarField. Changing this requires a shader compile. Moved the mono rendering mode to the cvar vr.MonoscopicFarFieldMode. This is writable, so users can enable/disable mono rendering on the fly if the above cvar is enabled. Only write to the alpha channel in the mobile base pass if the object is opaque and MONOSCOPIC_FAR_FIELD is defined. Addressed code review comments. Change 3235397 on 2016/12/14 by Keli.Hlodversson [Oculus] Only enable GearVR platform on Windows if Oculus service is running Original author: Loren.McQuade Change 3235762 on 2016/12/14 by Keli.Hlodversson Add explicit parentheses to placate the build bots. Change 3242318 on 2016/12/21 by Ryan.Vance Working around pixel density crash. Change 3242522 on 2016/12/21 by Ryan.Vance Missing flag clear so our adaptive test was always returning true. Change 3243173 on 2016/12/22 by Ryan.Vance Integrating post present callback implementation from 4.14.1 Change 3248633 on 2017/01/05 by Keli.Hlodversson Copying //Tasks/UE4/Dev-VR-Refactoring to Dev-VR-Minimal (//UE4/Dev-VR-Minimal) Change 3248723 on 2017/01/05 by Keli.Hlodversson Fix after merge. EnablePositionalTracking no longer exists. Change 3249484 on 2017/01/06 by Keli.Hlodversson Add missing includes Change 3249714 on 2017/01/06 by Keli.Hlodversson Remove monolithic header include Change 3249980 on 2017/01/06 by Keli.Hlodversson SteamVR: Remove leftover unused WindowMirrorMode member variable Change 3252432 on 2017/01/10 by Keli.Hlodversson Submitting change by Loren McQuade to fix monolithic builds. Unshelved from pending changelist '3251436': Change 3257373 on 2017/01/13 by Keli.Hlodversson #jira UEVR-411: Finish renaming/removing/remodelling the remaining Oculus (Rift+GearVR) commands #jira UEVR-412: Rename and merge remaining Morpheus console commands #jira UEVR-417: Remove Exec from IHeadMountedDisplay Change 3269971 on 2017/01/24 by Jeff.Fisher UEVR-498 move controller is missing world to meters UEVR-522 PS4 motion controller worldscale support. -Passing world to meters scale into getControllerOrientationAndPosition because the thing asking about it ought to be part of a world, and know what it should be. This also avoids making PS4 motion controllers dependent on the HMD. Note Google VR Controller doesn't do position, so doesnt' care about scale. Oculus already had internal threadsafe tracking of world scale, so I left that. Steam handles world scale below our input level. -Also adding PlayerIndex member to FSceneView so we can figure out which view the MotionControllerComponent should get its worldscale from for the late render thread update. #jira UEVR-498 #review-3384107 Change 3288308 on 2017/02/06 by Jeff.Fisher UEVR-517 Detect MotionController Connectivity -PS4 can only track 2 controllers and 1 hmd. Support for dealing with that is needed. -Also need to support multiple motion controller components mapped to a single controller. Licencees have done that before. -Created a new interface IMotionTrackingSystemManagement, and implements it for PS4Tracker on PS4. -Created a MotionTrackedDeviceFunctionLibrary to expose that interface to blueprint. -With those one can enable and disable tracking on ps4 controllers and query their state to stay within the controller tracking limit. -PS4Tracker also keeps a blackboard of the enable/disable state so that one can enable or disable controllers that have not been connected yet, and have them enable tracking or not when they are connected. -DS4 controller no longer jumps back to 000 if it loses tracking. #review-3384107 #jira UEVR-517 Change 3288309 on 2017/02/06 by Keli.Hlodversson Add file missing from CL#3257373. Change 3288311 on 2017/02/06 by Jeff.Fisher UEVR-517 Detect MotionController Connectivity - Test content. -tm-motionControllers has a third mode where all playstation motion controllers for player 0 are availalbe. You can toggle them to track or not with ctrl-P,G,L,R for pad, gun, leftmove, rightmove or with alt-P,G,L,R. Ctrl tests doing so via MotionControllerComponent. Alt tests doing so by player index and controller type enum. -ctrl-A disables tracking of all controllers -alt-A disables tracking of all controllers for player 0 -ctrl-D toggles enabling new controllers by default -Also fixed one button not working in one of the other test modes for the Aim (gun) controller. -The controller 'models' have an arrow out the front. It is black if disabled. Red if enabled, but no tracker is active, yellow if tracked but inertial only, and green if fully tracked by the camera. -This logic is in the QA_MoCoAll blueprint. Change 3291601 on 2017/02/07 by Jeff.Fisher UEVR-536 PSVR motion controller tracking problem with multiple controllers -Previous code called GetRelativeTransform from the render thread, but the game thread could update it at any time. This caches that transform so that it can be safely used in the render thread. #jira UEVR-536 #review-3384107 @Ryan.Vance Change 3292460 on 2017/02/08 by Jeff.Fisher PS4 sceVrTrackerGetResult() error warning logging improved, and explanatory comment added. Change 3308771 on 2017/02/17 by Keli.Hlodversson Rename GoogleVR console commands #jira UEVR-412 Change 3309156 on 2017/02/17 by Keli.Hlodversson Track changes in r.ScreenPercentage on GoogleVR and set RenderTargetSize accordingly. Change 3311999 on 2017/02/20 by Keli.Hlodversson Create a default implementation for RecordAnalytics. Also create an initial stub for FHeadMountedDisplayBase for future default implementations of common HMD functionality. Make implementing IHeadMountedDisplay::GetDeviceName mandatory instead of defaulting to "Unknown" #jira UE-21878 #jira UEVR-213 Change 3313467 on 2017/02/20 by Ryan.Vance #jira UE-41604 3278583 pCustomPresent->AllocateRenderTargetTexture may return false, if we blindly return true we can end up with an invalid render target since the fall back sceneviewport will be skipped. 3278536 Adding ovrError_NoHmd to our sanity check in OnStartGameFrame. Change 3314002 on 2017/02/21 by Keli.Hlodversson Fix compilation on PS4 and Linux Change 3326722 on 2017/03/01 by Jeff.Fisher Merging //UE4/Dev-Main to Dev-VR (//UE4/Dev-VR) Integrating 4.15 from main. Change 3327567 on 2017/03/01 by Jeff.Fisher UEVR-588 Oculus crash on "stereo on" when the proximity sensor is not triggered. Duplicating from Release-4.15 cl 3327481, 3327542 -Don't ovr_SubmitFrame when the layers need to be recreated. They stay dirty until rendering is unpaused. #jira UEVR-588 #review-3384107 Change 3328098 on 2017/03/01 by Jeff.Fisher 4.15 merge fixes -Fixed deprecated enum name function usage. -Fixed world scale usage in GoogleVRController. -Fixed compile break in PS4Tracker. Change 3328271 on 2017/03/01 by Jeff.Fisher 2.15 merge -restroging GoogleVRController::GetWorldToMetersScale... cause it is used everywhere. Change 3328307 on 2017/03/01 by Jeff.Fisher 4.15 merge -More googlevr worldscale fixes. Change 3328312 on 2017/03/01 by Jeff.Fisher 4.15 merge -removing 2 unused includes Change 3330610 on 2017/03/02 by Jeff.Fisher 4.15 merge -fixing linux build Change 3333952 on 2017/03/06 by Keli.Hlodversson Implement common stereo layer management base class and use it in SteamVR and PS4. Fixes an outstanding bug in SteamVR where texures are updated every frame regardles of whether the continous update flag is set or not. #jira UEVR-628 #jira UE-42555 Change 3334961 on 2017/03/07 by Keli.Hlodversson Add missing include to fix non-unity builds Change 3336200 on 2017/03/07 by Keli.Hlodversson Fix compilation issues. (https://ec-01.epicgames.net/commander/link/jobDetails/jobs/7568252?jobName=UE4+Dev-VR+-+CL+3334961+-+Nightly+Build&s=Jobs) * Pre VS2015 compilers don't like mixing wide and unmarked strings in concatenation. Unfortunately LOCTEXT hides the call to the TEXT macro, completely hinding the prefix (which only gets added to the first fragment.) * Switch apparently doesn't know how to format a size_t for analytics either. Also: Typo in backwards compatibility command name alias Change 3337347 on 2017/03/08 by Jeff.Fisher UE-42631 Stereo off while prox sensor uncovered causes low framerate -Setting maxfps appropriately on 'stereo on/off'. #review-3384107 #jira UE-42631 Change 3338385 on 2017/03/08 by Ryan.Vance r.DisableDistortion was only being used for the mobile renderer Change 3342301 on 2017/03/10 by patrickr.donovan Test updates to TM-VRSmoke. Increased lightmap resolution on QA_MeshTypes meshes to improve readbility and reliablility of tests involving said asset. Rebuilt lighting. Change 3348133 on 2017/03/15 by Ryan.Vance Moving mono cvars to scene rendering to avoid cross module references. There's not a good reason to have them in the hmd module anyway. Change 3348836 on 2017/03/15 by Ryan.Vance Direct multi-view support for gear vr Monoscopic far field with multi-view (blit and direct) support for gear vr Support for translucent objects on both sides of the mono clip plane (due to a sorting issue, objects that straddle the plane composite incorrectly) Fixed missing discards/clears in the multi-view blit Change 3348843 on 2017/03/15 by Ryan.Vance Fixing color/depth target size mismatch when screen percentage scaling results in a size that isn't divisible by 16. Change 3349276 on 2017/03/16 by Keli.Hlodversson Fixing compile errors in GoogleVR after merge from main. Change 3350932 on 2017/03/16 by Ryan.Vance Re-enabling the gearvr plugin on windows. Change 3351977 on 2017/03/17 by Jeff.Fisher Fixing masked member variable. Change 3352314 on 2017/03/17 by Ryan.Vance We need to ensure that we don't select different lod levels for each eye. Change 3352993 on 2017/03/17 by Nick.Whiting Integrating CL 3345824 from Android-DevVR to Dev-VR. Support for device depth pass in SceneCaptureComponent2D Change 3355185 on 2017/03/20 by Nick.Whiting Added ability to disable the autoloading splash screen, which would prevent the hide splash screen node from ever working Change 3355676 on 2017/03/20 by Nick.Whiting PR #3384: [GNUX] SteamVR, OpenGL patch. (Contributed by yaakuro), with some minor modifications Change 3357286 on 2017/03/21 by Jeff.Fisher Fixing GenerateProjectFiles, looks like the .config. was removed from these references in main some time ago. Change 3357435 on 2017/03/21 by Jeff.Fisher Fixing editor build break, looks like a merge mistake. Change 3359960 on 2017/03/23 by Keli.Hlodversson Prevent potential crash when drawing tracking sensor location. Also only fetch HMD location once instead of once per tracking sensor. Change 3361230 on 2017/03/23 by Jeff.Fisher Fixing linux build opengl include problem... maybe. Change 3361638 on 2017/03/23 by Jeff.Fisher Another guess at fixing linux build. Change 3364224 on 2017/03/24 by Keli.Hlodversson Initial implementation of UEVR-576 - Base emulated layer implementation #jira UEVR-668 - Base emulated layer implementation: Initial framework for overrideable default implementation #jira UEVR-669 - Base emulated layer implementation: Face Locked Layers Support #jira UEVR-670 - Base emulated layer implementation: Tracker Locked Layers Support #jira UEVR-671 - Base emulated layer implementation: World Locked Layers Support #jira UEVR-672 - Base emulated layer implementation: Add support for optionally rendering face locked layers into a separate layer Change 3364242 on 2017/03/24 by Keli.Hlodversson SteamVR layers do not support negatve Layer priorities Change 3364263 on 2017/03/24 by Jeff.Fisher Merging //UE4/Dev-Main to Dev-VR (//UE4/Dev-VR) Monoscopicfarfieldrendering was just 'accept source', Ryan is going to look at fixing it up. Change 3364472 on 2017/03/24 by Jeff.Fisher Merge fix Change 3364475 on 2017/03/24 by Jeff.Fisher Fixing gearvr include. Change 3364486 on 2017/03/24 by Jeff.Fisher merge fix Change 3364532 on 2017/03/24 by Ryan.Vance pso update for mono rendering and stereo layers. Change 3364599 on 2017/03/24 by Ryan.Vance Oculus changes for SI1.12 Change 3365159 on 2017/03/26 by Jeff.Fisher include fix Change 3365182 on 2017/03/26 by Jeff.Fisher include fix Change 3366087 on 2017/03/27 by Ryan.Vance Remaining files from Oculus changes for SI1.12 merge request. Fixing a bug in OnlineSubsystem. Temporarily changing the eye padding change to be a shader clear to work around a clear color binding issue. Change 3366492 on 2017/03/27 by Ryan.Vance #jira UE-43294 Moved the clear before we setup state for drawing the mirror window content. It was stomping over state after the pso changes. Going to leave the shader clear in the rift prerender for clearing the eye padding for now. Change 3366929 on 2017/03/27 by Ryan.Vance Fixing compile error Change 3368549 on 2017/03/28 by Jeff.Fisher Merging Change: 3357998 from //UE4/Partner-Google-VR/Engine/... to Dev-VR Upgrade Google VR Plugin to v1.3: *Upgraded GVR NDK to 1.30.0 *Changed some BlueprintFunction to use BlueprintPure *Add the missing bDaydream flag in UEDeployAndroid.cs #review-3384107 Change 3368975 on 2017/03/28 by Ryan.Vance CIS clean up #jira UE-43428, UE-43429, UE-43426, UE-43427 Change 3369028 on 2017/03/28 by Ryan.Vance This is not exacly 'correct', but it's at least what the code was trying to do. Change 3370203 on 2017/03/29 by Ryan.Vance Adding gear vr controller component support. Change 3370918 on 2017/03/29 by Ryan.Vance Merging 3370569 using Partner-Google-VR_to_DevVR Change 3371030 on 2017/03/29 by Ryan.Vance Fixing linux build errors #jira UE-43426 Change 3371036 on 2017/03/29 by Ryan.Vance Oculus 4.16 integration. Not terribly happy with the use of std::string. They promised to clean this up for the next release. Change 3373495 on 2017/03/30 by Jeff.Fisher Merging from Dev-Main, in preparation for 4.16 Change 3373578 on 2017/03/30 by Jeff.Fisher build break, one comma short Change 3373870 on 2017/03/31 by Jeff.Fisher Include order fix. Change 3374001 on 2017/03/31 by Keli.Hlodversson Use DefaultStereoLayers as base for Morpheus implementation. #jira UEVR-709 #jira UE-42919 #rb: Jeff.Fisher Change 3374004 on 2017/03/31 by Keli.Hlodversson Fix rendering for the default Stereo Layers implementation on mobile. Depth test was set to "Never" instead of "Always" Destination texture on GLES is flipped on the Y axis, the coordinates are reversed in the shade when compiled on the relevant platforms. Change 3375125 on 2017/03/31 by Jeff.Fisher UE-43506 Ensure using VRPreview with GoogleVR -Removed the ensure, there is code in there to handle that case, and it works. #jira UE-43506 Change 3375294 on 2017/03/31 by nick.bullard Resaving Plugin content to resovle "saved with empty engine version" #jira UE-43537 Change 3375480 on 2017/03/31 by Jeff.Fisher UEVR-9 PSVR: Social Screen Support -Experimental social screen support for 4.16. -This does the basics of driving output through the Aux port in the proper format for display on the mirror monitor. -Only supports 30fps on the mirror monitor. 60fps will require the implementation of sony system dialogs to deal with incompatable system features (video streaming, remote play). -There is a project setting in Morpheus, under experiemental bEnableSocialScreenSeparateMode. This must be set to true to use this feature. When it is false we avoid allocating the back buffers. -MorpheusFunctionLibrary blueprints now have a node "SetSocialScreenMode" which can switch between SystemMirror (hardware supported mirroring), SeparateTest (alternates black and white), SeparateTexture (displays a texture, eg a render target, specified via blueprint), and SeparateMirror(puts the hmd render buffer on screen - which is both eyes, like a debug mode). -Also finally updated the bEnabled flag in project settings to tell people it's only for PC. #jira UEVR-9 #review-3384107 Change 3375540 on 2017/03/31 by Ryan.Vance #jira UE-43504 Fixing android build break when using a 64 bit isa. Change 3375655 on 2017/03/31 by Jeff.Fisher Fixing missing RGBAToYUV shader problem -This at least unblocks our process. Will revisit before zbr. Change 3375820 on 2017/04/01 by Jeff.Fisher Fixing linux build warning about HAS_MORPHEUS Change 3376050 on 2017/04/02 by Jeff.Fisher UE-43515 Step 'UE4Editor Static Analysis Win64' - Module.OnlineSubsystemOculus.cpp Warnings -Temporary fix for static analysis annotation warnings in OnlineSubsytemOculus. Longer term plan is to eliminate the use of the headers that trigger the warnings. -Just wrap all standard headers in static analysis disables. #jira UE-43515 Change 3376609 on 2017/04/03 by Jeff.Fisher Fixing rgbatoyuvshader include. Change 3377001 on 2017/04/03 by Jeff.Fisher UE-43547 Launch On PS4 fails during Run command - Missing global shader FRGBAToYUV420CS - shader c++ must be compiled so that it can be cooked for ps4. #jira UE-43547 Change 3379858 on 2017/04/04 by Jeff.Fisher Merging //UE4/Dev-Main to Dev-VR (//UE4/Dev-VR) pulling main this should get us ps4 sdk 4.508 Change 3379938 on 2017/04/04 by Ryan.Vance #jira UE-43548 If stereo layers are not being used, don't setup overlay targets as we will never clear/initialize them. The clear happens as part of the default layers PostRenderView_RenderThread call which wont be called if layers aren't being used in the scene. Change 3381519 on 2017/04/05 by Jeff.Fisher UEVR-733 PS4 sdk 4.500 hmd connection api changes break hmd connect. -Handling failure of sceHmdGetDeviceInformation if the hmd is powered off. It now returns an error code about an invalid handle in that case, rather than reporting unready. We just treat the error code like an unready status. #jira UEVR-733 #review-3384107 Change 3382019 on 2017/04/05 by Ryan.Vance Linux: add Vulkan support from dev editor: 3381593 Change 3382021 on 2017/04/05 by Ryan.Vance SteamVR on Linux using Vulkan OpenVR rev to 1_0_6 PR #3412: [GNUX] Initial support for SteamVR using Vulkan on GNUX platform. (Contributed by yaakuro) Change 3382076 on 2017/04/05 by Ryan.Vance Fixing linux steamvr lib path. It changed to something less silly in 1.0.6 Removing the steamvr plugin from the white list for linux. It's looking for a runtime that no one will have installed. Change 3383237 on 2017/04/06 by Ryan.Vance #jira UE-43732 Fixing Android compile issues. We can't wrap portions of a macro with a definie. This should probably be some sort of recursive macro thing since there's so much overlap. Good enough for now. Change 3383353 on 2017/04/06 by Ryan.Vance Fixing include cycles. Change 3383509 on 2017/04/06 by Jeff.Fisher Merging //UE4/Dev-Main to Dev-VR (//UE4/Dev-VR) merging the stuff from dev-mobile [CL 3384106 by Ryan Vance in Main branch]
2017-04-06 22:03:51 -04:00
if (OverlayRenderTarget.IsValid())
{
RHICmdList.EndRenderPass();
FRHIRenderPassInfo RPInfoOverlayRenderTarget(OverlayRenderTarget, ERenderTargetActions::Load_Store);
RHICmdList.BeginRenderPass(RPInfoOverlayRenderTarget, TEXT("StereoLayerRenderIntoOverlay"));
Copying //UE4/Dev-Rendering to //UE4/Dev-Main (Source: //UE4/Dev-Rendering @ 3461187) #lockdown Nick.Penwarden ========================== MAJOR FEATURES + CHANGES ========================== Change 3388286 on 2017/04/11 by Chris.Bunner Fix mips in texture GnmUAV creation. Change 3388287 on 2017/04/11 by Chris.Bunner Improved PS/CS code sharing for TemporalAA. Change 3388291 on 2017/04/11 by Chris.Bunner HLODs now correctly hide their children in shadow maps. Propagate bCastFarShadow flag on HLOD generation. #jira UE-42254 Change 3388448 on 2017/04/11 by Brian.Karis Better handle divide by zero Change 3388449 on 2017/04/11 by Brian.Karis Optimizations to shading model math. PR #3340: Bug fixes related to shader TODOs (Contributed by vgfx) Change 3388455 on 2017/04/11 by Uriel.Doyon Changed Remove for RemoveSwap when clearing dynamic component references Change 3388612 on 2017/04/11 by Simon.Tourangeau Support shaders in projects and in plugins When searching for a shader it will - First look in Engine/Shaders as usual - Then in project's Shader folder - Then in all enabled plugin Shader folders Project or plugin must be loaded in PostConfigInit phase Tested in PIE, engine (cooked, packaged) Change 3388819 on 2017/04/11 by Arne.Schober DR - Faster MorpthTarget implementation. Changed the previous Gather aproach to a scatter based one. Reaching about 110GB/s on PS4 which is up to 4x faster than the previous implementation. On PC DX11 the impact is lower due to unecessary UAV barriers but still 2x faster on AMD and up to 6x faster on Nvidia Hardware. #RB Lina.Halper, Rolando.Caloca Change 3388862 on 2017/04/11 by Guillaume.Abadie Allows Motion Blur and TAA in scene capture 2d. Change 3388953 on 2017/04/11 by Uriel.Doyon Fixed issue where lights from hidden levels where affecting the lighting build, by checking if the light is registered before adding it. #UE-43220 Change 3389138 on 2017/04/11 by Arne.Schober DR - Fix crash when opening a Level without Contentbrowser open. #RB Matt.Kuhlenschmidt Change 3389400 on 2017/04/11 by Uriel.Doyon - Renamed FMaterialResource::IsSeparateTranslucencyEnabled() to FMaterialResource::IsTranslucencyAfterDOFEnabled() - Removed different logic to determine if translucency after DOF was enabled, and centralized it into a single function: FSceneViewFamily::AllowTranslucencyAfterDOF() - FSceneRenderTargets::FinishRenderingSeparateTranslucency() now only resolves a single view, allowing better Begin/Finish scopes. - Renamed FSceneRenderTargets::SeparateTranslucencyDepthRT into FSceneRenderTargets::DownsampledTranslucencyDepthRT since this one is only allocated when rendering in downsampled mode. - Standard translucency is now rendered in the same resolution than translucency after DOF. (downsampled or full resolution) - Removed RenderTranslucencyParallel and merged it's logic into RenderTranslucency. Renamed DrawAllTranslucencyPasses to RenderViewTranslucency and added a parallel version RenderViewTranslucencyParallel. - Moved all debug draw logic (VisualizeLPV, ViewMeshElements and SimpleElementCollector) to a common place. - New option "r.AllowDownsampledStandardTranslucency" to control the downsampling of standard translucency. Affect blend module materials #jira UE-39505 Change 3389860 on 2017/04/12 by Richard.Wallis UE-41407 Cable actor does not render correctly in viewport on Mac. Build the mesh at creation time - call into exisiting mesh create function. Change 3390933 on 2017/04/12 by Arne.Schober DR - potential fix for UE-43125 where the this pointer might get invalidated in the middle of the function #RB Marcus.Wassmer Change 3391010 on 2017/04/12 by Ben.Marsh Compile UE4Game non-unity for Mac as part of nightly builds in //UE4/Dev-Rendering. Change 3391412 on 2017/04/12 by Uriel.Doyon Mesh Decals are now sorted according to the component TranslucencySortPriority. #jira UE-43053 Change 3392117 on 2017/04/13 by Guillaume.Abadie Integrates Raven's experimental PCSS for cascaded shadow map hidden behind a CVar. Change 3392179 on 2017/04/13 by Guillaume.Abadie Attempts to fix linux compilation by removing mistakenly submitted dead code. Change 3392231 on 2017/04/13 by Guillaume.Abadie Fixes a wrong enum value real quick in FRenderingObjectVersion I introduced after main integration... Oups... Change 3393879 on 2017/04/14 by Guillaume.Abadie Attempts to fix linux compilation warning. Change 3393881 on 2017/04/14 by Guillaume.Abadie Back out changelist 3393879 Change 3393882 on 2017/04/14 by Guillaume.Abadie Attempts #2 to fix linux compilation error. Change 3394100 on 2017/04/14 by Chris.Bunner Corrected material shared sampler usage with mip-biasing. Change 3394174 on 2017/04/14 by Rolando.Caloca DR - Change ensure to warning Change 3394221 on 2017/04/14 by Marcus.Wassmer Fix poseable mesh bounds calculation. Change 3396238 on 2017/04/17 by David.Hill Fix Bloom with LensFlare Duplicating fix - will also fix directly in 4.16 #jira 44050 Change 3397055 on 2017/04/17 by Joe.Graf Fixed Windows specific assumptions in Slate File Dialog Window's file filtering that lead to crashes #CodeReview: matt.kuhlenschmidt #rb: n/a Change 3397921 on 2017/04/18 by Joe.Graf Rewrote SlateFileDlgWindow's file filtering to allow for extensionless file selection and to remove the O(n^2) file filtering #CodeReview: arciel.rekman, matt.kuhlenschmidt #rb: n/a Change 3398406 on 2017/04/18 by Rolando.Caloca DR - Fix shaders in plugins on Mac Change 3399546 on 2017/04/19 by Benjamin.Hyder Updating content for test levels (HDR, Bloom_FFT, DistanceFields_IndirectShadows) Change 3399725 on 2017/04/19 by Guillaume.Abadie Avoids compiling PCSS shaders for SM4. Change 3400295 on 2017/04/19 by Michael.Trepka Fixed metal shader compile errors in MorphTargets.usf Change 3400457 on 2017/04/19 by Michael.Trepka Merged Rolando's shader fixes Change 3400473 on 2017/04/19 by Arne.Schober DR - provide Aftermath Reason when init failed. #RB none Change 3400699 on 2017/04/19 by Arne.Schober DR - Fixed Text macro #RB none Change 3402280 on 2017/04/20 by Simon.Tovey Minor cascade fix #tests no crash #jira UE-41560 Change 3402517 on 2017/04/20 by Arne.Schober DR - Fix static analysis warning #RB none Change 3403897 on 2017/04/21 by Arne.Schober DR - [UE-43898] - Someone missed a shaderversion bump which poisoned the DCC #RB None #jira UE-43898 Change 3404591 on 2017/04/21 by Olaf.Piesche #jira UE-41979 Should never be crashing there, unless the mesh is changed after Init of the effect instance; this change safeguards against the number of mesh sections (and hence materials) changing after creation of the dynamic data to avoid the crash. Change 3407451 on 2017/04/25 by Daniel.Wright Fixed Indirect Lighting Cache updates caused by capsule indirect shadows forcing point samples, breaking primitives using ILCQ_Volume Change 3407452 on 2017/04/25 by Daniel.Wright Added r.AOJitterConeDirections, although disabled by default because it requires the temporal filter to be much stronger Change 3408397 on 2017/04/25 by Daniel.Wright ViewFamily.bRealtimeUpdate is set to false if Slate is throttling (like when toggling show flags). Volumetric fog discards the temporal history when not realtime, so you can see changes immediately. Change 3408428 on 2017/04/25 by Daniel.Wright Changed 'r.AOMaxObjectsPerCullTile' default back to 512 as 256 causes artifacts with RTDF shadows Change 3409764 on 2017/04/26 by Daniel.Wright Force dumping shader debug info for Global shaders when r.ShaderDevelopmentMode is enabled. Most of the shaders you want to look at in a GPU capture are global shaders, and global shaders create few debug files. 'recompileshaders global' time 35s -> 38s for SM5. Change 3411659 on 2017/04/27 by Daniel.Wright [Copy] Set Xbox One engine default screen percentage to 83.33 (1600x900), as ESRAM choices are dependent on this Change 3411660 on 2017/04/27 by Daniel.Wright [Copy] Global distance field composite shader has a version for each flattened axis, which improves efficiency when updating a slab which is what camera movement typically causes Change 3411667 on 2017/04/27 by Daniel.Wright [Copy] Discard distance field AO history buffer if it doesn't match the new buffer size. This prevents reading uinitialized data after a scene render target resize. Change 3411668 on 2017/04/27 by Daniel.Wright [Copy] Better indirect capsule shadow draw event info Change 3411669 on 2017/04/27 by Daniel.Wright [Copy] Pass down FeatureLevel to AddSubjectPrimitive and GatherShadowsForPrimitiveInner instead of calling the scene's virtual function. Showed up prominently in a sampling profile. Change 3411755 on 2017/04/27 by Daniel.Wright [Copy] Occlusion queries are now always done before the base pass if a nearly full prepass is being used(DDM_AllOccluders or DDM_AllOpaque) * Removed r.OcclusionQueryLocation Change 3411827 on 2017/04/27 by Daniel.Wright [Copy] Much cheaper implementation of IsForwardShadingEnabled which showed up prominently in sampling profiles - inlined function and no more unnecessary thread safety overhead Change 3411829 on 2017/04/27 by Daniel.Wright Added an ensure to console manager when doing FindTConsoleVariableData* on a FAutoConsoleVariableRef Change 3411837 on 2017/04/27 by Daniel.Wright [Copy] Worked around slow memcpy's being used to sort FSortedLightSceneInfo Change 3411838 on 2017/04/27 by Daniel.Wright [Copy] Skip tracking MaterialRenderProxyMap on cooked platforms Change 3411843 on 2017/04/27 by Daniel.Wright [Copy] Fixed r.ParallelShadows on PS4 and enabled by default engine-wide (saves 5ms RT with CSM) * Gnm was not tracking DepthClearValue when a depth target was set but not cleared * Gnm has a bug where TargetsNeedingEliminateFastClear does not persist across commandlist breaks. Moved FinishRenderingGBuffer before RenderShadowDepthMaps to workaround (accidentally not in this changelist) * Shadow depth rendering was not using BindClearMRTValues to populate GNM parallel commandlist TargetsNeedingEliminateFastClear values Change 3411873 on 2017/04/27 by Daniel.Wright [Copy] Deferred uniform expression caching. Setting multiple parameters on a material only causes its uniform expressions to be recached once. * 280 calls to CacheUniformExpressions -> 120 during Fortnite combat (6.5ms -> 3.4ms) Change 3411891 on 2017/04/27 by Daniel.Wright [Copy] GatherShadowPrimitives optimizations * Total GatherShadowPrimivies went from 2.3ms -> 1.3ms on PS4 with these changes in GPUPerfTest (duplicated 3x) * Much flatter primitive octree (16 -> 256 max primitives) * Primitives are culled against the shadow frustum before FPrimitiveSceneInfo or FPrimitiveSceneProxy are dereferenced in FilterPrimitiveForShadows * FilterPrimitiveForShadows work is done in a ParallelFor. Primitive octree nodes are processed in different jobs. * StaticMeshWholeSceneShadowBatchVisibility now only stores entries for meshes with bRequiresPerElementVisibility (landscape). Previously it was allocating and zeroing 500Kb 3x per frame (main view + 2 cascades) which cost ~.8ms on PS4. Change 3412192 on 2017/04/27 by Michael.Trepka Fixed Clang compile errors in FortniteGame, partial copy of CL 3313426 Change 3412547 on 2017/04/27 by Daniel.Wright Fixed leak of FShadowMapAllocation and FLightMapAllocation's found by licensee Change 3414239 on 2017/04/28 by Arne.Schober DR - UE-44500 - Removed use of Structured Buffer from MorphTargets due to HLSLCC not supporting it. #RB none #jira UE-44500 Change 3414754 on 2017/04/28 by Daniel.Wright Added VolumetricFogEmissive to ExponentialHeightFogComponent * Volumetric fog does not yet support precomputed lighting, so this is the only way to get an ambient lighting term Change 3416859 on 2017/05/01 by Arne.Schober DR - Remove FeatureLevel from the Clear Functions to reduce area of error #RB Rolando.Caloca Change 3420750 on 2017/05/03 by Arne.Schober DR - [UE-44497] - Fix several PS4 validation layer issues #RB Marcus.Wassmer Change 3422869 on 2017/05/04 by Benjamin.Hyder Fix compile error from merge. Change 3423938 on 2017/05/04 by Marc.Olano [UE-44453] Fix bloom problems by moving saturate after vector math Change 3424494 on 2017/05/04 by Olaf.Piesche #jira UE-44589 When using FindTCosoleVariableData, the CVar can not be an FAutoConsoleVariable. #tests as described in jira ticket Change 3424754 on 2017/05/04 by Uriel.Doyon Fixed call to get texture compressor module outside the main thread. #jira UE-42168 Change 3425447 on 2017/05/05 by Uriel.Doyon #buildfix Change 3427042 on 2017/05/05 by Arne.Schober DR - Fix one of my typos #RB none Change 3428119 on 2017/05/08 by Marcus.Wassmer Fix UE-44733 static analysis warning. Change 3428222 on 2017/05/08 by Uriel.Doyon Fixed bad condition in translucency rendering #jira UE-44452 Change 3429794 on 2017/05/08 by Uriel.Doyon Fixed issues with lightshafts and low res translucency. #jira UE-44452 Change 3430921 on 2017/05/09 by Rolando.Caloca DR - Get additional function pointers for D3DReflect, Compile and Disassemble instructions from the same DLL when compiling D3D11 shaders. - Also fixes using the correct fxc.exe path to match the DLL we distribute. Change 3431156 on 2017/05/09 by Rolando.Caloca DR - Remove unused code Change 3431396 on 2017/05/09 by David.Hill Copy of changes made directly in 4.16 ( CL 341037 ) to be submitted to dev-rendering #jira UE-44641 Change 3431400 on 2017/05/09 by Rolando.Caloca DR - Fix typo Change 3431527 on 2017/05/09 by David.Hill #rb: none Oops. comment out r.ShaderDevelopmentMode =1 Change 3431590 on 2017/05/09 by Daniel.Wright Removed early return landmine in USceneCaptureComponent2D::Serialize Change 3431591 on 2017/05/09 by Daniel.Wright Disallow map building while in PIE, or PIE while buildling lighting Change 3431594 on 2017/05/09 by Daniel.Wright Added RenderTargetFormat to UTextureRenderTarget2D, with choices of 8 bit, 16fp, 32fp and 1, 2 or 4 channels. Change 3431667 on 2017/05/09 by Daniel.Wright Volumetric fog now supersamples lighting when the history is not available, reducing noise on areas that just came on-screen or after a camera cut. * The number of samples is controlled by r.VolumetricFog.HistoryMissSupersampleCount, defaults to 4, cinematic scalability uses 16 * Under fast camera movement, volumetric fog cost went from 1.79ms -> 1.97ms with 4 samples, on a 970GTX Change 3432366 on 2017/05/10 by Richard.Wallis Fix for MetalRHI Asserts When Using "Profile GPU" With RHI-Thread/Parallel-Execution. Don't insert events when not in RHIThread or the actual single-threaded-render thread. #jira UE-36006 Change 3432367 on 2017/05/10 by Richard.Wallis Fix for Metal ReStartRenderPass assert with profiling. macOS metal asserts when using "profileGPU" even with -norhithread argument set. Added no action to the allowed render pass restart store actions for the depth buffer avoiding the assert. Interested to know the details if this is not a valid assumption to make - throwing away the depth buffer after a render pass I think would be a common case. #jira UE-44322 Change 3432409 on 2017/05/10 by Richard.Wallis Merged across CL 3415890 from Release-4.16 fix for (jira UE-43895) Fix for deferred store actions getting cleared when we don't have a valid render target. Change 3432833 on 2017/05/10 by Daniel.Wright Fixed Ocean compile error Change 3432874 on 2017/05/10 by Marc.Olano Improved captions for Noise and VectorNoise material nodes Change 3432947 on 2017/05/10 by Richard.Wallis Fix for shared Material Native Shader Libraries Don't Function With Iterative Cooking. Keep latest versions of shader byte code in native shared material packaged build in an intermediate directory than can be reused on a later iterative cook. - Doesn't handle deletion of the intermediate directory contents. Assumed to be a higher level requirement on non iterative cook flag. #jira UE-44657 Change 3433484 on 2017/05/10 by Arne.Schober DR - UE-44393 - Move ShaderPlatform into TShaderMap for extra debuginformation when it fails to find a proper shader. Also log when Gobalshaders are verified and recompiled. #jira UE-44393 #RB Daniel.Wright Change 3433515 on 2017/05/10 by Arne.Schober DR - Fix a bug where recompileshaders changed while compiling causes a crash where the chached local vertex factories are mutated while been used. #RB Daniel.Wright Change 3433606 on 2017/05/10 by Daniel.Wright Fixed static shadowing of volumetric fog and translucency causing shadowing past the lightmass importance volume. Change 3433619 on 2017/05/10 by Daniel.Wright Skip recapturing reflection captures when PropagateLightingScenarioChange is being called for a level unload. This leaves stale results in reflection captures around when hiding a level in the editor, but avoids the double recapture that happens when swapping lighting scenarios in game, and the unnecessary reflection capture update when exiting PIE. Change 3433795 on 2017/05/10 by Arne.Schober DR - add cmdline to select a GPU vendor when multiple GPUs from differnt Vendors are installed into the same Machine #RB marcus.Wassmer Change 3433941 on 2017/05/10 by Daniel.Wright Cone vs tile bounding sphere intersection tests for Light Grid culling of spotlights, which provides much tighter culling than just View space tile AABB vs light bounding sphere. * Forward shading BasePass 3.7ms -> 2.4ms in a scene with 24 spotlights on 970GTX * Volumetric fog 2.87ms -> 2.09ms in the same scene Change 3435139 on 2017/05/11 by Daniel.Wright Restored GTextureRenderTarget2DMaxSizeX which is used by Ocean Change 3435297 on 2017/05/11 by Arne.Schober DR - Remove manual AlignOf and use C++11 keyword instead #RB Steve.Robb Change 3435367 on 2017/05/11 by Daniel.Wright Circle vertex buffer for slightly tighter voxelization of volumetric fog shadowed lights * 1.5ms -> 1.38ms on 970 GTX with 24 spotlights Change 3435522 on 2017/05/11 by Brian.Karis Dither opacity mask now stacks properly for non parallel polys. Dither is randomized by triangle normal. Change 3436063 on 2017/05/11 by Daniel.Wright Disabled CLB_AggressiveBatching for PC d3d12 as it causes flickering artifacts in lighting Change 3436269 on 2017/05/11 by Uriel.Doyon Fixed UVChannel data possibly not up-to-date depending on user manips. Change 3436611 on 2017/05/12 by Simon.Tovey Improved name and tooltip for static mesh property controlling generation of alias tables for uniform sampling. Change 3436676 on 2017/05/12 by Simon.Tovey Fix for fixed bounds being "invalid" unless set via the toolbar option. Change 3436700 on 2017/05/12 by Simon.Tovey Crash fix. Issue found in https://udn.unrealengine.com/questions/355944/crash-in-fdynamicspriteemitterdatagetdynamicmeshel.html Particle proxies would have stale material resource pointers if the material is changed while the system was invisible. If the old material is freed during this time, the next time the system renders it will crash. Change 3437367 on 2017/05/12 by Brian.Karis Fixed bug with small UV charts not packing. Change 3437860 on 2017/05/12 by Arne.Schober DR - Fix alignment compile error in win32 where according to ABI alignment is 4 for int64 #RB none Change 3437972 on 2017/05/12 by Arne.Schober DR - Fix alignment compile error in win32 where according to ABI function calls cannot take alingned structures. In all of the cases the copy was completely unnecessary. #RB none Change 3437975 on 2017/05/12 by Chris.Bunner Added calculation for MaterialParamsEx to MeshDecals.usf. #jira UE-43052 Change 3438109 on 2017/05/12 by Rolando.Caloca DR - Support for -nomcpp on SCW Change 3438889 on 2017/05/15 by Chris.Bunner Nullptr check in a few material uniform expressions. Change 3439351 on 2017/05/15 by Chris.Bunner Added tooltip to Power material expression. Change 3439763 on 2017/05/15 by Daniel.Wright Apply passed in DistanceBiasSqr to line lights - allows volumetric fog to reduce aliasing on line lights Change 3439764 on 2017/05/15 by Daniel.Wright Fixed order of operations with bTreatMaxDepthUnshadowed - manifested as unfiltered static shadow depth lookups Change 3440722 on 2017/05/16 by Guillaume.Abadie Exposes Scene capture's FOV to blueprints Change 3441680 on 2017/05/16 by Uriel.Doyon Added units to point light intensity, to allow the user to specify the value in candelas or lumens. New point light actors now configure the intensity in candelas by default. Replaced viewport exposure settings by an EV100 slider. Hidding the tone mapper in the show flag now still applies the exposure. Added a new AutoExposure method called EV100 which allows to specify : - MinEV100, MaxEV100 - Calibration Constnat - Exposure Compensation #jira UE-42783 Change 3441884 on 2017/05/16 by Uriel.Doyon Fixed StreamingDistanceMultiplier not being applied to the texture streaming data. Change 3442800 on 2017/05/17 by Gil.Gribb Fixed botched merge. Change 3442896 on 2017/05/17 by Gil.Gribb UE4 - Allowed the possibility of running the RHI "thread" on task threads instead and cleaned up and unified the conditionals involved. By default we still have a dedicated RHI thread because it tested slightly faster. Change 3443951 on 2017/05/17 by Richard.Wallis Added Apple override allocator macro - each command encoder type needs it's own allocator queue. Change 3444787 on 2017/05/17 by Daniel.Wright Fixed DBuffer decal default normal (used when DBuffer decals enabled, but not decals rendered) not reconstructing zero properly, adding -.008 to WorldNormal which then caused artifacts with forward lighting specular on materials with roughness near 0. Change 3444882 on 2017/05/17 by Daniel.Wright Added comment to FClearValueBinding::DefaultNormal8Bit to make the dependency on shader decode clear Change 3444883 on 2017/05/17 by Brian.Karis Improved contact shadows Change 3445048 on 2017/05/17 by Daniel.Wright Fixed particle lights in forward shading, they were not setting the lighting channel mask properly Change 3445107 on 2017/05/17 by Michael.Trepka Changed the order of operations in FMetalStateCache::SetRenderState to work around an issue with some Intel drivers where they would not recalculate the raster state in some edge cases. #jira UE-43725 Change 3445212 on 2017/05/17 by Uriel.Doyon Added a -CSV option to ListTextures command Change 3445947 on 2017/05/18 by Richard.Wallis Clone of Release-4.16 Stream CL 3437181 and CL 3442450 - fix(s) for black rendering on macOS El Cap with Nvidia GPU. Move sampling of EyeAdaption texture to pixel shader for Mac Metal using shader language version <= 1 only. Change 3446545 on 2017/05/18 by Chris.Bunner Removed hardcoded (and unused) MRT write from Decal shaders. #jira UE-45095 Change 3446568 on 2017/05/18 by Marc.Olano Sobol and image-based importance sampling C++ functions and blueprint nodes Change 3446988 on 2017/05/18 by Marc.Olano Fix build error: missing include Change 3446990 on 2017/05/18 by Marc.Olano Cell-indexed Sobol sampling for shaders (in MonteCarlo.usf) and materials (Sobol and TemporalSobol nodes) Change 3447142 on 2017/05/18 by Rolando.Caloca DR - RWLock instead of mutex for PSO cache Change 3447144 on 2017/05/18 by Uriel.Doyon Moved shading model code to SetGBufferFromShadingModel(). This allows the code to be reused in other shader files. Change 3447794 on 2017/05/18 by Brian.Karis Virtual texturing foundation code Change 3448944 on 2017/05/19 by Arciel.Rekman Fix non-unity Linux (and Mac, etc) builds. - Mac fix is tentative, did not try. Change 3449183 on 2017/05/19 by Marcus.Wassmer Duplicate fix for reflection captures to happen after sequencer updates. Change 3449196 on 2017/05/19 by Uriel.Doyon Handling RCM_MinMax when reading FloatRGBA textures. This fixes pixel inspector always reading 1 for scene color values greater than one. Change 3451652 on 2017/05/22 by Rolando.Caloca DR - Compile fix #jira UE-45245 Change 3451660 on 2017/05/22 by Chris.Bunner Additional compile fix. #jira UE-45245 Change 3451897 on 2017/05/22 by Daniel.Wright Moved RTDF shadow project back after the base pass, since it samples the GBuffer for subsurface shadowing. Removed r.DFShadowAsyncCompute which was relying on the previous ordering. Change 3452055 on 2017/05/22 by Rolando.Caloca DR - Switch compile fix #jira UE-45265 Change 3452089 on 2017/05/22 by Rolando.Caloca DR - Compile fix #jira UE-45246 Change 3452108 on 2017/05/22 by Rolando.Caloca DR - Compile fix #jira UE-45246 Change 3452179 on 2017/05/22 by Brian.Karis Exposed dimensions. Fixed static analysis. Change 3452734 on 2017/05/22 by Daniel.Wright When post processing is disabled, TPT_TranslucencyAfterDOF translucency gets forced into the standard translucency pass. Change 3452770 on 2017/05/22 by Daniel.Wright Static light source shapes drawn into reflection captures handle SourceLength via scaled sphere Change 3452861 on 2017/05/22 by Rolando.Caloca DR - Switch compile fix Change 3452952 on 2017/05/22 by Brian.Karis Small VT fixes Change 3453647 on 2017/05/23 by Richard.Wallis Fix for tessellation shaders on Mac (Metal v1.2) failing to compile. #jira UE-45227 Change 3454844 on 2017/05/23 by Uriel.Doyon Fixed extra X16 on some point lights #jira UE-45250 Change 3454934 on 2017/05/23 by Chris.Bunner Backing out changelists 3441680, 3454636 and 3454844 for the sake of integration stability. Change 3457131 on 2017/05/24 by Arne.Schober DR - [UE-45317] - Fix Depthbuffer not available for resolve in Forward mode #jira UE-45317 #RB Chris.Bunner Change 3457141 on 2017/05/24 by Marc.Olano Sobol bug fixes Change 3457953 on 2017/05/24 by Brian.Karis Fix static analysis #jira UE-45315 #jira UE-45314 #jira UE-45313 Change 3459064 on 2017/05/25 by Chris.Bunner Fix for out of bounds material translation crash. #jira UE-45406 Change 3459700 on 2017/05/25 by Brian.Karis Revert using sprite index buffer because the vert order is different. Change 3459847 on 2017/05/25 by Chris.Bunner Fixing ensure in RenderTestMap. [CL 3461201 by Chris Bunner in Main branch]
2017-05-26 08:22:50 -04:00
DrawClearQuad(RHICmdList, FLinearColor(0.0f, 0.0f, 0.0f, 0.0f));
RHICmdList.SetViewport((float)RenderParams.Viewport.Min.X, (float)RenderParams.Viewport.Min.Y, 0.0f, (float)RenderParams.Viewport.Max.X, (float)RenderParams.Viewport.Max.Y, 1.0f);
Copying //UE4/Dev-VR to //UE4/Dev-Main (Source: //UE4/Dev-VR @ 3383750) #lockdown Nick.Penwarden ========================== MAJOR FEATURES + CHANGES ========================== Change 3012064 on 2016/06/13 by Nick.Whiting Merging Main -> DevVR Change 3048060 on 2016/07/13 by Nick.Whiting Integrating CL 3045721 from //depot/Partners/Google/AndroidVR-DevVR Upgrade Android and iOS GVR SDK to the latest. Fix the flipped vignette issue when using Unreal's post processing distortion. Change the Daydream & Cardboard mode to use scanline racing. Deprecate the ability to turn off individual UI elements. Change 3235307 on 2016/12/14 by Keli.Hlodversson Filter out excluded HMD modules during FEngineLoop:PreInitHMDDevice. The final selection still happens in UEngine::InitializeHMDDevice as all HMD plugins have not been loaded during PreInit Change 3235308 on 2016/12/14 by Ryan.Vance #jira UEVR-478 Monoscopic far field improvements Shader changes are now gated behind the read only cvar vr.MonoscopicFarField. Changing this requires a shader compile. Moved the mono rendering mode to the cvar vr.MonoscopicFarFieldMode. This is writable, so users can enable/disable mono rendering on the fly if the above cvar is enabled. Only write to the alpha channel in the mobile base pass if the object is opaque and MONOSCOPIC_FAR_FIELD is defined. Addressed code review comments. Change 3235397 on 2016/12/14 by Keli.Hlodversson [Oculus] Only enable GearVR platform on Windows if Oculus service is running Original author: Loren.McQuade Change 3235762 on 2016/12/14 by Keli.Hlodversson Add explicit parentheses to placate the build bots. Change 3242318 on 2016/12/21 by Ryan.Vance Working around pixel density crash. Change 3242522 on 2016/12/21 by Ryan.Vance Missing flag clear so our adaptive test was always returning true. Change 3243173 on 2016/12/22 by Ryan.Vance Integrating post present callback implementation from 4.14.1 Change 3248633 on 2017/01/05 by Keli.Hlodversson Copying //Tasks/UE4/Dev-VR-Refactoring to Dev-VR-Minimal (//UE4/Dev-VR-Minimal) Change 3248723 on 2017/01/05 by Keli.Hlodversson Fix after merge. EnablePositionalTracking no longer exists. Change 3249484 on 2017/01/06 by Keli.Hlodversson Add missing includes Change 3249714 on 2017/01/06 by Keli.Hlodversson Remove monolithic header include Change 3249980 on 2017/01/06 by Keli.Hlodversson SteamVR: Remove leftover unused WindowMirrorMode member variable Change 3252432 on 2017/01/10 by Keli.Hlodversson Submitting change by Loren McQuade to fix monolithic builds. Unshelved from pending changelist '3251436': Change 3257373 on 2017/01/13 by Keli.Hlodversson #jira UEVR-411: Finish renaming/removing/remodelling the remaining Oculus (Rift+GearVR) commands #jira UEVR-412: Rename and merge remaining Morpheus console commands #jira UEVR-417: Remove Exec from IHeadMountedDisplay Change 3269971 on 2017/01/24 by Jeff.Fisher UEVR-498 move controller is missing world to meters UEVR-522 PS4 motion controller worldscale support. -Passing world to meters scale into getControllerOrientationAndPosition because the thing asking about it ought to be part of a world, and know what it should be. This also avoids making PS4 motion controllers dependent on the HMD. Note Google VR Controller doesn't do position, so doesnt' care about scale. Oculus already had internal threadsafe tracking of world scale, so I left that. Steam handles world scale below our input level. -Also adding PlayerIndex member to FSceneView so we can figure out which view the MotionControllerComponent should get its worldscale from for the late render thread update. #jira UEVR-498 #review-3384107 Change 3288308 on 2017/02/06 by Jeff.Fisher UEVR-517 Detect MotionController Connectivity -PS4 can only track 2 controllers and 1 hmd. Support for dealing with that is needed. -Also need to support multiple motion controller components mapped to a single controller. Licencees have done that before. -Created a new interface IMotionTrackingSystemManagement, and implements it for PS4Tracker on PS4. -Created a MotionTrackedDeviceFunctionLibrary to expose that interface to blueprint. -With those one can enable and disable tracking on ps4 controllers and query their state to stay within the controller tracking limit. -PS4Tracker also keeps a blackboard of the enable/disable state so that one can enable or disable controllers that have not been connected yet, and have them enable tracking or not when they are connected. -DS4 controller no longer jumps back to 000 if it loses tracking. #review-3384107 #jira UEVR-517 Change 3288309 on 2017/02/06 by Keli.Hlodversson Add file missing from CL#3257373. Change 3288311 on 2017/02/06 by Jeff.Fisher UEVR-517 Detect MotionController Connectivity - Test content. -tm-motionControllers has a third mode where all playstation motion controllers for player 0 are availalbe. You can toggle them to track or not with ctrl-P,G,L,R for pad, gun, leftmove, rightmove or with alt-P,G,L,R. Ctrl tests doing so via MotionControllerComponent. Alt tests doing so by player index and controller type enum. -ctrl-A disables tracking of all controllers -alt-A disables tracking of all controllers for player 0 -ctrl-D toggles enabling new controllers by default -Also fixed one button not working in one of the other test modes for the Aim (gun) controller. -The controller 'models' have an arrow out the front. It is black if disabled. Red if enabled, but no tracker is active, yellow if tracked but inertial only, and green if fully tracked by the camera. -This logic is in the QA_MoCoAll blueprint. Change 3291601 on 2017/02/07 by Jeff.Fisher UEVR-536 PSVR motion controller tracking problem with multiple controllers -Previous code called GetRelativeTransform from the render thread, but the game thread could update it at any time. This caches that transform so that it can be safely used in the render thread. #jira UEVR-536 #review-3384107 @Ryan.Vance Change 3292460 on 2017/02/08 by Jeff.Fisher PS4 sceVrTrackerGetResult() error warning logging improved, and explanatory comment added. Change 3308771 on 2017/02/17 by Keli.Hlodversson Rename GoogleVR console commands #jira UEVR-412 Change 3309156 on 2017/02/17 by Keli.Hlodversson Track changes in r.ScreenPercentage on GoogleVR and set RenderTargetSize accordingly. Change 3311999 on 2017/02/20 by Keli.Hlodversson Create a default implementation for RecordAnalytics. Also create an initial stub for FHeadMountedDisplayBase for future default implementations of common HMD functionality. Make implementing IHeadMountedDisplay::GetDeviceName mandatory instead of defaulting to "Unknown" #jira UE-21878 #jira UEVR-213 Change 3313467 on 2017/02/20 by Ryan.Vance #jira UE-41604 3278583 pCustomPresent->AllocateRenderTargetTexture may return false, if we blindly return true we can end up with an invalid render target since the fall back sceneviewport will be skipped. 3278536 Adding ovrError_NoHmd to our sanity check in OnStartGameFrame. Change 3314002 on 2017/02/21 by Keli.Hlodversson Fix compilation on PS4 and Linux Change 3326722 on 2017/03/01 by Jeff.Fisher Merging //UE4/Dev-Main to Dev-VR (//UE4/Dev-VR) Integrating 4.15 from main. Change 3327567 on 2017/03/01 by Jeff.Fisher UEVR-588 Oculus crash on "stereo on" when the proximity sensor is not triggered. Duplicating from Release-4.15 cl 3327481, 3327542 -Don't ovr_SubmitFrame when the layers need to be recreated. They stay dirty until rendering is unpaused. #jira UEVR-588 #review-3384107 Change 3328098 on 2017/03/01 by Jeff.Fisher 4.15 merge fixes -Fixed deprecated enum name function usage. -Fixed world scale usage in GoogleVRController. -Fixed compile break in PS4Tracker. Change 3328271 on 2017/03/01 by Jeff.Fisher 2.15 merge -restroging GoogleVRController::GetWorldToMetersScale... cause it is used everywhere. Change 3328307 on 2017/03/01 by Jeff.Fisher 4.15 merge -More googlevr worldscale fixes. Change 3328312 on 2017/03/01 by Jeff.Fisher 4.15 merge -removing 2 unused includes Change 3330610 on 2017/03/02 by Jeff.Fisher 4.15 merge -fixing linux build Change 3333952 on 2017/03/06 by Keli.Hlodversson Implement common stereo layer management base class and use it in SteamVR and PS4. Fixes an outstanding bug in SteamVR where texures are updated every frame regardles of whether the continous update flag is set or not. #jira UEVR-628 #jira UE-42555 Change 3334961 on 2017/03/07 by Keli.Hlodversson Add missing include to fix non-unity builds Change 3336200 on 2017/03/07 by Keli.Hlodversson Fix compilation issues. (https://ec-01.epicgames.net/commander/link/jobDetails/jobs/7568252?jobName=UE4+Dev-VR+-+CL+3334961+-+Nightly+Build&s=Jobs) * Pre VS2015 compilers don't like mixing wide and unmarked strings in concatenation. Unfortunately LOCTEXT hides the call to the TEXT macro, completely hinding the prefix (which only gets added to the first fragment.) * Switch apparently doesn't know how to format a size_t for analytics either. Also: Typo in backwards compatibility command name alias Change 3337347 on 2017/03/08 by Jeff.Fisher UE-42631 Stereo off while prox sensor uncovered causes low framerate -Setting maxfps appropriately on 'stereo on/off'. #review-3384107 #jira UE-42631 Change 3338385 on 2017/03/08 by Ryan.Vance r.DisableDistortion was only being used for the mobile renderer Change 3342301 on 2017/03/10 by patrickr.donovan Test updates to TM-VRSmoke. Increased lightmap resolution on QA_MeshTypes meshes to improve readbility and reliablility of tests involving said asset. Rebuilt lighting. Change 3348133 on 2017/03/15 by Ryan.Vance Moving mono cvars to scene rendering to avoid cross module references. There's not a good reason to have them in the hmd module anyway. Change 3348836 on 2017/03/15 by Ryan.Vance Direct multi-view support for gear vr Monoscopic far field with multi-view (blit and direct) support for gear vr Support for translucent objects on both sides of the mono clip plane (due to a sorting issue, objects that straddle the plane composite incorrectly) Fixed missing discards/clears in the multi-view blit Change 3348843 on 2017/03/15 by Ryan.Vance Fixing color/depth target size mismatch when screen percentage scaling results in a size that isn't divisible by 16. Change 3349276 on 2017/03/16 by Keli.Hlodversson Fixing compile errors in GoogleVR after merge from main. Change 3350932 on 2017/03/16 by Ryan.Vance Re-enabling the gearvr plugin on windows. Change 3351977 on 2017/03/17 by Jeff.Fisher Fixing masked member variable. Change 3352314 on 2017/03/17 by Ryan.Vance We need to ensure that we don't select different lod levels for each eye. Change 3352993 on 2017/03/17 by Nick.Whiting Integrating CL 3345824 from Android-DevVR to Dev-VR. Support for device depth pass in SceneCaptureComponent2D Change 3355185 on 2017/03/20 by Nick.Whiting Added ability to disable the autoloading splash screen, which would prevent the hide splash screen node from ever working Change 3355676 on 2017/03/20 by Nick.Whiting PR #3384: [GNUX] SteamVR, OpenGL patch. (Contributed by yaakuro), with some minor modifications Change 3357286 on 2017/03/21 by Jeff.Fisher Fixing GenerateProjectFiles, looks like the .config. was removed from these references in main some time ago. Change 3357435 on 2017/03/21 by Jeff.Fisher Fixing editor build break, looks like a merge mistake. Change 3359960 on 2017/03/23 by Keli.Hlodversson Prevent potential crash when drawing tracking sensor location. Also only fetch HMD location once instead of once per tracking sensor. Change 3361230 on 2017/03/23 by Jeff.Fisher Fixing linux build opengl include problem... maybe. Change 3361638 on 2017/03/23 by Jeff.Fisher Another guess at fixing linux build. Change 3364224 on 2017/03/24 by Keli.Hlodversson Initial implementation of UEVR-576 - Base emulated layer implementation #jira UEVR-668 - Base emulated layer implementation: Initial framework for overrideable default implementation #jira UEVR-669 - Base emulated layer implementation: Face Locked Layers Support #jira UEVR-670 - Base emulated layer implementation: Tracker Locked Layers Support #jira UEVR-671 - Base emulated layer implementation: World Locked Layers Support #jira UEVR-672 - Base emulated layer implementation: Add support for optionally rendering face locked layers into a separate layer Change 3364242 on 2017/03/24 by Keli.Hlodversson SteamVR layers do not support negatve Layer priorities Change 3364263 on 2017/03/24 by Jeff.Fisher Merging //UE4/Dev-Main to Dev-VR (//UE4/Dev-VR) Monoscopicfarfieldrendering was just 'accept source', Ryan is going to look at fixing it up. Change 3364472 on 2017/03/24 by Jeff.Fisher Merge fix Change 3364475 on 2017/03/24 by Jeff.Fisher Fixing gearvr include. Change 3364486 on 2017/03/24 by Jeff.Fisher merge fix Change 3364532 on 2017/03/24 by Ryan.Vance pso update for mono rendering and stereo layers. Change 3364599 on 2017/03/24 by Ryan.Vance Oculus changes for SI1.12 Change 3365159 on 2017/03/26 by Jeff.Fisher include fix Change 3365182 on 2017/03/26 by Jeff.Fisher include fix Change 3366087 on 2017/03/27 by Ryan.Vance Remaining files from Oculus changes for SI1.12 merge request. Fixing a bug in OnlineSubsystem. Temporarily changing the eye padding change to be a shader clear to work around a clear color binding issue. Change 3366492 on 2017/03/27 by Ryan.Vance #jira UE-43294 Moved the clear before we setup state for drawing the mirror window content. It was stomping over state after the pso changes. Going to leave the shader clear in the rift prerender for clearing the eye padding for now. Change 3366929 on 2017/03/27 by Ryan.Vance Fixing compile error Change 3368549 on 2017/03/28 by Jeff.Fisher Merging Change: 3357998 from //UE4/Partner-Google-VR/Engine/... to Dev-VR Upgrade Google VR Plugin to v1.3: *Upgraded GVR NDK to 1.30.0 *Changed some BlueprintFunction to use BlueprintPure *Add the missing bDaydream flag in UEDeployAndroid.cs #review-3384107 Change 3368975 on 2017/03/28 by Ryan.Vance CIS clean up #jira UE-43428, UE-43429, UE-43426, UE-43427 Change 3369028 on 2017/03/28 by Ryan.Vance This is not exacly 'correct', but it's at least what the code was trying to do. Change 3370203 on 2017/03/29 by Ryan.Vance Adding gear vr controller component support. Change 3370918 on 2017/03/29 by Ryan.Vance Merging 3370569 using Partner-Google-VR_to_DevVR Change 3371030 on 2017/03/29 by Ryan.Vance Fixing linux build errors #jira UE-43426 Change 3371036 on 2017/03/29 by Ryan.Vance Oculus 4.16 integration. Not terribly happy with the use of std::string. They promised to clean this up for the next release. Change 3373495 on 2017/03/30 by Jeff.Fisher Merging from Dev-Main, in preparation for 4.16 Change 3373578 on 2017/03/30 by Jeff.Fisher build break, one comma short Change 3373870 on 2017/03/31 by Jeff.Fisher Include order fix. Change 3374001 on 2017/03/31 by Keli.Hlodversson Use DefaultStereoLayers as base for Morpheus implementation. #jira UEVR-709 #jira UE-42919 #rb: Jeff.Fisher Change 3374004 on 2017/03/31 by Keli.Hlodversson Fix rendering for the default Stereo Layers implementation on mobile. Depth test was set to "Never" instead of "Always" Destination texture on GLES is flipped on the Y axis, the coordinates are reversed in the shade when compiled on the relevant platforms. Change 3375125 on 2017/03/31 by Jeff.Fisher UE-43506 Ensure using VRPreview with GoogleVR -Removed the ensure, there is code in there to handle that case, and it works. #jira UE-43506 Change 3375294 on 2017/03/31 by nick.bullard Resaving Plugin content to resovle "saved with empty engine version" #jira UE-43537 Change 3375480 on 2017/03/31 by Jeff.Fisher UEVR-9 PSVR: Social Screen Support -Experimental social screen support for 4.16. -This does the basics of driving output through the Aux port in the proper format for display on the mirror monitor. -Only supports 30fps on the mirror monitor. 60fps will require the implementation of sony system dialogs to deal with incompatable system features (video streaming, remote play). -There is a project setting in Morpheus, under experiemental bEnableSocialScreenSeparateMode. This must be set to true to use this feature. When it is false we avoid allocating the back buffers. -MorpheusFunctionLibrary blueprints now have a node "SetSocialScreenMode" which can switch between SystemMirror (hardware supported mirroring), SeparateTest (alternates black and white), SeparateTexture (displays a texture, eg a render target, specified via blueprint), and SeparateMirror(puts the hmd render buffer on screen - which is both eyes, like a debug mode). -Also finally updated the bEnabled flag in project settings to tell people it's only for PC. #jira UEVR-9 #review-3384107 Change 3375540 on 2017/03/31 by Ryan.Vance #jira UE-43504 Fixing android build break when using a 64 bit isa. Change 3375655 on 2017/03/31 by Jeff.Fisher Fixing missing RGBAToYUV shader problem -This at least unblocks our process. Will revisit before zbr. Change 3375820 on 2017/04/01 by Jeff.Fisher Fixing linux build warning about HAS_MORPHEUS Change 3376050 on 2017/04/02 by Jeff.Fisher UE-43515 Step 'UE4Editor Static Analysis Win64' - Module.OnlineSubsystemOculus.cpp Warnings -Temporary fix for static analysis annotation warnings in OnlineSubsytemOculus. Longer term plan is to eliminate the use of the headers that trigger the warnings. -Just wrap all standard headers in static analysis disables. #jira UE-43515 Change 3376609 on 2017/04/03 by Jeff.Fisher Fixing rgbatoyuvshader include. Change 3377001 on 2017/04/03 by Jeff.Fisher UE-43547 Launch On PS4 fails during Run command - Missing global shader FRGBAToYUV420CS - shader c++ must be compiled so that it can be cooked for ps4. #jira UE-43547 Change 3379858 on 2017/04/04 by Jeff.Fisher Merging //UE4/Dev-Main to Dev-VR (//UE4/Dev-VR) pulling main this should get us ps4 sdk 4.508 Change 3379938 on 2017/04/04 by Ryan.Vance #jira UE-43548 If stereo layers are not being used, don't setup overlay targets as we will never clear/initialize them. The clear happens as part of the default layers PostRenderView_RenderThread call which wont be called if layers aren't being used in the scene. Change 3381519 on 2017/04/05 by Jeff.Fisher UEVR-733 PS4 sdk 4.500 hmd connection api changes break hmd connect. -Handling failure of sceHmdGetDeviceInformation if the hmd is powered off. It now returns an error code about an invalid handle in that case, rather than reporting unready. We just treat the error code like an unready status. #jira UEVR-733 #review-3384107 Change 3382019 on 2017/04/05 by Ryan.Vance Linux: add Vulkan support from dev editor: 3381593 Change 3382021 on 2017/04/05 by Ryan.Vance SteamVR on Linux using Vulkan OpenVR rev to 1_0_6 PR #3412: [GNUX] Initial support for SteamVR using Vulkan on GNUX platform. (Contributed by yaakuro) Change 3382076 on 2017/04/05 by Ryan.Vance Fixing linux steamvr lib path. It changed to something less silly in 1.0.6 Removing the steamvr plugin from the white list for linux. It's looking for a runtime that no one will have installed. Change 3383237 on 2017/04/06 by Ryan.Vance #jira UE-43732 Fixing Android compile issues. We can't wrap portions of a macro with a definie. This should probably be some sort of recursive macro thing since there's so much overlap. Good enough for now. Change 3383353 on 2017/04/06 by Ryan.Vance Fixing include cycles. Change 3383509 on 2017/04/06 by Jeff.Fisher Merging //UE4/Dev-Main to Dev-VR (//UE4/Dev-VR) merging the stuff from dev-mobile [CL 3384106 by Ryan Vance in Main branch]
2017-04-06 22:03:51 -04:00
}
StereoLayerRender(RHICmdList, SortedOverlayLayers, RenderParams);
RHICmdList.EndRenderPass();
Copying //UE4/Dev-VR to //UE4/Dev-Main (Source: //UE4/Dev-VR @ 3383750) #lockdown Nick.Penwarden ========================== MAJOR FEATURES + CHANGES ========================== Change 3012064 on 2016/06/13 by Nick.Whiting Merging Main -> DevVR Change 3048060 on 2016/07/13 by Nick.Whiting Integrating CL 3045721 from //depot/Partners/Google/AndroidVR-DevVR Upgrade Android and iOS GVR SDK to the latest. Fix the flipped vignette issue when using Unreal's post processing distortion. Change the Daydream & Cardboard mode to use scanline racing. Deprecate the ability to turn off individual UI elements. Change 3235307 on 2016/12/14 by Keli.Hlodversson Filter out excluded HMD modules during FEngineLoop:PreInitHMDDevice. The final selection still happens in UEngine::InitializeHMDDevice as all HMD plugins have not been loaded during PreInit Change 3235308 on 2016/12/14 by Ryan.Vance #jira UEVR-478 Monoscopic far field improvements Shader changes are now gated behind the read only cvar vr.MonoscopicFarField. Changing this requires a shader compile. Moved the mono rendering mode to the cvar vr.MonoscopicFarFieldMode. This is writable, so users can enable/disable mono rendering on the fly if the above cvar is enabled. Only write to the alpha channel in the mobile base pass if the object is opaque and MONOSCOPIC_FAR_FIELD is defined. Addressed code review comments. Change 3235397 on 2016/12/14 by Keli.Hlodversson [Oculus] Only enable GearVR platform on Windows if Oculus service is running Original author: Loren.McQuade Change 3235762 on 2016/12/14 by Keli.Hlodversson Add explicit parentheses to placate the build bots. Change 3242318 on 2016/12/21 by Ryan.Vance Working around pixel density crash. Change 3242522 on 2016/12/21 by Ryan.Vance Missing flag clear so our adaptive test was always returning true. Change 3243173 on 2016/12/22 by Ryan.Vance Integrating post present callback implementation from 4.14.1 Change 3248633 on 2017/01/05 by Keli.Hlodversson Copying //Tasks/UE4/Dev-VR-Refactoring to Dev-VR-Minimal (//UE4/Dev-VR-Minimal) Change 3248723 on 2017/01/05 by Keli.Hlodversson Fix after merge. EnablePositionalTracking no longer exists. Change 3249484 on 2017/01/06 by Keli.Hlodversson Add missing includes Change 3249714 on 2017/01/06 by Keli.Hlodversson Remove monolithic header include Change 3249980 on 2017/01/06 by Keli.Hlodversson SteamVR: Remove leftover unused WindowMirrorMode member variable Change 3252432 on 2017/01/10 by Keli.Hlodversson Submitting change by Loren McQuade to fix monolithic builds. Unshelved from pending changelist '3251436': Change 3257373 on 2017/01/13 by Keli.Hlodversson #jira UEVR-411: Finish renaming/removing/remodelling the remaining Oculus (Rift+GearVR) commands #jira UEVR-412: Rename and merge remaining Morpheus console commands #jira UEVR-417: Remove Exec from IHeadMountedDisplay Change 3269971 on 2017/01/24 by Jeff.Fisher UEVR-498 move controller is missing world to meters UEVR-522 PS4 motion controller worldscale support. -Passing world to meters scale into getControllerOrientationAndPosition because the thing asking about it ought to be part of a world, and know what it should be. This also avoids making PS4 motion controllers dependent on the HMD. Note Google VR Controller doesn't do position, so doesnt' care about scale. Oculus already had internal threadsafe tracking of world scale, so I left that. Steam handles world scale below our input level. -Also adding PlayerIndex member to FSceneView so we can figure out which view the MotionControllerComponent should get its worldscale from for the late render thread update. #jira UEVR-498 #review-3384107 Change 3288308 on 2017/02/06 by Jeff.Fisher UEVR-517 Detect MotionController Connectivity -PS4 can only track 2 controllers and 1 hmd. Support for dealing with that is needed. -Also need to support multiple motion controller components mapped to a single controller. Licencees have done that before. -Created a new interface IMotionTrackingSystemManagement, and implements it for PS4Tracker on PS4. -Created a MotionTrackedDeviceFunctionLibrary to expose that interface to blueprint. -With those one can enable and disable tracking on ps4 controllers and query their state to stay within the controller tracking limit. -PS4Tracker also keeps a blackboard of the enable/disable state so that one can enable or disable controllers that have not been connected yet, and have them enable tracking or not when they are connected. -DS4 controller no longer jumps back to 000 if it loses tracking. #review-3384107 #jira UEVR-517 Change 3288309 on 2017/02/06 by Keli.Hlodversson Add file missing from CL#3257373. Change 3288311 on 2017/02/06 by Jeff.Fisher UEVR-517 Detect MotionController Connectivity - Test content. -tm-motionControllers has a third mode where all playstation motion controllers for player 0 are availalbe. You can toggle them to track or not with ctrl-P,G,L,R for pad, gun, leftmove, rightmove or with alt-P,G,L,R. Ctrl tests doing so via MotionControllerComponent. Alt tests doing so by player index and controller type enum. -ctrl-A disables tracking of all controllers -alt-A disables tracking of all controllers for player 0 -ctrl-D toggles enabling new controllers by default -Also fixed one button not working in one of the other test modes for the Aim (gun) controller. -The controller 'models' have an arrow out the front. It is black if disabled. Red if enabled, but no tracker is active, yellow if tracked but inertial only, and green if fully tracked by the camera. -This logic is in the QA_MoCoAll blueprint. Change 3291601 on 2017/02/07 by Jeff.Fisher UEVR-536 PSVR motion controller tracking problem with multiple controllers -Previous code called GetRelativeTransform from the render thread, but the game thread could update it at any time. This caches that transform so that it can be safely used in the render thread. #jira UEVR-536 #review-3384107 @Ryan.Vance Change 3292460 on 2017/02/08 by Jeff.Fisher PS4 sceVrTrackerGetResult() error warning logging improved, and explanatory comment added. Change 3308771 on 2017/02/17 by Keli.Hlodversson Rename GoogleVR console commands #jira UEVR-412 Change 3309156 on 2017/02/17 by Keli.Hlodversson Track changes in r.ScreenPercentage on GoogleVR and set RenderTargetSize accordingly. Change 3311999 on 2017/02/20 by Keli.Hlodversson Create a default implementation for RecordAnalytics. Also create an initial stub for FHeadMountedDisplayBase for future default implementations of common HMD functionality. Make implementing IHeadMountedDisplay::GetDeviceName mandatory instead of defaulting to "Unknown" #jira UE-21878 #jira UEVR-213 Change 3313467 on 2017/02/20 by Ryan.Vance #jira UE-41604 3278583 pCustomPresent->AllocateRenderTargetTexture may return false, if we blindly return true we can end up with an invalid render target since the fall back sceneviewport will be skipped. 3278536 Adding ovrError_NoHmd to our sanity check in OnStartGameFrame. Change 3314002 on 2017/02/21 by Keli.Hlodversson Fix compilation on PS4 and Linux Change 3326722 on 2017/03/01 by Jeff.Fisher Merging //UE4/Dev-Main to Dev-VR (//UE4/Dev-VR) Integrating 4.15 from main. Change 3327567 on 2017/03/01 by Jeff.Fisher UEVR-588 Oculus crash on "stereo on" when the proximity sensor is not triggered. Duplicating from Release-4.15 cl 3327481, 3327542 -Don't ovr_SubmitFrame when the layers need to be recreated. They stay dirty until rendering is unpaused. #jira UEVR-588 #review-3384107 Change 3328098 on 2017/03/01 by Jeff.Fisher 4.15 merge fixes -Fixed deprecated enum name function usage. -Fixed world scale usage in GoogleVRController. -Fixed compile break in PS4Tracker. Change 3328271 on 2017/03/01 by Jeff.Fisher 2.15 merge -restroging GoogleVRController::GetWorldToMetersScale... cause it is used everywhere. Change 3328307 on 2017/03/01 by Jeff.Fisher 4.15 merge -More googlevr worldscale fixes. Change 3328312 on 2017/03/01 by Jeff.Fisher 4.15 merge -removing 2 unused includes Change 3330610 on 2017/03/02 by Jeff.Fisher 4.15 merge -fixing linux build Change 3333952 on 2017/03/06 by Keli.Hlodversson Implement common stereo layer management base class and use it in SteamVR and PS4. Fixes an outstanding bug in SteamVR where texures are updated every frame regardles of whether the continous update flag is set or not. #jira UEVR-628 #jira UE-42555 Change 3334961 on 2017/03/07 by Keli.Hlodversson Add missing include to fix non-unity builds Change 3336200 on 2017/03/07 by Keli.Hlodversson Fix compilation issues. (https://ec-01.epicgames.net/commander/link/jobDetails/jobs/7568252?jobName=UE4+Dev-VR+-+CL+3334961+-+Nightly+Build&s=Jobs) * Pre VS2015 compilers don't like mixing wide and unmarked strings in concatenation. Unfortunately LOCTEXT hides the call to the TEXT macro, completely hinding the prefix (which only gets added to the first fragment.) * Switch apparently doesn't know how to format a size_t for analytics either. Also: Typo in backwards compatibility command name alias Change 3337347 on 2017/03/08 by Jeff.Fisher UE-42631 Stereo off while prox sensor uncovered causes low framerate -Setting maxfps appropriately on 'stereo on/off'. #review-3384107 #jira UE-42631 Change 3338385 on 2017/03/08 by Ryan.Vance r.DisableDistortion was only being used for the mobile renderer Change 3342301 on 2017/03/10 by patrickr.donovan Test updates to TM-VRSmoke. Increased lightmap resolution on QA_MeshTypes meshes to improve readbility and reliablility of tests involving said asset. Rebuilt lighting. Change 3348133 on 2017/03/15 by Ryan.Vance Moving mono cvars to scene rendering to avoid cross module references. There's not a good reason to have them in the hmd module anyway. Change 3348836 on 2017/03/15 by Ryan.Vance Direct multi-view support for gear vr Monoscopic far field with multi-view (blit and direct) support for gear vr Support for translucent objects on both sides of the mono clip plane (due to a sorting issue, objects that straddle the plane composite incorrectly) Fixed missing discards/clears in the multi-view blit Change 3348843 on 2017/03/15 by Ryan.Vance Fixing color/depth target size mismatch when screen percentage scaling results in a size that isn't divisible by 16. Change 3349276 on 2017/03/16 by Keli.Hlodversson Fixing compile errors in GoogleVR after merge from main. Change 3350932 on 2017/03/16 by Ryan.Vance Re-enabling the gearvr plugin on windows. Change 3351977 on 2017/03/17 by Jeff.Fisher Fixing masked member variable. Change 3352314 on 2017/03/17 by Ryan.Vance We need to ensure that we don't select different lod levels for each eye. Change 3352993 on 2017/03/17 by Nick.Whiting Integrating CL 3345824 from Android-DevVR to Dev-VR. Support for device depth pass in SceneCaptureComponent2D Change 3355185 on 2017/03/20 by Nick.Whiting Added ability to disable the autoloading splash screen, which would prevent the hide splash screen node from ever working Change 3355676 on 2017/03/20 by Nick.Whiting PR #3384: [GNUX] SteamVR, OpenGL patch. (Contributed by yaakuro), with some minor modifications Change 3357286 on 2017/03/21 by Jeff.Fisher Fixing GenerateProjectFiles, looks like the .config. was removed from these references in main some time ago. Change 3357435 on 2017/03/21 by Jeff.Fisher Fixing editor build break, looks like a merge mistake. Change 3359960 on 2017/03/23 by Keli.Hlodversson Prevent potential crash when drawing tracking sensor location. Also only fetch HMD location once instead of once per tracking sensor. Change 3361230 on 2017/03/23 by Jeff.Fisher Fixing linux build opengl include problem... maybe. Change 3361638 on 2017/03/23 by Jeff.Fisher Another guess at fixing linux build. Change 3364224 on 2017/03/24 by Keli.Hlodversson Initial implementation of UEVR-576 - Base emulated layer implementation #jira UEVR-668 - Base emulated layer implementation: Initial framework for overrideable default implementation #jira UEVR-669 - Base emulated layer implementation: Face Locked Layers Support #jira UEVR-670 - Base emulated layer implementation: Tracker Locked Layers Support #jira UEVR-671 - Base emulated layer implementation: World Locked Layers Support #jira UEVR-672 - Base emulated layer implementation: Add support for optionally rendering face locked layers into a separate layer Change 3364242 on 2017/03/24 by Keli.Hlodversson SteamVR layers do not support negatve Layer priorities Change 3364263 on 2017/03/24 by Jeff.Fisher Merging //UE4/Dev-Main to Dev-VR (//UE4/Dev-VR) Monoscopicfarfieldrendering was just 'accept source', Ryan is going to look at fixing it up. Change 3364472 on 2017/03/24 by Jeff.Fisher Merge fix Change 3364475 on 2017/03/24 by Jeff.Fisher Fixing gearvr include. Change 3364486 on 2017/03/24 by Jeff.Fisher merge fix Change 3364532 on 2017/03/24 by Ryan.Vance pso update for mono rendering and stereo layers. Change 3364599 on 2017/03/24 by Ryan.Vance Oculus changes for SI1.12 Change 3365159 on 2017/03/26 by Jeff.Fisher include fix Change 3365182 on 2017/03/26 by Jeff.Fisher include fix Change 3366087 on 2017/03/27 by Ryan.Vance Remaining files from Oculus changes for SI1.12 merge request. Fixing a bug in OnlineSubsystem. Temporarily changing the eye padding change to be a shader clear to work around a clear color binding issue. Change 3366492 on 2017/03/27 by Ryan.Vance #jira UE-43294 Moved the clear before we setup state for drawing the mirror window content. It was stomping over state after the pso changes. Going to leave the shader clear in the rift prerender for clearing the eye padding for now. Change 3366929 on 2017/03/27 by Ryan.Vance Fixing compile error Change 3368549 on 2017/03/28 by Jeff.Fisher Merging Change: 3357998 from //UE4/Partner-Google-VR/Engine/... to Dev-VR Upgrade Google VR Plugin to v1.3: *Upgraded GVR NDK to 1.30.0 *Changed some BlueprintFunction to use BlueprintPure *Add the missing bDaydream flag in UEDeployAndroid.cs #review-3384107 Change 3368975 on 2017/03/28 by Ryan.Vance CIS clean up #jira UE-43428, UE-43429, UE-43426, UE-43427 Change 3369028 on 2017/03/28 by Ryan.Vance This is not exacly 'correct', but it's at least what the code was trying to do. Change 3370203 on 2017/03/29 by Ryan.Vance Adding gear vr controller component support. Change 3370918 on 2017/03/29 by Ryan.Vance Merging 3370569 using Partner-Google-VR_to_DevVR Change 3371030 on 2017/03/29 by Ryan.Vance Fixing linux build errors #jira UE-43426 Change 3371036 on 2017/03/29 by Ryan.Vance Oculus 4.16 integration. Not terribly happy with the use of std::string. They promised to clean this up for the next release. Change 3373495 on 2017/03/30 by Jeff.Fisher Merging from Dev-Main, in preparation for 4.16 Change 3373578 on 2017/03/30 by Jeff.Fisher build break, one comma short Change 3373870 on 2017/03/31 by Jeff.Fisher Include order fix. Change 3374001 on 2017/03/31 by Keli.Hlodversson Use DefaultStereoLayers as base for Morpheus implementation. #jira UEVR-709 #jira UE-42919 #rb: Jeff.Fisher Change 3374004 on 2017/03/31 by Keli.Hlodversson Fix rendering for the default Stereo Layers implementation on mobile. Depth test was set to "Never" instead of "Always" Destination texture on GLES is flipped on the Y axis, the coordinates are reversed in the shade when compiled on the relevant platforms. Change 3375125 on 2017/03/31 by Jeff.Fisher UE-43506 Ensure using VRPreview with GoogleVR -Removed the ensure, there is code in there to handle that case, and it works. #jira UE-43506 Change 3375294 on 2017/03/31 by nick.bullard Resaving Plugin content to resovle "saved with empty engine version" #jira UE-43537 Change 3375480 on 2017/03/31 by Jeff.Fisher UEVR-9 PSVR: Social Screen Support -Experimental social screen support for 4.16. -This does the basics of driving output through the Aux port in the proper format for display on the mirror monitor. -Only supports 30fps on the mirror monitor. 60fps will require the implementation of sony system dialogs to deal with incompatable system features (video streaming, remote play). -There is a project setting in Morpheus, under experiemental bEnableSocialScreenSeparateMode. This must be set to true to use this feature. When it is false we avoid allocating the back buffers. -MorpheusFunctionLibrary blueprints now have a node "SetSocialScreenMode" which can switch between SystemMirror (hardware supported mirroring), SeparateTest (alternates black and white), SeparateTexture (displays a texture, eg a render target, specified via blueprint), and SeparateMirror(puts the hmd render buffer on screen - which is both eyes, like a debug mode). -Also finally updated the bEnabled flag in project settings to tell people it's only for PC. #jira UEVR-9 #review-3384107 Change 3375540 on 2017/03/31 by Ryan.Vance #jira UE-43504 Fixing android build break when using a 64 bit isa. Change 3375655 on 2017/03/31 by Jeff.Fisher Fixing missing RGBAToYUV shader problem -This at least unblocks our process. Will revisit before zbr. Change 3375820 on 2017/04/01 by Jeff.Fisher Fixing linux build warning about HAS_MORPHEUS Change 3376050 on 2017/04/02 by Jeff.Fisher UE-43515 Step 'UE4Editor Static Analysis Win64' - Module.OnlineSubsystemOculus.cpp Warnings -Temporary fix for static analysis annotation warnings in OnlineSubsytemOculus. Longer term plan is to eliminate the use of the headers that trigger the warnings. -Just wrap all standard headers in static analysis disables. #jira UE-43515 Change 3376609 on 2017/04/03 by Jeff.Fisher Fixing rgbatoyuvshader include. Change 3377001 on 2017/04/03 by Jeff.Fisher UE-43547 Launch On PS4 fails during Run command - Missing global shader FRGBAToYUV420CS - shader c++ must be compiled so that it can be cooked for ps4. #jira UE-43547 Change 3379858 on 2017/04/04 by Jeff.Fisher Merging //UE4/Dev-Main to Dev-VR (//UE4/Dev-VR) pulling main this should get us ps4 sdk 4.508 Change 3379938 on 2017/04/04 by Ryan.Vance #jira UE-43548 If stereo layers are not being used, don't setup overlay targets as we will never clear/initialize them. The clear happens as part of the default layers PostRenderView_RenderThread call which wont be called if layers aren't being used in the scene. Change 3381519 on 2017/04/05 by Jeff.Fisher UEVR-733 PS4 sdk 4.500 hmd connection api changes break hmd connect. -Handling failure of sceHmdGetDeviceInformation if the hmd is powered off. It now returns an error code about an invalid handle in that case, rather than reporting unready. We just treat the error code like an unready status. #jira UEVR-733 #review-3384107 Change 3382019 on 2017/04/05 by Ryan.Vance Linux: add Vulkan support from dev editor: 3381593 Change 3382021 on 2017/04/05 by Ryan.Vance SteamVR on Linux using Vulkan OpenVR rev to 1_0_6 PR #3412: [GNUX] Initial support for SteamVR using Vulkan on GNUX platform. (Contributed by yaakuro) Change 3382076 on 2017/04/05 by Ryan.Vance Fixing linux steamvr lib path. It changed to something less silly in 1.0.6 Removing the steamvr plugin from the white list for linux. It's looking for a runtime that no one will have installed. Change 3383237 on 2017/04/06 by Ryan.Vance #jira UE-43732 Fixing Android compile issues. We can't wrap portions of a macro with a definie. This should probably be some sort of recursive macro thing since there's so much overlap. Good enough for now. Change 3383353 on 2017/04/06 by Ryan.Vance Fixing include cycles. Change 3383509 on 2017/04/06 by Jeff.Fisher Merging //UE4/Dev-Main to Dev-VR (//UE4/Dev-VR) merging the stuff from dev-mobile [CL 3384106 by Ryan Vance in Main branch]
2017-04-06 22:03:51 -04:00
}
Copying //UE4/Dev-VR to //UE4/Dev-Main (Source: //UE4/Dev-VR @ 3636795) #lockdown Nick.Penwarden ============================ MAJOR FEATURES & CHANGES ============================ Change 2932765 by Nick.Whiting Merging updated license files for Oculus libraries Change 3480552 by Dustin.Holmes Added map and gamemode for calibration #jira UEVR-808 Change 3502253 by Nick.Whiting Trying to fix up p4's botch of the merge Change 3513736 by Keli.Hlodversson Move duplicated late update code into a common FLateUpdateManager #jira UEVR-893 Change 3514798 by Mike.Beach #4.17 Exposing a way for Blueprint users to remap the SteamVR controller's d-pad buttons (clashes with the Oculus mappings). #jira UE-42634 Change 3516042 by Dustin.Holmes Runtime handedness changes in Vive controllers are now reflected when a new device is connected. Device mappings are also reset when a device disconnects, so that if it connects again it fully reregisters instead of just assuming the role it previously had. Change 3517781 by Keli.Hlodversson Remove unused local variable bUseCustomPresentTexture Change 3517951 by Mike.Beach #4.17 Guarding against dereferencing a null pointer. Defaulting to the identity when we don't (yet) have a valid head pose to use. #jira UE-43685 Change 3518142 by Mike.Beach #4.17 Resolving fallout from bad merge (CL 3514868) - checking for teminating null in array (which was added to keep ARRAY_COUNT from acting on an empty array). Change 3523183 by Ryan.Vance #jira UE-46493, UEVR-661 Fixes GearVR only displaying a black screen on startup Fixes GearVR rendering incorrectly with mobile multi-view w/o direct mode enabled Adding mobile multi-view direct support to Daydream Change 3523718 by Nick.Whiting Adding core controller recentering delegate, and moving Google over to that system. Change 3527263 by Dan.Oconnor Mirror 3526925 for Nick Donaldson Change 3533596 by Dustin.Holmes Add garbage matte map, gamemode, and blueprints. Change 3533598 by Dustin.Holmes Expose the Set Tint Color and Opacity function for Widget Components as a Blueprint node. Change 3538139 by Mike.Beach Moving Oculus debug shader directly into Oculus plugin. #jira UE-47134 Change 3543185 by Nick.Atamas Address UEVR-891 : Merge in changes to Google Tango plugin. #jira UEVR-891 Change 3543285 by Nick.Atamas Merging using //UE4/Release-4.17/... -> //UE4/Dev-VR/... : Fixed UEVR-852: Adjusted Google Tango Plugins copyright to Copyright Google 2017. Removed Apache 2.0 license. Change 3545505 by Nick.Atamas Fix UEVR-851 : some fix-ups to MeshReconHUD and overlay material now has a material parameter for tinting the reconstructed mesh to help debug visualization. Change 3547549 by Jeff.Fisher Fixing DefaultSpectatorScreenController comment. Change 3551339 by Ryan.Vance #jira UE-44947 Editor primitives we not being handled correctly with ISR. Change 3554169 by Dustin.Holmes Reconcile missed Mixed Reality blueprint Change 3566825 by Mike.Beach Fixing some bad merges from Main (fallout from CL 3566309) Change 3567143 by Mike.Beach Copying //Tasks/UE4/Dev-MixedReality to Dev-VR-Minimal (//UE4/Dev-VR-Minimal) Change 3567572 by Mike.Beach [WIP] Adding some MR plugin dependencies to keep CIS quiet (SteamVR is just temporary, and will be removed). Change 3569116 by Jeff.Fisher Mixed reality build breaks for PS4 -Module is dependent on steamvr, so don't build it for PS4. -Removed unused class that doesn't compile with clang. Change 3569362 by Mike.Beach Organizing MR plugin content, to make way for new calibration modes. Change 3572802 by Jeff.Fisher UEVR-832 Add save/load system for calibrated camera settings -Moved MixedRealityConfigurationSaveGame to c++. #review-3571779 #jira UEVR-832 Change 3573864 by Mike.Beach [WIP] Initial work on MR cam alignment controller - records point/frustum data from user input. Change 3575900 by Jeff.Fisher Vive spectator flat rect expanded to match other platforms. -The vive 'full flat eye' rect was narrower than other platforms. Expanded it to be closer to the other platforms. Change 3578684 by Mike.Beach Static analysis fixes for CIS. #jira UE-48204, UE-48203, UE-48206 Change 3579460 by Mike.Beach [WIP] New calibration mode for camera alignment. #jira UEVR-785 Change 3581232 by Mike.Beach [WIP] Saving off alignment calibration data, and loading it on initialization. We skip alignment calibration if it has been configured. #jira UEVR-832 Change 3588411 by Mike.Beach [WIP] Adding calibration for compositing (chroma color, etc.). #jira UEVR-785 Change 3588541 by Mike.Beach [WIP] Cleaning up some display issues with the MR calibration. #jira UEVR-785 Change 3588680 by Mike.Beach Re-organizing the MR content, now that the alignment controller calibrates more than just alignment (renaming, etc.). Change 3588694 by Mike.Beach Renaming the MR calibration pawn (since it doesn't do any calibrating itself). Change 3591518 by Mike.Beach Copying //Tasks/UE4/Dev-MixedReality to Dev-VR-Minimal (//UE4/Dev-VR-Minimal) Change 3591671 by Ryan.Vance Debug stereo layer support This adds an option to render the debug canvas to a stereo layer which greatly improves console and stat readability in an hmd. Change 3591812 by Ryan.Vance Don't snap motion controllers to the origin when tracking is lost. Change 3594681 by Mike.Beach [WIP] Copying //Tasks/UE4/Dev-MixedReality to Dev-VR-Minimal (//UE4/Dev-VR-Minimal) Change 3596679 by Mike.Beach CIS fix (likely fallout from CL 3591671) - changing the order of initialization to better match the order of declaration. Change 3598191 by Jeff.Fisher UEVR-807 Setup M_MRVidProcessing to use 3D garbage matte data. -Created MixedRealityGarbageMatteCaptureComponent. An instance of this is spawned by and attached to MixedRealityCaptureComponent. Saved config data is loaded into it. It spawns a garbage matte actor. It then captures the garbage matte actor into a render target (which is set on MixedRealityCaptureComponent). #jira UEVR-807 #review-3598179 Change 3598276 by Mike.Beach Copying //Tasks/UE4/Dev-MixedReality to Dev-VR-Minimal (//UE4/Dev-VR-Minimal) Change 3598332 by Mike.Beach Guarding against a blind cast in the SteamVRChaperone component, which can be used cross platform (can't assume SteamVR). Change 3605271 by Mike.Beach Copying //Tasks/UE4/Dev-MixedReality to Dev-VR-Minimal (//UE4/Dev-VR-Minimal) Change 3608490 by Jeff.Fisher UEVR-987 Social Screen PS4 need to go to 'mirroring' for hmd setup dialog because system dialogs are not visible in separate mode. UEVR-988 SpectatorScreen Flickering UE-47234 Spectator screen: need frame delay before assigning dynamically created rendertarget to spectator texture UE-47310 Spectator Screen: crash if you release a render target which is assigned as the spectator texture -Test level content for all of these bugs. Change 3608883 by Jeff.Fisher UEVR-807 Setup M_MRVidProcessing to use 3D garbage matte data. -Set material to use the garbage matte render target. Change 3613292 by Mike.Beach Moving header fcn decl up, under the proper interface section (for organization's sake). Change 3616943 by Nick.Whiting Updating SteamVR libraries to 1.0.9, so we can bring back macOS support Change 3616970 by Nick.Whiting Adding in steamvr visible area mesh support. Can be toggled with vr.SteamVR.UseVisibleAreaMesh Change 3617866 by Mike.Beach Updating the VR template to reflect Oculus HMD device naming that we've keyed off of in these Blueprints (when determining which VR system we're running on). Change 3620108 by Mike.Beach [WIP] Adding an intermediate calibration step to tweak the MR virtual cam's alignment. Change 3620982 by Mike.Beach Tying off some loose ends with the MR calibration map: * Saving after each calibration phase * Fixing blocked input from garbage matte creation * Blocking input handling while exiting/previewing * Adding minimum radius for random screen pt Change 3621551 by Mike.Beach [MR] Leveraging camera support in the new media framework - working for limited cameras in calibration. Change 3621552 by Mike.Beach [MR calibration] - fixing it so when you first switch into compoisiting calibration it updates the property readout. Change 3621660 by Mike.Beach [MR calibration] Cleaning up how we display text (adding a struct to wrap the coresponding properties). Change 3623323 by Dustin.Holmes Fix buffer overflow when using 5+ Vive generic trackers and add more Special hand designations to cover the maximum 11 trackers Vive supports Change 3625900 by Keli.Hlodversson Remove fixed 16:9 aspect ratio for SteamVR and Oculus splash screens. Oculus was already fixed in CL#3413801, but regressed with plugin renaming and unificiation with GearVR in CL#3502152. #jira UE-40220 StereoLayer splash layers are hardcoded to 8 by 4.5 meters (16:9 aspect ratio) Change 3628409 by Mike.Beach Speculative CIS fix. #jira UE-49339 Change 3628440 by Nick.Whiting Fix for SteamVR OSX build issues Change 3628489 by Nick.Whiting Fix for win32 build break Change 3629045 by Mike.Beach Shadowed variable name fix (CIS). Change 3629202 by Arciel.Rekman Copying //UE4/Partner-Valve@3629179 to Dev-VR (//UE4/Dev-VR) Change 3629340 by Nick.Atamas Unshelved and resolved changes from Oculus. Change 3629772 by Ryan.Vance Fixing Oculus Vulkan related compile issues. This will break Oculus Vulkan support, but the code needs to be refactored anyway. Change 3629833 by Mike.Beach Fixing up CIS warning introduced by Oculus 1.17 changes - "unsafe conversion" warning #jira UE-49376 Change 3630696 by Jeff.Fisher UE-49415 //UE4/Dev-VR: Incremental UE4Editor Win64 completed with errors - 5 Errors Switching an include to a forward declaration -Not sure why the previous version didn't compile on the build machine, but fewer dependencies is good. Change 3630783 by Mike.Beach Fixing CIS compiler failures for our vehicle templates. #jira UE-49417 Change 3630802 by Mike.Beach Better fix than 3630783 - updating the vehicle template's stereoscopic check (fixing the VehicleHud.cpp logic as well) #jira UE-49417 Change 3630870 by Mike.Beach Pragma'ing out a function pointer cast warning. Good warning, but I figure we know what we're doing here and there's no other way around it. #jira UE-49376 Change 3630993 by Ryan.Vance Check to ensure we have a valid third camera before trying to use it. We could check >= 3 or if the left and right cameras are left/right stereo etc. decided to go with the simple test for now. Change 3631322 by Jeff.Fisher UEVR-909 PIP in Garbage Matte -Added ExternalGarbageMatteActor to MixedRealityGarbageMatteCaptureComponent and exposed it to blueprint though MixedRealityCaptureComponent. This lets us switch from using the normal mixed reality component save/load garbage matte data and instead use an external actor, in this case the actor we use to setup the garbage matte. Then the mask is able to capture that actor live as it is edited. -Also implemented GetViewOwner() so that we can use SetOwnerOnlySee to prevent other cameras and captures from seeing the garbage matte actor. -Calibration level now uses the external garbage matte actor to let the garbate matte mask live update. It also does a picture-in-picture preview of the mixed reality scene. 'P' can show/hide the garbage matte actor on that PIP preview. -Added SetUnmaskedPixelHighlightColor to MixedRealityCaptureComponent and the material. With this one can make unmasked video pixels more obvious in the output. The calibration level has this mapped to shift-P and makes pixels bright yellow to white. -Added blueprint to calibration level to make the garbage matte actor visible in the mixed reality capture. That is bound to ctrl-g. -GarbageMatteActors spawned by the mixed reality capture component are now attached to the vr origin. The calibration level now saves garbage matte mesh transforms relative to the vr origin. -The garbage matte mesh is now plugin content, and is referenced in the mixedrealitycomponent default object, so it is cooked in any project that includes the plugin. -Fog and AtmosphericFog no longer affect the garbage matte mask capture... there may be other things we need to turn off there. #review-3618345 #jira UEVR-909 Change 3631362 by Keli.Hlodversson #jira UE-49418 Exiting Google Instant Preview displays half of the editor viewport as black. Note convoluted fix: passing bIsStereoScopic3D to IsActiveThisFrame. ISceneViewExtension code cannot rely on StereoRenderingDevice->IsStereoEnabled to know whether to render in stereo, as the current viewport widget may disable it. This was not a problem before the refactoring, as HMD-related viewextensions were only added to the active list after establishing that stereo indeed was enabled and allowed by the current view port widget. Change 3631887 by Jeff.Fisher Fixing IsActiveThisFrame build break. Change 3632206 by Nick.Atamas Fix for UE-49413. Registering FOculusHMD as an extensions the same way as others: now creates an XRCamera that passes all the calls back to the HMD. Change 3632264 by Nick.Whiting Fix for Vive rendering getting cropped off due to invalid subrect values being submitted to the compositor. Change 3632340 by Nick.Atamas Merged in change from Loren; opted for our solution to ViewExtensions instead of the one in the changelist. Original description below. Change 3632214 by Loren.McQuade@Loren.McQuade_Dev-VR on 2017/09/07 19:51:29 *pending* [Dev-VR] Added OculusHMD_SceneViewExtension, PlayerPosition/PlayerOrientation values, FOculusHMD::GetRelativeEyePose cross-eyed madness (CL 3631541, 3631687) Change 3632353 by Ryan.Vance #jira UE-49468 Don't apply xr camera rotation on the player controller when not using xr tracking. Change 3632735 by Keli.Hlodversson Better fix for #jira UE-49413. Revert oculus xr camera code and use that one can have more than one view extension registered instead. Use GetPriority to have the OculusHMD view extension code execute after the default xr camera. The xr camera subclass did not forward the calls to ISceneViewExtension to the parent, breaking various functionality such as late update. Fixes a crash when entering VR pie twice, back to back. Change 3632752 by Keli.Hlodversson Applying change 3632592 by Loren.McQuade@Loren.McQuade_Dev-VR_Branch on 2017/09/08 02:08:22 [Dev-VR] Push //UE4/Partner-Oculus@3632591 #rb merge //UE4/Partner-Oculus to //UE4/Dev-VR/... Reverted OculusHMD_XRCamera changes, as that clas has been removed in the interim. Change 3633211 by Mike.Beach Backing out Oculus MotionController hiding that accidently got submitted - we decided not to adopt this change originally. Change 3633315 by Jeff.Fisher merge from main with dev-platform problem children -expecting SDRBackBuffer stuff to be wrong. Change 3634006 by Mike.Beach Resurecting Oculus clip plane settings which got dropped in the IXR refactor. #jira UE-49520 Change 3634639 by Keli.Hlodversson Avoid include cycle https://ec-01.epicgames.net/commander/link/jobStepDetails/jobSteps/68863219?stepName=UE4Editor%20Static%20Analysis%20Win64%20%28IncludeTool%29&jobId=7995809&jobName=UE4%20Dev-VR%20-%20CL%203632752%20-%20Nightly%20Build&tabGroup=diagnosticHeader&firstPage=1 Change 3634641 by Jeff.Fisher UE-49535 Lighting is blown out when playing in VR Preview on Vive -Need pixel format to be PF_B8G8R8A8 for vr, now the plugins all build their render target and use that format. #review-3634623 Change 3634682 by Jeff.Fisher IHeadMountedDisplay forward declarations needed. Change 3634690 by Ryan.Vance We can't override the screen percentage when rendering for stereo #jira UE-49287 Change 3635970 by Keli.Hlodversson #jira UE-49563 Crash while opening QA-Game Referencing SharedPointer.h Verify that StereoRendering is valid before calling IsStereoEnabled() Change 3635979 by Mike.Beach CIS static analysis fix - checking a ptr for null before we use it. #jira UE-49531 Change 3636059 by Mike.Beach Fixing XR system name aliasing for the -hmd command. [CL 3638830 by Ryan Vance in Main branch]
2017-09-12 11:27:30 -04:00
Copying //UE4/Dev-VR to //UE4/Dev-Main (Source: //UE4/Dev-VR @ 3383750) #lockdown Nick.Penwarden ========================== MAJOR FEATURES + CHANGES ========================== Change 3012064 on 2016/06/13 by Nick.Whiting Merging Main -> DevVR Change 3048060 on 2016/07/13 by Nick.Whiting Integrating CL 3045721 from //depot/Partners/Google/AndroidVR-DevVR Upgrade Android and iOS GVR SDK to the latest. Fix the flipped vignette issue when using Unreal's post processing distortion. Change the Daydream & Cardboard mode to use scanline racing. Deprecate the ability to turn off individual UI elements. Change 3235307 on 2016/12/14 by Keli.Hlodversson Filter out excluded HMD modules during FEngineLoop:PreInitHMDDevice. The final selection still happens in UEngine::InitializeHMDDevice as all HMD plugins have not been loaded during PreInit Change 3235308 on 2016/12/14 by Ryan.Vance #jira UEVR-478 Monoscopic far field improvements Shader changes are now gated behind the read only cvar vr.MonoscopicFarField. Changing this requires a shader compile. Moved the mono rendering mode to the cvar vr.MonoscopicFarFieldMode. This is writable, so users can enable/disable mono rendering on the fly if the above cvar is enabled. Only write to the alpha channel in the mobile base pass if the object is opaque and MONOSCOPIC_FAR_FIELD is defined. Addressed code review comments. Change 3235397 on 2016/12/14 by Keli.Hlodversson [Oculus] Only enable GearVR platform on Windows if Oculus service is running Original author: Loren.McQuade Change 3235762 on 2016/12/14 by Keli.Hlodversson Add explicit parentheses to placate the build bots. Change 3242318 on 2016/12/21 by Ryan.Vance Working around pixel density crash. Change 3242522 on 2016/12/21 by Ryan.Vance Missing flag clear so our adaptive test was always returning true. Change 3243173 on 2016/12/22 by Ryan.Vance Integrating post present callback implementation from 4.14.1 Change 3248633 on 2017/01/05 by Keli.Hlodversson Copying //Tasks/UE4/Dev-VR-Refactoring to Dev-VR-Minimal (//UE4/Dev-VR-Minimal) Change 3248723 on 2017/01/05 by Keli.Hlodversson Fix after merge. EnablePositionalTracking no longer exists. Change 3249484 on 2017/01/06 by Keli.Hlodversson Add missing includes Change 3249714 on 2017/01/06 by Keli.Hlodversson Remove monolithic header include Change 3249980 on 2017/01/06 by Keli.Hlodversson SteamVR: Remove leftover unused WindowMirrorMode member variable Change 3252432 on 2017/01/10 by Keli.Hlodversson Submitting change by Loren McQuade to fix monolithic builds. Unshelved from pending changelist '3251436': Change 3257373 on 2017/01/13 by Keli.Hlodversson #jira UEVR-411: Finish renaming/removing/remodelling the remaining Oculus (Rift+GearVR) commands #jira UEVR-412: Rename and merge remaining Morpheus console commands #jira UEVR-417: Remove Exec from IHeadMountedDisplay Change 3269971 on 2017/01/24 by Jeff.Fisher UEVR-498 move controller is missing world to meters UEVR-522 PS4 motion controller worldscale support. -Passing world to meters scale into getControllerOrientationAndPosition because the thing asking about it ought to be part of a world, and know what it should be. This also avoids making PS4 motion controllers dependent on the HMD. Note Google VR Controller doesn't do position, so doesnt' care about scale. Oculus already had internal threadsafe tracking of world scale, so I left that. Steam handles world scale below our input level. -Also adding PlayerIndex member to FSceneView so we can figure out which view the MotionControllerComponent should get its worldscale from for the late render thread update. #jira UEVR-498 #review-3384107 Change 3288308 on 2017/02/06 by Jeff.Fisher UEVR-517 Detect MotionController Connectivity -PS4 can only track 2 controllers and 1 hmd. Support for dealing with that is needed. -Also need to support multiple motion controller components mapped to a single controller. Licencees have done that before. -Created a new interface IMotionTrackingSystemManagement, and implements it for PS4Tracker on PS4. -Created a MotionTrackedDeviceFunctionLibrary to expose that interface to blueprint. -With those one can enable and disable tracking on ps4 controllers and query their state to stay within the controller tracking limit. -PS4Tracker also keeps a blackboard of the enable/disable state so that one can enable or disable controllers that have not been connected yet, and have them enable tracking or not when they are connected. -DS4 controller no longer jumps back to 000 if it loses tracking. #review-3384107 #jira UEVR-517 Change 3288309 on 2017/02/06 by Keli.Hlodversson Add file missing from CL#3257373. Change 3288311 on 2017/02/06 by Jeff.Fisher UEVR-517 Detect MotionController Connectivity - Test content. -tm-motionControllers has a third mode where all playstation motion controllers for player 0 are availalbe. You can toggle them to track or not with ctrl-P,G,L,R for pad, gun, leftmove, rightmove or with alt-P,G,L,R. Ctrl tests doing so via MotionControllerComponent. Alt tests doing so by player index and controller type enum. -ctrl-A disables tracking of all controllers -alt-A disables tracking of all controllers for player 0 -ctrl-D toggles enabling new controllers by default -Also fixed one button not working in one of the other test modes for the Aim (gun) controller. -The controller 'models' have an arrow out the front. It is black if disabled. Red if enabled, but no tracker is active, yellow if tracked but inertial only, and green if fully tracked by the camera. -This logic is in the QA_MoCoAll blueprint. Change 3291601 on 2017/02/07 by Jeff.Fisher UEVR-536 PSVR motion controller tracking problem with multiple controllers -Previous code called GetRelativeTransform from the render thread, but the game thread could update it at any time. This caches that transform so that it can be safely used in the render thread. #jira UEVR-536 #review-3384107 @Ryan.Vance Change 3292460 on 2017/02/08 by Jeff.Fisher PS4 sceVrTrackerGetResult() error warning logging improved, and explanatory comment added. Change 3308771 on 2017/02/17 by Keli.Hlodversson Rename GoogleVR console commands #jira UEVR-412 Change 3309156 on 2017/02/17 by Keli.Hlodversson Track changes in r.ScreenPercentage on GoogleVR and set RenderTargetSize accordingly. Change 3311999 on 2017/02/20 by Keli.Hlodversson Create a default implementation for RecordAnalytics. Also create an initial stub for FHeadMountedDisplayBase for future default implementations of common HMD functionality. Make implementing IHeadMountedDisplay::GetDeviceName mandatory instead of defaulting to "Unknown" #jira UE-21878 #jira UEVR-213 Change 3313467 on 2017/02/20 by Ryan.Vance #jira UE-41604 3278583 pCustomPresent->AllocateRenderTargetTexture may return false, if we blindly return true we can end up with an invalid render target since the fall back sceneviewport will be skipped. 3278536 Adding ovrError_NoHmd to our sanity check in OnStartGameFrame. Change 3314002 on 2017/02/21 by Keli.Hlodversson Fix compilation on PS4 and Linux Change 3326722 on 2017/03/01 by Jeff.Fisher Merging //UE4/Dev-Main to Dev-VR (//UE4/Dev-VR) Integrating 4.15 from main. Change 3327567 on 2017/03/01 by Jeff.Fisher UEVR-588 Oculus crash on "stereo on" when the proximity sensor is not triggered. Duplicating from Release-4.15 cl 3327481, 3327542 -Don't ovr_SubmitFrame when the layers need to be recreated. They stay dirty until rendering is unpaused. #jira UEVR-588 #review-3384107 Change 3328098 on 2017/03/01 by Jeff.Fisher 4.15 merge fixes -Fixed deprecated enum name function usage. -Fixed world scale usage in GoogleVRController. -Fixed compile break in PS4Tracker. Change 3328271 on 2017/03/01 by Jeff.Fisher 2.15 merge -restroging GoogleVRController::GetWorldToMetersScale... cause it is used everywhere. Change 3328307 on 2017/03/01 by Jeff.Fisher 4.15 merge -More googlevr worldscale fixes. Change 3328312 on 2017/03/01 by Jeff.Fisher 4.15 merge -removing 2 unused includes Change 3330610 on 2017/03/02 by Jeff.Fisher 4.15 merge -fixing linux build Change 3333952 on 2017/03/06 by Keli.Hlodversson Implement common stereo layer management base class and use it in SteamVR and PS4. Fixes an outstanding bug in SteamVR where texures are updated every frame regardles of whether the continous update flag is set or not. #jira UEVR-628 #jira UE-42555 Change 3334961 on 2017/03/07 by Keli.Hlodversson Add missing include to fix non-unity builds Change 3336200 on 2017/03/07 by Keli.Hlodversson Fix compilation issues. (https://ec-01.epicgames.net/commander/link/jobDetails/jobs/7568252?jobName=UE4+Dev-VR+-+CL+3334961+-+Nightly+Build&s=Jobs) * Pre VS2015 compilers don't like mixing wide and unmarked strings in concatenation. Unfortunately LOCTEXT hides the call to the TEXT macro, completely hinding the prefix (which only gets added to the first fragment.) * Switch apparently doesn't know how to format a size_t for analytics either. Also: Typo in backwards compatibility command name alias Change 3337347 on 2017/03/08 by Jeff.Fisher UE-42631 Stereo off while prox sensor uncovered causes low framerate -Setting maxfps appropriately on 'stereo on/off'. #review-3384107 #jira UE-42631 Change 3338385 on 2017/03/08 by Ryan.Vance r.DisableDistortion was only being used for the mobile renderer Change 3342301 on 2017/03/10 by patrickr.donovan Test updates to TM-VRSmoke. Increased lightmap resolution on QA_MeshTypes meshes to improve readbility and reliablility of tests involving said asset. Rebuilt lighting. Change 3348133 on 2017/03/15 by Ryan.Vance Moving mono cvars to scene rendering to avoid cross module references. There's not a good reason to have them in the hmd module anyway. Change 3348836 on 2017/03/15 by Ryan.Vance Direct multi-view support for gear vr Monoscopic far field with multi-view (blit and direct) support for gear vr Support for translucent objects on both sides of the mono clip plane (due to a sorting issue, objects that straddle the plane composite incorrectly) Fixed missing discards/clears in the multi-view blit Change 3348843 on 2017/03/15 by Ryan.Vance Fixing color/depth target size mismatch when screen percentage scaling results in a size that isn't divisible by 16. Change 3349276 on 2017/03/16 by Keli.Hlodversson Fixing compile errors in GoogleVR after merge from main. Change 3350932 on 2017/03/16 by Ryan.Vance Re-enabling the gearvr plugin on windows. Change 3351977 on 2017/03/17 by Jeff.Fisher Fixing masked member variable. Change 3352314 on 2017/03/17 by Ryan.Vance We need to ensure that we don't select different lod levels for each eye. Change 3352993 on 2017/03/17 by Nick.Whiting Integrating CL 3345824 from Android-DevVR to Dev-VR. Support for device depth pass in SceneCaptureComponent2D Change 3355185 on 2017/03/20 by Nick.Whiting Added ability to disable the autoloading splash screen, which would prevent the hide splash screen node from ever working Change 3355676 on 2017/03/20 by Nick.Whiting PR #3384: [GNUX] SteamVR, OpenGL patch. (Contributed by yaakuro), with some minor modifications Change 3357286 on 2017/03/21 by Jeff.Fisher Fixing GenerateProjectFiles, looks like the .config. was removed from these references in main some time ago. Change 3357435 on 2017/03/21 by Jeff.Fisher Fixing editor build break, looks like a merge mistake. Change 3359960 on 2017/03/23 by Keli.Hlodversson Prevent potential crash when drawing tracking sensor location. Also only fetch HMD location once instead of once per tracking sensor. Change 3361230 on 2017/03/23 by Jeff.Fisher Fixing linux build opengl include problem... maybe. Change 3361638 on 2017/03/23 by Jeff.Fisher Another guess at fixing linux build. Change 3364224 on 2017/03/24 by Keli.Hlodversson Initial implementation of UEVR-576 - Base emulated layer implementation #jira UEVR-668 - Base emulated layer implementation: Initial framework for overrideable default implementation #jira UEVR-669 - Base emulated layer implementation: Face Locked Layers Support #jira UEVR-670 - Base emulated layer implementation: Tracker Locked Layers Support #jira UEVR-671 - Base emulated layer implementation: World Locked Layers Support #jira UEVR-672 - Base emulated layer implementation: Add support for optionally rendering face locked layers into a separate layer Change 3364242 on 2017/03/24 by Keli.Hlodversson SteamVR layers do not support negatve Layer priorities Change 3364263 on 2017/03/24 by Jeff.Fisher Merging //UE4/Dev-Main to Dev-VR (//UE4/Dev-VR) Monoscopicfarfieldrendering was just 'accept source', Ryan is going to look at fixing it up. Change 3364472 on 2017/03/24 by Jeff.Fisher Merge fix Change 3364475 on 2017/03/24 by Jeff.Fisher Fixing gearvr include. Change 3364486 on 2017/03/24 by Jeff.Fisher merge fix Change 3364532 on 2017/03/24 by Ryan.Vance pso update for mono rendering and stereo layers. Change 3364599 on 2017/03/24 by Ryan.Vance Oculus changes for SI1.12 Change 3365159 on 2017/03/26 by Jeff.Fisher include fix Change 3365182 on 2017/03/26 by Jeff.Fisher include fix Change 3366087 on 2017/03/27 by Ryan.Vance Remaining files from Oculus changes for SI1.12 merge request. Fixing a bug in OnlineSubsystem. Temporarily changing the eye padding change to be a shader clear to work around a clear color binding issue. Change 3366492 on 2017/03/27 by Ryan.Vance #jira UE-43294 Moved the clear before we setup state for drawing the mirror window content. It was stomping over state after the pso changes. Going to leave the shader clear in the rift prerender for clearing the eye padding for now. Change 3366929 on 2017/03/27 by Ryan.Vance Fixing compile error Change 3368549 on 2017/03/28 by Jeff.Fisher Merging Change: 3357998 from //UE4/Partner-Google-VR/Engine/... to Dev-VR Upgrade Google VR Plugin to v1.3: *Upgraded GVR NDK to 1.30.0 *Changed some BlueprintFunction to use BlueprintPure *Add the missing bDaydream flag in UEDeployAndroid.cs #review-3384107 Change 3368975 on 2017/03/28 by Ryan.Vance CIS clean up #jira UE-43428, UE-43429, UE-43426, UE-43427 Change 3369028 on 2017/03/28 by Ryan.Vance This is not exacly 'correct', but it's at least what the code was trying to do. Change 3370203 on 2017/03/29 by Ryan.Vance Adding gear vr controller component support. Change 3370918 on 2017/03/29 by Ryan.Vance Merging 3370569 using Partner-Google-VR_to_DevVR Change 3371030 on 2017/03/29 by Ryan.Vance Fixing linux build errors #jira UE-43426 Change 3371036 on 2017/03/29 by Ryan.Vance Oculus 4.16 integration. Not terribly happy with the use of std::string. They promised to clean this up for the next release. Change 3373495 on 2017/03/30 by Jeff.Fisher Merging from Dev-Main, in preparation for 4.16 Change 3373578 on 2017/03/30 by Jeff.Fisher build break, one comma short Change 3373870 on 2017/03/31 by Jeff.Fisher Include order fix. Change 3374001 on 2017/03/31 by Keli.Hlodversson Use DefaultStereoLayers as base for Morpheus implementation. #jira UEVR-709 #jira UE-42919 #rb: Jeff.Fisher Change 3374004 on 2017/03/31 by Keli.Hlodversson Fix rendering for the default Stereo Layers implementation on mobile. Depth test was set to "Never" instead of "Always" Destination texture on GLES is flipped on the Y axis, the coordinates are reversed in the shade when compiled on the relevant platforms. Change 3375125 on 2017/03/31 by Jeff.Fisher UE-43506 Ensure using VRPreview with GoogleVR -Removed the ensure, there is code in there to handle that case, and it works. #jira UE-43506 Change 3375294 on 2017/03/31 by nick.bullard Resaving Plugin content to resovle "saved with empty engine version" #jira UE-43537 Change 3375480 on 2017/03/31 by Jeff.Fisher UEVR-9 PSVR: Social Screen Support -Experimental social screen support for 4.16. -This does the basics of driving output through the Aux port in the proper format for display on the mirror monitor. -Only supports 30fps on the mirror monitor. 60fps will require the implementation of sony system dialogs to deal with incompatable system features (video streaming, remote play). -There is a project setting in Morpheus, under experiemental bEnableSocialScreenSeparateMode. This must be set to true to use this feature. When it is false we avoid allocating the back buffers. -MorpheusFunctionLibrary blueprints now have a node "SetSocialScreenMode" which can switch between SystemMirror (hardware supported mirroring), SeparateTest (alternates black and white), SeparateTexture (displays a texture, eg a render target, specified via blueprint), and SeparateMirror(puts the hmd render buffer on screen - which is both eyes, like a debug mode). -Also finally updated the bEnabled flag in project settings to tell people it's only for PC. #jira UEVR-9 #review-3384107 Change 3375540 on 2017/03/31 by Ryan.Vance #jira UE-43504 Fixing android build break when using a 64 bit isa. Change 3375655 on 2017/03/31 by Jeff.Fisher Fixing missing RGBAToYUV shader problem -This at least unblocks our process. Will revisit before zbr. Change 3375820 on 2017/04/01 by Jeff.Fisher Fixing linux build warning about HAS_MORPHEUS Change 3376050 on 2017/04/02 by Jeff.Fisher UE-43515 Step 'UE4Editor Static Analysis Win64' - Module.OnlineSubsystemOculus.cpp Warnings -Temporary fix for static analysis annotation warnings in OnlineSubsytemOculus. Longer term plan is to eliminate the use of the headers that trigger the warnings. -Just wrap all standard headers in static analysis disables. #jira UE-43515 Change 3376609 on 2017/04/03 by Jeff.Fisher Fixing rgbatoyuvshader include. Change 3377001 on 2017/04/03 by Jeff.Fisher UE-43547 Launch On PS4 fails during Run command - Missing global shader FRGBAToYUV420CS - shader c++ must be compiled so that it can be cooked for ps4. #jira UE-43547 Change 3379858 on 2017/04/04 by Jeff.Fisher Merging //UE4/Dev-Main to Dev-VR (//UE4/Dev-VR) pulling main this should get us ps4 sdk 4.508 Change 3379938 on 2017/04/04 by Ryan.Vance #jira UE-43548 If stereo layers are not being used, don't setup overlay targets as we will never clear/initialize them. The clear happens as part of the default layers PostRenderView_RenderThread call which wont be called if layers aren't being used in the scene. Change 3381519 on 2017/04/05 by Jeff.Fisher UEVR-733 PS4 sdk 4.500 hmd connection api changes break hmd connect. -Handling failure of sceHmdGetDeviceInformation if the hmd is powered off. It now returns an error code about an invalid handle in that case, rather than reporting unready. We just treat the error code like an unready status. #jira UEVR-733 #review-3384107 Change 3382019 on 2017/04/05 by Ryan.Vance Linux: add Vulkan support from dev editor: 3381593 Change 3382021 on 2017/04/05 by Ryan.Vance SteamVR on Linux using Vulkan OpenVR rev to 1_0_6 PR #3412: [GNUX] Initial support for SteamVR using Vulkan on GNUX platform. (Contributed by yaakuro) Change 3382076 on 2017/04/05 by Ryan.Vance Fixing linux steamvr lib path. It changed to something less silly in 1.0.6 Removing the steamvr plugin from the white list for linux. It's looking for a runtime that no one will have installed. Change 3383237 on 2017/04/06 by Ryan.Vance #jira UE-43732 Fixing Android compile issues. We can't wrap portions of a macro with a definie. This should probably be some sort of recursive macro thing since there's so much overlap. Good enough for now. Change 3383353 on 2017/04/06 by Ryan.Vance Fixing include cycles. Change 3383509 on 2017/04/06 by Jeff.Fisher Merging //UE4/Dev-Main to Dev-VR (//UE4/Dev-VR) merging the stuff from dev-mobile [CL 3384106 by Ryan Vance in Main branch]
2017-04-06 22:03:51 -04:00
void FDefaultStereoLayers::SetupViewFamily(FSceneViewFamily& InViewFamily)
{
// Initialize HMD position.
FQuat HmdOrientation = FQuat::Identity;
FVector HmdPosition = FVector::ZeroVector;
Copying //UE4/Dev-VR to //UE4/Dev-Main (Source: //UE4/Dev-VR @ 3636795) #lockdown Nick.Penwarden ============================ MAJOR FEATURES & CHANGES ============================ Change 2932765 by Nick.Whiting Merging updated license files for Oculus libraries Change 3480552 by Dustin.Holmes Added map and gamemode for calibration #jira UEVR-808 Change 3502253 by Nick.Whiting Trying to fix up p4's botch of the merge Change 3513736 by Keli.Hlodversson Move duplicated late update code into a common FLateUpdateManager #jira UEVR-893 Change 3514798 by Mike.Beach #4.17 Exposing a way for Blueprint users to remap the SteamVR controller's d-pad buttons (clashes with the Oculus mappings). #jira UE-42634 Change 3516042 by Dustin.Holmes Runtime handedness changes in Vive controllers are now reflected when a new device is connected. Device mappings are also reset when a device disconnects, so that if it connects again it fully reregisters instead of just assuming the role it previously had. Change 3517781 by Keli.Hlodversson Remove unused local variable bUseCustomPresentTexture Change 3517951 by Mike.Beach #4.17 Guarding against dereferencing a null pointer. Defaulting to the identity when we don't (yet) have a valid head pose to use. #jira UE-43685 Change 3518142 by Mike.Beach #4.17 Resolving fallout from bad merge (CL 3514868) - checking for teminating null in array (which was added to keep ARRAY_COUNT from acting on an empty array). Change 3523183 by Ryan.Vance #jira UE-46493, UEVR-661 Fixes GearVR only displaying a black screen on startup Fixes GearVR rendering incorrectly with mobile multi-view w/o direct mode enabled Adding mobile multi-view direct support to Daydream Change 3523718 by Nick.Whiting Adding core controller recentering delegate, and moving Google over to that system. Change 3527263 by Dan.Oconnor Mirror 3526925 for Nick Donaldson Change 3533596 by Dustin.Holmes Add garbage matte map, gamemode, and blueprints. Change 3533598 by Dustin.Holmes Expose the Set Tint Color and Opacity function for Widget Components as a Blueprint node. Change 3538139 by Mike.Beach Moving Oculus debug shader directly into Oculus plugin. #jira UE-47134 Change 3543185 by Nick.Atamas Address UEVR-891 : Merge in changes to Google Tango plugin. #jira UEVR-891 Change 3543285 by Nick.Atamas Merging using //UE4/Release-4.17/... -> //UE4/Dev-VR/... : Fixed UEVR-852: Adjusted Google Tango Plugins copyright to Copyright Google 2017. Removed Apache 2.0 license. Change 3545505 by Nick.Atamas Fix UEVR-851 : some fix-ups to MeshReconHUD and overlay material now has a material parameter for tinting the reconstructed mesh to help debug visualization. Change 3547549 by Jeff.Fisher Fixing DefaultSpectatorScreenController comment. Change 3551339 by Ryan.Vance #jira UE-44947 Editor primitives we not being handled correctly with ISR. Change 3554169 by Dustin.Holmes Reconcile missed Mixed Reality blueprint Change 3566825 by Mike.Beach Fixing some bad merges from Main (fallout from CL 3566309) Change 3567143 by Mike.Beach Copying //Tasks/UE4/Dev-MixedReality to Dev-VR-Minimal (//UE4/Dev-VR-Minimal) Change 3567572 by Mike.Beach [WIP] Adding some MR plugin dependencies to keep CIS quiet (SteamVR is just temporary, and will be removed). Change 3569116 by Jeff.Fisher Mixed reality build breaks for PS4 -Module is dependent on steamvr, so don't build it for PS4. -Removed unused class that doesn't compile with clang. Change 3569362 by Mike.Beach Organizing MR plugin content, to make way for new calibration modes. Change 3572802 by Jeff.Fisher UEVR-832 Add save/load system for calibrated camera settings -Moved MixedRealityConfigurationSaveGame to c++. #review-3571779 #jira UEVR-832 Change 3573864 by Mike.Beach [WIP] Initial work on MR cam alignment controller - records point/frustum data from user input. Change 3575900 by Jeff.Fisher Vive spectator flat rect expanded to match other platforms. -The vive 'full flat eye' rect was narrower than other platforms. Expanded it to be closer to the other platforms. Change 3578684 by Mike.Beach Static analysis fixes for CIS. #jira UE-48204, UE-48203, UE-48206 Change 3579460 by Mike.Beach [WIP] New calibration mode for camera alignment. #jira UEVR-785 Change 3581232 by Mike.Beach [WIP] Saving off alignment calibration data, and loading it on initialization. We skip alignment calibration if it has been configured. #jira UEVR-832 Change 3588411 by Mike.Beach [WIP] Adding calibration for compositing (chroma color, etc.). #jira UEVR-785 Change 3588541 by Mike.Beach [WIP] Cleaning up some display issues with the MR calibration. #jira UEVR-785 Change 3588680 by Mike.Beach Re-organizing the MR content, now that the alignment controller calibrates more than just alignment (renaming, etc.). Change 3588694 by Mike.Beach Renaming the MR calibration pawn (since it doesn't do any calibrating itself). Change 3591518 by Mike.Beach Copying //Tasks/UE4/Dev-MixedReality to Dev-VR-Minimal (//UE4/Dev-VR-Minimal) Change 3591671 by Ryan.Vance Debug stereo layer support This adds an option to render the debug canvas to a stereo layer which greatly improves console and stat readability in an hmd. Change 3591812 by Ryan.Vance Don't snap motion controllers to the origin when tracking is lost. Change 3594681 by Mike.Beach [WIP] Copying //Tasks/UE4/Dev-MixedReality to Dev-VR-Minimal (//UE4/Dev-VR-Minimal) Change 3596679 by Mike.Beach CIS fix (likely fallout from CL 3591671) - changing the order of initialization to better match the order of declaration. Change 3598191 by Jeff.Fisher UEVR-807 Setup M_MRVidProcessing to use 3D garbage matte data. -Created MixedRealityGarbageMatteCaptureComponent. An instance of this is spawned by and attached to MixedRealityCaptureComponent. Saved config data is loaded into it. It spawns a garbage matte actor. It then captures the garbage matte actor into a render target (which is set on MixedRealityCaptureComponent). #jira UEVR-807 #review-3598179 Change 3598276 by Mike.Beach Copying //Tasks/UE4/Dev-MixedReality to Dev-VR-Minimal (//UE4/Dev-VR-Minimal) Change 3598332 by Mike.Beach Guarding against a blind cast in the SteamVRChaperone component, which can be used cross platform (can't assume SteamVR). Change 3605271 by Mike.Beach Copying //Tasks/UE4/Dev-MixedReality to Dev-VR-Minimal (//UE4/Dev-VR-Minimal) Change 3608490 by Jeff.Fisher UEVR-987 Social Screen PS4 need to go to 'mirroring' for hmd setup dialog because system dialogs are not visible in separate mode. UEVR-988 SpectatorScreen Flickering UE-47234 Spectator screen: need frame delay before assigning dynamically created rendertarget to spectator texture UE-47310 Spectator Screen: crash if you release a render target which is assigned as the spectator texture -Test level content for all of these bugs. Change 3608883 by Jeff.Fisher UEVR-807 Setup M_MRVidProcessing to use 3D garbage matte data. -Set material to use the garbage matte render target. Change 3613292 by Mike.Beach Moving header fcn decl up, under the proper interface section (for organization's sake). Change 3616943 by Nick.Whiting Updating SteamVR libraries to 1.0.9, so we can bring back macOS support Change 3616970 by Nick.Whiting Adding in steamvr visible area mesh support. Can be toggled with vr.SteamVR.UseVisibleAreaMesh Change 3617866 by Mike.Beach Updating the VR template to reflect Oculus HMD device naming that we've keyed off of in these Blueprints (when determining which VR system we're running on). Change 3620108 by Mike.Beach [WIP] Adding an intermediate calibration step to tweak the MR virtual cam's alignment. Change 3620982 by Mike.Beach Tying off some loose ends with the MR calibration map: * Saving after each calibration phase * Fixing blocked input from garbage matte creation * Blocking input handling while exiting/previewing * Adding minimum radius for random screen pt Change 3621551 by Mike.Beach [MR] Leveraging camera support in the new media framework - working for limited cameras in calibration. Change 3621552 by Mike.Beach [MR calibration] - fixing it so when you first switch into compoisiting calibration it updates the property readout. Change 3621660 by Mike.Beach [MR calibration] Cleaning up how we display text (adding a struct to wrap the coresponding properties). Change 3623323 by Dustin.Holmes Fix buffer overflow when using 5+ Vive generic trackers and add more Special hand designations to cover the maximum 11 trackers Vive supports Change 3625900 by Keli.Hlodversson Remove fixed 16:9 aspect ratio for SteamVR and Oculus splash screens. Oculus was already fixed in CL#3413801, but regressed with plugin renaming and unificiation with GearVR in CL#3502152. #jira UE-40220 StereoLayer splash layers are hardcoded to 8 by 4.5 meters (16:9 aspect ratio) Change 3628409 by Mike.Beach Speculative CIS fix. #jira UE-49339 Change 3628440 by Nick.Whiting Fix for SteamVR OSX build issues Change 3628489 by Nick.Whiting Fix for win32 build break Change 3629045 by Mike.Beach Shadowed variable name fix (CIS). Change 3629202 by Arciel.Rekman Copying //UE4/Partner-Valve@3629179 to Dev-VR (//UE4/Dev-VR) Change 3629340 by Nick.Atamas Unshelved and resolved changes from Oculus. Change 3629772 by Ryan.Vance Fixing Oculus Vulkan related compile issues. This will break Oculus Vulkan support, but the code needs to be refactored anyway. Change 3629833 by Mike.Beach Fixing up CIS warning introduced by Oculus 1.17 changes - "unsafe conversion" warning #jira UE-49376 Change 3630696 by Jeff.Fisher UE-49415 //UE4/Dev-VR: Incremental UE4Editor Win64 completed with errors - 5 Errors Switching an include to a forward declaration -Not sure why the previous version didn't compile on the build machine, but fewer dependencies is good. Change 3630783 by Mike.Beach Fixing CIS compiler failures for our vehicle templates. #jira UE-49417 Change 3630802 by Mike.Beach Better fix than 3630783 - updating the vehicle template's stereoscopic check (fixing the VehicleHud.cpp logic as well) #jira UE-49417 Change 3630870 by Mike.Beach Pragma'ing out a function pointer cast warning. Good warning, but I figure we know what we're doing here and there's no other way around it. #jira UE-49376 Change 3630993 by Ryan.Vance Check to ensure we have a valid third camera before trying to use it. We could check >= 3 or if the left and right cameras are left/right stereo etc. decided to go with the simple test for now. Change 3631322 by Jeff.Fisher UEVR-909 PIP in Garbage Matte -Added ExternalGarbageMatteActor to MixedRealityGarbageMatteCaptureComponent and exposed it to blueprint though MixedRealityCaptureComponent. This lets us switch from using the normal mixed reality component save/load garbage matte data and instead use an external actor, in this case the actor we use to setup the garbage matte. Then the mask is able to capture that actor live as it is edited. -Also implemented GetViewOwner() so that we can use SetOwnerOnlySee to prevent other cameras and captures from seeing the garbage matte actor. -Calibration level now uses the external garbage matte actor to let the garbate matte mask live update. It also does a picture-in-picture preview of the mixed reality scene. 'P' can show/hide the garbage matte actor on that PIP preview. -Added SetUnmaskedPixelHighlightColor to MixedRealityCaptureComponent and the material. With this one can make unmasked video pixels more obvious in the output. The calibration level has this mapped to shift-P and makes pixels bright yellow to white. -Added blueprint to calibration level to make the garbage matte actor visible in the mixed reality capture. That is bound to ctrl-g. -GarbageMatteActors spawned by the mixed reality capture component are now attached to the vr origin. The calibration level now saves garbage matte mesh transforms relative to the vr origin. -The garbage matte mesh is now plugin content, and is referenced in the mixedrealitycomponent default object, so it is cooked in any project that includes the plugin. -Fog and AtmosphericFog no longer affect the garbage matte mask capture... there may be other things we need to turn off there. #review-3618345 #jira UEVR-909 Change 3631362 by Keli.Hlodversson #jira UE-49418 Exiting Google Instant Preview displays half of the editor viewport as black. Note convoluted fix: passing bIsStereoScopic3D to IsActiveThisFrame. ISceneViewExtension code cannot rely on StereoRenderingDevice->IsStereoEnabled to know whether to render in stereo, as the current viewport widget may disable it. This was not a problem before the refactoring, as HMD-related viewextensions were only added to the active list after establishing that stereo indeed was enabled and allowed by the current view port widget. Change 3631887 by Jeff.Fisher Fixing IsActiveThisFrame build break. Change 3632206 by Nick.Atamas Fix for UE-49413. Registering FOculusHMD as an extensions the same way as others: now creates an XRCamera that passes all the calls back to the HMD. Change 3632264 by Nick.Whiting Fix for Vive rendering getting cropped off due to invalid subrect values being submitted to the compositor. Change 3632340 by Nick.Atamas Merged in change from Loren; opted for our solution to ViewExtensions instead of the one in the changelist. Original description below. Change 3632214 by Loren.McQuade@Loren.McQuade_Dev-VR on 2017/09/07 19:51:29 *pending* [Dev-VR] Added OculusHMD_SceneViewExtension, PlayerPosition/PlayerOrientation values, FOculusHMD::GetRelativeEyePose cross-eyed madness (CL 3631541, 3631687) Change 3632353 by Ryan.Vance #jira UE-49468 Don't apply xr camera rotation on the player controller when not using xr tracking. Change 3632735 by Keli.Hlodversson Better fix for #jira UE-49413. Revert oculus xr camera code and use that one can have more than one view extension registered instead. Use GetPriority to have the OculusHMD view extension code execute after the default xr camera. The xr camera subclass did not forward the calls to ISceneViewExtension to the parent, breaking various functionality such as late update. Fixes a crash when entering VR pie twice, back to back. Change 3632752 by Keli.Hlodversson Applying change 3632592 by Loren.McQuade@Loren.McQuade_Dev-VR_Branch on 2017/09/08 02:08:22 [Dev-VR] Push //UE4/Partner-Oculus@3632591 #rb merge //UE4/Partner-Oculus to //UE4/Dev-VR/... Reverted OculusHMD_XRCamera changes, as that clas has been removed in the interim. Change 3633211 by Mike.Beach Backing out Oculus MotionController hiding that accidently got submitted - we decided not to adopt this change originally. Change 3633315 by Jeff.Fisher merge from main with dev-platform problem children -expecting SDRBackBuffer stuff to be wrong. Change 3634006 by Mike.Beach Resurecting Oculus clip plane settings which got dropped in the IXR refactor. #jira UE-49520 Change 3634639 by Keli.Hlodversson Avoid include cycle https://ec-01.epicgames.net/commander/link/jobStepDetails/jobSteps/68863219?stepName=UE4Editor%20Static%20Analysis%20Win64%20%28IncludeTool%29&jobId=7995809&jobName=UE4%20Dev-VR%20-%20CL%203632752%20-%20Nightly%20Build&tabGroup=diagnosticHeader&firstPage=1 Change 3634641 by Jeff.Fisher UE-49535 Lighting is blown out when playing in VR Preview on Vive -Need pixel format to be PF_B8G8R8A8 for vr, now the plugins all build their render target and use that format. #review-3634623 Change 3634682 by Jeff.Fisher IHeadMountedDisplay forward declarations needed. Change 3634690 by Ryan.Vance We can't override the screen percentage when rendering for stereo #jira UE-49287 Change 3635970 by Keli.Hlodversson #jira UE-49563 Crash while opening QA-Game Referencing SharedPointer.h Verify that StereoRendering is valid before calling IsStereoEnabled() Change 3635979 by Mike.Beach CIS static analysis fix - checking a ptr for null before we use it. #jira UE-49531 Change 3636059 by Mike.Beach Fixing XR system name aliasing for the -hmd command. [CL 3638830 by Ryan Vance in Main branch]
2017-09-12 11:27:30 -04:00
HMDDevice->GetCurrentPose(IXRTrackingSystem::HMDDeviceId, HmdOrientation, HmdPosition);
Copying //UE4/Dev-VR to //UE4/Dev-Main (Source: //UE4/Dev-VR @ 3383750) #lockdown Nick.Penwarden ========================== MAJOR FEATURES + CHANGES ========================== Change 3012064 on 2016/06/13 by Nick.Whiting Merging Main -> DevVR Change 3048060 on 2016/07/13 by Nick.Whiting Integrating CL 3045721 from //depot/Partners/Google/AndroidVR-DevVR Upgrade Android and iOS GVR SDK to the latest. Fix the flipped vignette issue when using Unreal's post processing distortion. Change the Daydream & Cardboard mode to use scanline racing. Deprecate the ability to turn off individual UI elements. Change 3235307 on 2016/12/14 by Keli.Hlodversson Filter out excluded HMD modules during FEngineLoop:PreInitHMDDevice. The final selection still happens in UEngine::InitializeHMDDevice as all HMD plugins have not been loaded during PreInit Change 3235308 on 2016/12/14 by Ryan.Vance #jira UEVR-478 Monoscopic far field improvements Shader changes are now gated behind the read only cvar vr.MonoscopicFarField. Changing this requires a shader compile. Moved the mono rendering mode to the cvar vr.MonoscopicFarFieldMode. This is writable, so users can enable/disable mono rendering on the fly if the above cvar is enabled. Only write to the alpha channel in the mobile base pass if the object is opaque and MONOSCOPIC_FAR_FIELD is defined. Addressed code review comments. Change 3235397 on 2016/12/14 by Keli.Hlodversson [Oculus] Only enable GearVR platform on Windows if Oculus service is running Original author: Loren.McQuade Change 3235762 on 2016/12/14 by Keli.Hlodversson Add explicit parentheses to placate the build bots. Change 3242318 on 2016/12/21 by Ryan.Vance Working around pixel density crash. Change 3242522 on 2016/12/21 by Ryan.Vance Missing flag clear so our adaptive test was always returning true. Change 3243173 on 2016/12/22 by Ryan.Vance Integrating post present callback implementation from 4.14.1 Change 3248633 on 2017/01/05 by Keli.Hlodversson Copying //Tasks/UE4/Dev-VR-Refactoring to Dev-VR-Minimal (//UE4/Dev-VR-Minimal) Change 3248723 on 2017/01/05 by Keli.Hlodversson Fix after merge. EnablePositionalTracking no longer exists. Change 3249484 on 2017/01/06 by Keli.Hlodversson Add missing includes Change 3249714 on 2017/01/06 by Keli.Hlodversson Remove monolithic header include Change 3249980 on 2017/01/06 by Keli.Hlodversson SteamVR: Remove leftover unused WindowMirrorMode member variable Change 3252432 on 2017/01/10 by Keli.Hlodversson Submitting change by Loren McQuade to fix monolithic builds. Unshelved from pending changelist '3251436': Change 3257373 on 2017/01/13 by Keli.Hlodversson #jira UEVR-411: Finish renaming/removing/remodelling the remaining Oculus (Rift+GearVR) commands #jira UEVR-412: Rename and merge remaining Morpheus console commands #jira UEVR-417: Remove Exec from IHeadMountedDisplay Change 3269971 on 2017/01/24 by Jeff.Fisher UEVR-498 move controller is missing world to meters UEVR-522 PS4 motion controller worldscale support. -Passing world to meters scale into getControllerOrientationAndPosition because the thing asking about it ought to be part of a world, and know what it should be. This also avoids making PS4 motion controllers dependent on the HMD. Note Google VR Controller doesn't do position, so doesnt' care about scale. Oculus already had internal threadsafe tracking of world scale, so I left that. Steam handles world scale below our input level. -Also adding PlayerIndex member to FSceneView so we can figure out which view the MotionControllerComponent should get its worldscale from for the late render thread update. #jira UEVR-498 #review-3384107 Change 3288308 on 2017/02/06 by Jeff.Fisher UEVR-517 Detect MotionController Connectivity -PS4 can only track 2 controllers and 1 hmd. Support for dealing with that is needed. -Also need to support multiple motion controller components mapped to a single controller. Licencees have done that before. -Created a new interface IMotionTrackingSystemManagement, and implements it for PS4Tracker on PS4. -Created a MotionTrackedDeviceFunctionLibrary to expose that interface to blueprint. -With those one can enable and disable tracking on ps4 controllers and query their state to stay within the controller tracking limit. -PS4Tracker also keeps a blackboard of the enable/disable state so that one can enable or disable controllers that have not been connected yet, and have them enable tracking or not when they are connected. -DS4 controller no longer jumps back to 000 if it loses tracking. #review-3384107 #jira UEVR-517 Change 3288309 on 2017/02/06 by Keli.Hlodversson Add file missing from CL#3257373. Change 3288311 on 2017/02/06 by Jeff.Fisher UEVR-517 Detect MotionController Connectivity - Test content. -tm-motionControllers has a third mode where all playstation motion controllers for player 0 are availalbe. You can toggle them to track or not with ctrl-P,G,L,R for pad, gun, leftmove, rightmove or with alt-P,G,L,R. Ctrl tests doing so via MotionControllerComponent. Alt tests doing so by player index and controller type enum. -ctrl-A disables tracking of all controllers -alt-A disables tracking of all controllers for player 0 -ctrl-D toggles enabling new controllers by default -Also fixed one button not working in one of the other test modes for the Aim (gun) controller. -The controller 'models' have an arrow out the front. It is black if disabled. Red if enabled, but no tracker is active, yellow if tracked but inertial only, and green if fully tracked by the camera. -This logic is in the QA_MoCoAll blueprint. Change 3291601 on 2017/02/07 by Jeff.Fisher UEVR-536 PSVR motion controller tracking problem with multiple controllers -Previous code called GetRelativeTransform from the render thread, but the game thread could update it at any time. This caches that transform so that it can be safely used in the render thread. #jira UEVR-536 #review-3384107 @Ryan.Vance Change 3292460 on 2017/02/08 by Jeff.Fisher PS4 sceVrTrackerGetResult() error warning logging improved, and explanatory comment added. Change 3308771 on 2017/02/17 by Keli.Hlodversson Rename GoogleVR console commands #jira UEVR-412 Change 3309156 on 2017/02/17 by Keli.Hlodversson Track changes in r.ScreenPercentage on GoogleVR and set RenderTargetSize accordingly. Change 3311999 on 2017/02/20 by Keli.Hlodversson Create a default implementation for RecordAnalytics. Also create an initial stub for FHeadMountedDisplayBase for future default implementations of common HMD functionality. Make implementing IHeadMountedDisplay::GetDeviceName mandatory instead of defaulting to "Unknown" #jira UE-21878 #jira UEVR-213 Change 3313467 on 2017/02/20 by Ryan.Vance #jira UE-41604 3278583 pCustomPresent->AllocateRenderTargetTexture may return false, if we blindly return true we can end up with an invalid render target since the fall back sceneviewport will be skipped. 3278536 Adding ovrError_NoHmd to our sanity check in OnStartGameFrame. Change 3314002 on 2017/02/21 by Keli.Hlodversson Fix compilation on PS4 and Linux Change 3326722 on 2017/03/01 by Jeff.Fisher Merging //UE4/Dev-Main to Dev-VR (//UE4/Dev-VR) Integrating 4.15 from main. Change 3327567 on 2017/03/01 by Jeff.Fisher UEVR-588 Oculus crash on "stereo on" when the proximity sensor is not triggered. Duplicating from Release-4.15 cl 3327481, 3327542 -Don't ovr_SubmitFrame when the layers need to be recreated. They stay dirty until rendering is unpaused. #jira UEVR-588 #review-3384107 Change 3328098 on 2017/03/01 by Jeff.Fisher 4.15 merge fixes -Fixed deprecated enum name function usage. -Fixed world scale usage in GoogleVRController. -Fixed compile break in PS4Tracker. Change 3328271 on 2017/03/01 by Jeff.Fisher 2.15 merge -restroging GoogleVRController::GetWorldToMetersScale... cause it is used everywhere. Change 3328307 on 2017/03/01 by Jeff.Fisher 4.15 merge -More googlevr worldscale fixes. Change 3328312 on 2017/03/01 by Jeff.Fisher 4.15 merge -removing 2 unused includes Change 3330610 on 2017/03/02 by Jeff.Fisher 4.15 merge -fixing linux build Change 3333952 on 2017/03/06 by Keli.Hlodversson Implement common stereo layer management base class and use it in SteamVR and PS4. Fixes an outstanding bug in SteamVR where texures are updated every frame regardles of whether the continous update flag is set or not. #jira UEVR-628 #jira UE-42555 Change 3334961 on 2017/03/07 by Keli.Hlodversson Add missing include to fix non-unity builds Change 3336200 on 2017/03/07 by Keli.Hlodversson Fix compilation issues. (https://ec-01.epicgames.net/commander/link/jobDetails/jobs/7568252?jobName=UE4+Dev-VR+-+CL+3334961+-+Nightly+Build&s=Jobs) * Pre VS2015 compilers don't like mixing wide and unmarked strings in concatenation. Unfortunately LOCTEXT hides the call to the TEXT macro, completely hinding the prefix (which only gets added to the first fragment.) * Switch apparently doesn't know how to format a size_t for analytics either. Also: Typo in backwards compatibility command name alias Change 3337347 on 2017/03/08 by Jeff.Fisher UE-42631 Stereo off while prox sensor uncovered causes low framerate -Setting maxfps appropriately on 'stereo on/off'. #review-3384107 #jira UE-42631 Change 3338385 on 2017/03/08 by Ryan.Vance r.DisableDistortion was only being used for the mobile renderer Change 3342301 on 2017/03/10 by patrickr.donovan Test updates to TM-VRSmoke. Increased lightmap resolution on QA_MeshTypes meshes to improve readbility and reliablility of tests involving said asset. Rebuilt lighting. Change 3348133 on 2017/03/15 by Ryan.Vance Moving mono cvars to scene rendering to avoid cross module references. There's not a good reason to have them in the hmd module anyway. Change 3348836 on 2017/03/15 by Ryan.Vance Direct multi-view support for gear vr Monoscopic far field with multi-view (blit and direct) support for gear vr Support for translucent objects on both sides of the mono clip plane (due to a sorting issue, objects that straddle the plane composite incorrectly) Fixed missing discards/clears in the multi-view blit Change 3348843 on 2017/03/15 by Ryan.Vance Fixing color/depth target size mismatch when screen percentage scaling results in a size that isn't divisible by 16. Change 3349276 on 2017/03/16 by Keli.Hlodversson Fixing compile errors in GoogleVR after merge from main. Change 3350932 on 2017/03/16 by Ryan.Vance Re-enabling the gearvr plugin on windows. Change 3351977 on 2017/03/17 by Jeff.Fisher Fixing masked member variable. Change 3352314 on 2017/03/17 by Ryan.Vance We need to ensure that we don't select different lod levels for each eye. Change 3352993 on 2017/03/17 by Nick.Whiting Integrating CL 3345824 from Android-DevVR to Dev-VR. Support for device depth pass in SceneCaptureComponent2D Change 3355185 on 2017/03/20 by Nick.Whiting Added ability to disable the autoloading splash screen, which would prevent the hide splash screen node from ever working Change 3355676 on 2017/03/20 by Nick.Whiting PR #3384: [GNUX] SteamVR, OpenGL patch. (Contributed by yaakuro), with some minor modifications Change 3357286 on 2017/03/21 by Jeff.Fisher Fixing GenerateProjectFiles, looks like the .config. was removed from these references in main some time ago. Change 3357435 on 2017/03/21 by Jeff.Fisher Fixing editor build break, looks like a merge mistake. Change 3359960 on 2017/03/23 by Keli.Hlodversson Prevent potential crash when drawing tracking sensor location. Also only fetch HMD location once instead of once per tracking sensor. Change 3361230 on 2017/03/23 by Jeff.Fisher Fixing linux build opengl include problem... maybe. Change 3361638 on 2017/03/23 by Jeff.Fisher Another guess at fixing linux build. Change 3364224 on 2017/03/24 by Keli.Hlodversson Initial implementation of UEVR-576 - Base emulated layer implementation #jira UEVR-668 - Base emulated layer implementation: Initial framework for overrideable default implementation #jira UEVR-669 - Base emulated layer implementation: Face Locked Layers Support #jira UEVR-670 - Base emulated layer implementation: Tracker Locked Layers Support #jira UEVR-671 - Base emulated layer implementation: World Locked Layers Support #jira UEVR-672 - Base emulated layer implementation: Add support for optionally rendering face locked layers into a separate layer Change 3364242 on 2017/03/24 by Keli.Hlodversson SteamVR layers do not support negatve Layer priorities Change 3364263 on 2017/03/24 by Jeff.Fisher Merging //UE4/Dev-Main to Dev-VR (//UE4/Dev-VR) Monoscopicfarfieldrendering was just 'accept source', Ryan is going to look at fixing it up. Change 3364472 on 2017/03/24 by Jeff.Fisher Merge fix Change 3364475 on 2017/03/24 by Jeff.Fisher Fixing gearvr include. Change 3364486 on 2017/03/24 by Jeff.Fisher merge fix Change 3364532 on 2017/03/24 by Ryan.Vance pso update for mono rendering and stereo layers. Change 3364599 on 2017/03/24 by Ryan.Vance Oculus changes for SI1.12 Change 3365159 on 2017/03/26 by Jeff.Fisher include fix Change 3365182 on 2017/03/26 by Jeff.Fisher include fix Change 3366087 on 2017/03/27 by Ryan.Vance Remaining files from Oculus changes for SI1.12 merge request. Fixing a bug in OnlineSubsystem. Temporarily changing the eye padding change to be a shader clear to work around a clear color binding issue. Change 3366492 on 2017/03/27 by Ryan.Vance #jira UE-43294 Moved the clear before we setup state for drawing the mirror window content. It was stomping over state after the pso changes. Going to leave the shader clear in the rift prerender for clearing the eye padding for now. Change 3366929 on 2017/03/27 by Ryan.Vance Fixing compile error Change 3368549 on 2017/03/28 by Jeff.Fisher Merging Change: 3357998 from //UE4/Partner-Google-VR/Engine/... to Dev-VR Upgrade Google VR Plugin to v1.3: *Upgraded GVR NDK to 1.30.0 *Changed some BlueprintFunction to use BlueprintPure *Add the missing bDaydream flag in UEDeployAndroid.cs #review-3384107 Change 3368975 on 2017/03/28 by Ryan.Vance CIS clean up #jira UE-43428, UE-43429, UE-43426, UE-43427 Change 3369028 on 2017/03/28 by Ryan.Vance This is not exacly 'correct', but it's at least what the code was trying to do. Change 3370203 on 2017/03/29 by Ryan.Vance Adding gear vr controller component support. Change 3370918 on 2017/03/29 by Ryan.Vance Merging 3370569 using Partner-Google-VR_to_DevVR Change 3371030 on 2017/03/29 by Ryan.Vance Fixing linux build errors #jira UE-43426 Change 3371036 on 2017/03/29 by Ryan.Vance Oculus 4.16 integration. Not terribly happy with the use of std::string. They promised to clean this up for the next release. Change 3373495 on 2017/03/30 by Jeff.Fisher Merging from Dev-Main, in preparation for 4.16 Change 3373578 on 2017/03/30 by Jeff.Fisher build break, one comma short Change 3373870 on 2017/03/31 by Jeff.Fisher Include order fix. Change 3374001 on 2017/03/31 by Keli.Hlodversson Use DefaultStereoLayers as base for Morpheus implementation. #jira UEVR-709 #jira UE-42919 #rb: Jeff.Fisher Change 3374004 on 2017/03/31 by Keli.Hlodversson Fix rendering for the default Stereo Layers implementation on mobile. Depth test was set to "Never" instead of "Always" Destination texture on GLES is flipped on the Y axis, the coordinates are reversed in the shade when compiled on the relevant platforms. Change 3375125 on 2017/03/31 by Jeff.Fisher UE-43506 Ensure using VRPreview with GoogleVR -Removed the ensure, there is code in there to handle that case, and it works. #jira UE-43506 Change 3375294 on 2017/03/31 by nick.bullard Resaving Plugin content to resovle "saved with empty engine version" #jira UE-43537 Change 3375480 on 2017/03/31 by Jeff.Fisher UEVR-9 PSVR: Social Screen Support -Experimental social screen support for 4.16. -This does the basics of driving output through the Aux port in the proper format for display on the mirror monitor. -Only supports 30fps on the mirror monitor. 60fps will require the implementation of sony system dialogs to deal with incompatable system features (video streaming, remote play). -There is a project setting in Morpheus, under experiemental bEnableSocialScreenSeparateMode. This must be set to true to use this feature. When it is false we avoid allocating the back buffers. -MorpheusFunctionLibrary blueprints now have a node "SetSocialScreenMode" which can switch between SystemMirror (hardware supported mirroring), SeparateTest (alternates black and white), SeparateTexture (displays a texture, eg a render target, specified via blueprint), and SeparateMirror(puts the hmd render buffer on screen - which is both eyes, like a debug mode). -Also finally updated the bEnabled flag in project settings to tell people it's only for PC. #jira UEVR-9 #review-3384107 Change 3375540 on 2017/03/31 by Ryan.Vance #jira UE-43504 Fixing android build break when using a 64 bit isa. Change 3375655 on 2017/03/31 by Jeff.Fisher Fixing missing RGBAToYUV shader problem -This at least unblocks our process. Will revisit before zbr. Change 3375820 on 2017/04/01 by Jeff.Fisher Fixing linux build warning about HAS_MORPHEUS Change 3376050 on 2017/04/02 by Jeff.Fisher UE-43515 Step 'UE4Editor Static Analysis Win64' - Module.OnlineSubsystemOculus.cpp Warnings -Temporary fix for static analysis annotation warnings in OnlineSubsytemOculus. Longer term plan is to eliminate the use of the headers that trigger the warnings. -Just wrap all standard headers in static analysis disables. #jira UE-43515 Change 3376609 on 2017/04/03 by Jeff.Fisher Fixing rgbatoyuvshader include. Change 3377001 on 2017/04/03 by Jeff.Fisher UE-43547 Launch On PS4 fails during Run command - Missing global shader FRGBAToYUV420CS - shader c++ must be compiled so that it can be cooked for ps4. #jira UE-43547 Change 3379858 on 2017/04/04 by Jeff.Fisher Merging //UE4/Dev-Main to Dev-VR (//UE4/Dev-VR) pulling main this should get us ps4 sdk 4.508 Change 3379938 on 2017/04/04 by Ryan.Vance #jira UE-43548 If stereo layers are not being used, don't setup overlay targets as we will never clear/initialize them. The clear happens as part of the default layers PostRenderView_RenderThread call which wont be called if layers aren't being used in the scene. Change 3381519 on 2017/04/05 by Jeff.Fisher UEVR-733 PS4 sdk 4.500 hmd connection api changes break hmd connect. -Handling failure of sceHmdGetDeviceInformation if the hmd is powered off. It now returns an error code about an invalid handle in that case, rather than reporting unready. We just treat the error code like an unready status. #jira UEVR-733 #review-3384107 Change 3382019 on 2017/04/05 by Ryan.Vance Linux: add Vulkan support from dev editor: 3381593 Change 3382021 on 2017/04/05 by Ryan.Vance SteamVR on Linux using Vulkan OpenVR rev to 1_0_6 PR #3412: [GNUX] Initial support for SteamVR using Vulkan on GNUX platform. (Contributed by yaakuro) Change 3382076 on 2017/04/05 by Ryan.Vance Fixing linux steamvr lib path. It changed to something less silly in 1.0.6 Removing the steamvr plugin from the white list for linux. It's looking for a runtime that no one will have installed. Change 3383237 on 2017/04/06 by Ryan.Vance #jira UE-43732 Fixing Android compile issues. We can't wrap portions of a macro with a definie. This should probably be some sort of recursive macro thing since there's so much overlap. Good enough for now. Change 3383353 on 2017/04/06 by Ryan.Vance Fixing include cycles. Change 3383509 on 2017/04/06 by Jeff.Fisher Merging //UE4/Dev-Main to Dev-VR (//UE4/Dev-VR) merging the stuff from dev-mobile [CL 3384106 by Ryan Vance in Main branch]
2017-04-06 22:03:51 -04:00
HmdTransform = FTransform(HmdOrientation, HmdPosition);
}