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

Commit

Permalink
Improve layer blending. Fix beam black halo. (#814)
Browse files Browse the repository at this point in the history
  • Loading branch information
MortimerGoro authored Nov 22, 2018
1 parent af3edb9 commit a38266e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/src/oculusvr/cpp/DeviceDelegateOculusVR.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ class OculusLayerQuad: public OculusLayer<VRLayerQuadPtr, ovrLayerProjection2> {
}

ovrLayer = vrapi_DefaultLayerProjection2();
ovrLayer.Header.SrcBlend = VRAPI_FRAME_LAYER_BLEND_SRC_ALPHA;
ovrLayer.Header.SrcBlend = VRAPI_FRAME_LAYER_BLEND_ONE;
ovrLayer.Header.DstBlend = VRAPI_FRAME_LAYER_BLEND_ONE_MINUS_SRC_ALPHA;

if (layer->GetSurfaceType() == VRLayerQuad::SurfaceType::AndroidSurface) {
Expand Down Expand Up @@ -913,7 +913,7 @@ DeviceDelegateOculusVR::EndFrame(const bool aDiscard) {
// Add main eye buffer layer
ovrLayerProjection2 projection = vrapi_DefaultLayerProjection2();
projection.HeadPose = m.predictedTracking.HeadPose;
projection.Header.SrcBlend = VRAPI_FRAME_LAYER_BLEND_SRC_ALPHA;
projection.Header.SrcBlend = VRAPI_FRAME_LAYER_BLEND_ONE;
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

0 comments on commit a38266e

Please sign in to comment.