Skip to content
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.

Fix halo artifact on Oculus #3119

Merged
merged 1 commit into from
Apr 7, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions app/src/oculusvr/cpp/DeviceDelegateOculusVR.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -146,11 +146,6 @@ struct DeviceDelegateOculusVR::State {
return;
}
initialized = true;
std::string version = vrapi_GetVersionString();
if (version.find("1.1.32.0") != std::string::npos) {
VRB_ERROR("Force layer clip due to driver bug. VRAPI Runtime Version: %s",vrapi_GetVersionString());
OculusLayer::sForceClip = true;
}

layersEnabled = VRBrowser::AreLayersEnabled();
SetRenderSize(device::RenderMode::StandAlone);
Expand Down Expand Up @@ -1018,7 +1013,7 @@ DeviceDelegateOculusVR::EndFrame(const FrameEndMode aEndMode) {

ovrLayerProjection2 projection = vrapi_DefaultLayerProjection2();
projection.HeadPose = tracking.HeadPose;
projection.Header.SrcBlend = VRAPI_FRAME_LAYER_BLEND_ONE;
projection.Header.SrcBlend = VRAPI_FRAME_LAYER_BLEND_SRC_ALPHA;
projection.Header.DstBlend = VRAPI_FRAME_LAYER_BLEND_ONE_MINUS_SRC_ALPHA;
for (int i = 0; i < VRAPI_FRAME_LAYER_EYE_MAX; ++i) {
const auto &eyeSwapChain = m.eyeSwapChains[i];
Expand Down
2 changes: 1 addition & 1 deletion app/src/oculusvr/cpp/OculusVRLayers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ void
OculusLayerCylinder::Update(const ovrTracking2& aTracking, ovrTextureSwapChain* aClearSwapChain) {
OculusLayerSurface<VRLayerCylinderPtr, ovrLayerCylinder2>::Update(aTracking, aClearSwapChain);
ovrLayer.HeadPose = aTracking.HeadPose;
ovrLayer.Header.SrcBlend = VRAPI_FRAME_LAYER_BLEND_ONE;
ovrLayer.Header.SrcBlend = VRAPI_FRAME_LAYER_BLEND_SRC_ALPHA;
ovrLayer.Header.DstBlend = VRAPI_FRAME_LAYER_BLEND_ONE_MINUS_SRC_ALPHA;

for ( int i = 0; i < VRAPI_FRAME_LAYER_EYE_MAX; i++ ) {
Expand Down
2 changes: 1 addition & 1 deletion app/src/oculusvr/cpp/OculusVRLayers.h
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ class OculusLayerSurface : public OculusLayerBase<T, U> {
void Init(JNIEnv *aEnv, vrb::RenderContextPtr &aContext) override {
this->jniEnv = aEnv;
this->contextWeak = aContext;
this->ovrLayer.Header.SrcBlend = VRAPI_FRAME_LAYER_BLEND_ONE;
this->ovrLayer.Header.SrcBlend = VRAPI_FRAME_LAYER_BLEND_SRC_ALPHA;
this->ovrLayer.Header.DstBlend = VRAPI_FRAME_LAYER_BLEND_ONE_MINUS_SRC_ALPHA;
if (this->swapChain) {
return;
Expand Down