Showing results for 
Search instead for 
Did you mean: 

Presence Platform (Feedback/Issues)

Retired Support

Do you have any feedback and/or issues in regards to the Presence Platform? Use this place to discuss, as we'll have members of the engineering team reviewing this thread!


Read the blog on Presence Platform here:


Level 7

Is the v35 SDK available anywhere yet? Even a preview?

Level 6

Currently with v40 of the Unity Integration, there's an issue with the Reticles only being displayed in one eye in all of the "DistanceGrab" examples. This happens using Multiview and Vulkan as the Graphics API.


It's trivial to add support for multiview to the "PolylineUnlit" shader:


Copyright : Copyright (c) Facebook Technologies, LLC and its affiliates. All rights reserved.

Your use of this SDK or tool is subject to the Oculus SDK License Agreement, available at

Unless required by applicable law or agreed to in writing, the Utilities SDK distributed
under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
ANY KIND, either express or implied. See the License for the specific language governing
permissions and limitations under the License.

Shader "Custom/PolylineUnlit" {

    Properties { }


        Tags { "Queue"="Geometry" }

            #pragma vertex vert
            #pragma fragment frag
            #pragma multi_compile_fwdbase nolightmap nodirlightmap nodynlightmap novertexlight
            #pragma target 5.0
            #include "UnityCG.cginc"
            #include "./CubePointToSegment.cginc"
            #include "../ThirdParty/Shaders/CapsuleRayIntersect.cginc"

            #if SHADER_TARGET >= 45
            StructuredBuffer<float4> _PositionBuffer;
            StructuredBuffer<float4> _ColorBuffer;

            struct v2f {
                float4 pos : SV_POSITION;
                sample float3 worldPos : TEXCOORD0;
                float4 p0 : TEXCOORD1;
                float4 p1 : TEXCOORD2;
                float4 col0 : TEXCOORD3;
                float4 col1 : TEXCOORD4;

            float _Scale;
            float4x4 _LocalToWorld;

            v2f vert(appdata_full v, uint instanceID : SV_InstanceID)
                #if SHADER_TARGET >= 45
                    float4 p0 = _PositionBuffer[instanceID * 2];
                    float4 p1 = _PositionBuffer[instanceID * 2 + 1];
                    float4 col0 = _ColorBuffer[instanceID * 2];
                    float4 col1 = _ColorBuffer[instanceID * 2 + 1];
                    float4 p0 = 0;
                    float4 p1 = 0;
                    float4 col0 = 0;
                    float4 col1 = 0;

                v2f o;

                UNITY_INITIALIZE_OUTPUT(v2f, o);

                float3 localPos = orientCubePointToSegmentWithWidth(,,, p0.w, p0.w);
                float3 worldPos = mul(_LocalToWorld, float4(localPos, 1.0)).xyz;

                // Apply MVP matrix to model
                o.pos = mul(UNITY_MATRIX_VP, float4(worldPos, 1.0));
                o.worldPos = worldPos;
                o.p0 = float4(mul(_LocalToWorld, float4(, 1.0)).xyz, p0.w);
                o.p1 = float4(mul(_LocalToWorld, float4(, 1.0)).xyz, p1.w);
                o.col0 = col0;
                o.col1 = col1;

                return o;

            fixed4 frag (v2f i, out float out_depth : SV_Depth) : SV_Target
                float3 rayDir = normalize(i.worldPos -;
                float dist = capIntersect(, rayDir, i.p0, i.p1,
                                        i.p0.w/2.0f * _Scale); // hardcoded sphere at 0,0,0 radius .5

                // calculate world space hit position
                float3 hitPos = + rayDir * dist;

                // set output depth
                float4 clipPos = UnityWorldToClipPos(hitPos);

                out_depth =  clipPos.z / clipPos.w;

                #if !defined(UNITY_REVERSED_Z)
                out_depth = out_depth * 0.5 + 0.5;

                float3 vec = -;
                float dotvecvec = dot(vec, vec);
                float t = 0.0f;
                if(abs(dotvecvec) > 0.0f)
                    float3 toHit = hitPos -;
                    t = dot(toHit, vec)/dotvecvec;
                return float4(lerp(i.col0, i.col1, t).rgb, 1.0f);


However, the shader is written in a way where the dashed lines won't match up between the two eyes, leading to a stereo disparity issue. Any ideas on how to fix that?