diff --git a/libraries/gpu-gl-common/src/gpu/gl/GLBackendTransform.cpp b/libraries/gpu-gl-common/src/gpu/gl/GLBackendTransform.cpp index 130932238d..698a70af5a 100644 --- a/libraries/gpu-gl-common/src/gpu/gl/GLBackendTransform.cpp +++ b/libraries/gpu-gl-common/src/gpu/gl/GLBackendTransform.cpp @@ -47,6 +47,9 @@ void GLBackend::do_setViewportTransform(const Batch& batch, size_t paramOffset) // Mono leftRight[0] = vp; + // adding this here as im doing Layered, force the first viewport here to be half of it + leftRight[0].x = 0; + leftRight[0].z = sideWidth; // Left side leftRight[1] = vp; diff --git a/libraries/gpu/src/gpu/Transform.slh b/libraries/gpu/src/gpu/Transform.slh index 9298ddcba4..484ad7ebd2 100644 --- a/libraries/gpu/src/gpu/Transform.slh +++ b/libraries/gpu/src/gpu/Transform.slh @@ -169,8 +169,10 @@ TransformObject getTransformObject() { uint eyeIndex = uint(_stereoSide); #if !defined(GPU_GLES) || (defined(HAVE_EXT_clip_cull_distance) && !defined(VULKAN)) #ifdef GPU_GL450 - gl_ViewportIndex = _stereoSide + 1; + /* gl_ViewportIndex = _stereoSide + 1; // gl_ViewportIndex = 2 - _stereoSide; + */// THIs is the layered version + gl_Layer = _stereoSide; #else gl_ClipDistance[0] = dot(<$clipPos$>, eyeClipEdge[eyeIndex]); #endif