Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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.
Jump to
Jump to file
Failed to load files.
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