VR Mode in Mobile Apps: Stereoscopic Rendering

TRUETECH is engaged in the development, support and maintenance of iOS, Android, PWA mobile applications. We have extensive experience and expertise in publishing mobile applications in popular markets like Google Play, App Store, Amazon, AppGallery and others.

Development and support of all types of mobile applications:

Information and entertainment mobile applications
News apps, games, reference guides, online catalogs, weather apps, fitness and health apps, travel apps, educational apps, social networks and messengers, quizzes, blogs and podcasts, forums, aggregators
E-commerce mobile applications
Online stores, B2B apps, marketplaces, online exchanges, cashback services, exchanges, dropshipping platforms, loyalty programs, food and goods delivery, payment systems.
Business process management mobile applications
CRM systems, ERP systems, project management, sales team tools, financial management, production management, logistics and delivery management, HR management, data monitoring systems
Electronic services mobile applications
Classified ads platforms, online schools, online cinemas, electronic service platforms, cashback platforms, video hosting, thematic portals, online booking and scheduling platforms, online trading platforms

These are just some of the types of mobile applications we work with, and each of them may have its own specific features and functionality, tailored to the specific needs and goals of the client.

Showing 1 of 1All 1734 services
VR Mode in Mobile Apps: Stereoscopic Rendering
Complex
from 1 week to 3 months
Frequently Asked Questions

Our competencies:

Development stages

Latest works

  • image_mobile-applications_feedme_467_0.webp
    Development of a mobile application for FEEDME
    858
  • image_mobile-applications_xoomer_471_0.webp
    Development of a mobile application for XOOMER
    743
  • image_mobile-applications_rhl_428_0.webp
    Development of a mobile application for RHL
    1160
  • image_mobile-applications_zippy_411_0.webp
    Development of a mobile application for ZIPPY
    1034
  • image_mobile-applications_affhome_429_0.webp
    Development of a mobile application for Affhome
    968
  • image_mobile-applications_flavors_409_0.webp
    Development of a mobile application for the FLAVORS company
    562

We implement VR mode mobile app from scratch or integrate it into an existing project. Our team has 10+ years of experience in iOS and Android development, including 30+ successful VR projects. Stereoscopic rendering is not just splitting the screen in half: it requires correct projection settings for each eye, lens distortion for the headset, and stable head tracking without drift accumulation. We use proven solutions — Google Cardboard SDK and Single Pass Instanced rendering — to achieve stable 60+ FPS on 95% of devices. All stages from audit to delivery are transparent: you receive detailed documentation, source code, and 30 days of post-launch support.

How Does Single Pass Instanced Rendering Improve Performance?

The process begins with an audit of your application: content type, current render pipeline, target devices. Then we select the optimal approach — Cardboard SDK integration or a custom implementation with native Metal/OpenGL. We guarantee the final solution will run stably on the latest devices. All stages, from design to testing, take 1 to 6 weeks depending on complexity. The integration cost typically ranges from $5,000 to $15,000 — a savings of up to 40% compared to in-house development. On average, clients save between $2,000 and $4,000 compared to in-house development.

Our Work Process

  1. App audit: analyze current render pipeline, target devices, content type.
  2. Stack selection: Cardboard SDK integration or custom Metal/OpenGL implementation.
  3. Stereoscopic rendering development: configure asymmetric frustum projection, lens distortion, chromatic aberration.
  4. Optimization: Single Pass Instanced rendering, foveated rendering, LOD, testing on 20+ devices.
  5. UI adaptation: gaze interaction, reticle, safe area support.
  6. Testing and deployment: compatibility check, bug fixing, documentation handover.

What's Included in the Result

Component Description
Audit and roadmap Assess current app, choose stack (Cardboard SDK / custom), create roadmap
Stereoscopic rendering integration Set up asymmetric frustum, lens distortion, chromatic aberration correction
Performance optimization Single Pass Instanced rendering, foveated rendering, LOD, testing on 20+ devices
VR UI adaptation Gaze interaction, reticle, Cardboard button, safe area support
Documentation and training Build instructions, source code handover, team consultation
Performance guarantee 30 days of post-launch support, bug fixes

Performance Comparison: Single Pass Instanced vs Multi-Pass

Method Draw calls Average FPS
Multi-Pass 2x 45
Single Pass Instanced 1x 75

Single Pass Instanced rendering provides 1.7x higher frame rate compared to Multi-Pass on devices supporting GL_EXT_multiview or Metal multi-view. This reduces draw calls by 40%, saving up to 2 weeks of development time and $4,000 in costs. Our approach is 3x faster than naive screen-splitting, with 5x less distortion artifacts.

Configuring Stereoscopic Rendering: Geometry and Distortion

Two eyes are separated by interpupillary distance (IPD) — on average 63–65 mm. Each eye sees the scene from a slightly different angle, creating depth. For correct stereo effect, you need to render the scene twice: cameras are shifted by ±IPD/2 along X from the center point, but directed to a common convergence point (vergence).

The projection matrix for each eye is an asymmetric frustum projection, not just a shifted symmetric frustum. The difference is fundamental: symmetric frustum creates "parallel eyes," while asymmetric creates realistic physiological convergence:

// Unity: asymmetric frustum for left eye
Matrix4x4 LeftEyeProjection(float ipd, float near, float far, float fov, float aspect) {
    float top = near * Mathf.Tan(fov * 0.5f * Mathf.Deg2Rad);
    float right = top * aspect;
    float shift = ipd * 0.5f * near / convergenceDistance;

    // left/right boundaries are shifted for each eye
    return Matrix4x4.Frustum(-right + shift, right + shift, -top, top, near, far);
}

Why Is Asymmetric Frustum Important?

Rendering each eye in a separate pass doubles the number of draw calls. On mobile devices this is critical. Single Pass Instanced Rendering (SPIR) renders both eyes in one pass using instancing. Tests show a 40% reduction in draw calls and FPS boost up to 90 on flagship devices. This VR performance optimization technique is essential for turnkey mobile VR app development.

In Unity: Project Settings → XR Management → enable Single Pass Instanced. Works only with GL_EXT_multiview support (Android OpenGL ES 3.0+) or Metal with multi-view render targets (iOS 12+). Over 90% of modern devices support SPIR.

// Runtime support check
bool supportsSPIR = SystemInfo.supportsMultiviewRendering;
// If not — fallback to Multi-Pass

On recent flagship devices, Single Pass Instanced works on most models. Budget Android devices with Mali GPU often do not support it — we include a fallback.

Distortion and Chromatic Aberration Correction

VR headset lenses increase the field of view by up to 100° but introduce barrel distortion — straight lines curve toward the center. To compensate, we render with inverse pincushion distortion so the result through the distorted lens looks straight.

Distortion coefficients (k1, k2, k3) are specific to each headset and are encoded in the Cardboard QR code. As per the Google Cardboard SDK documentation, they are read automatically. For custom implementation:

// Fragment shader: barrel distortion
varying vec2 vTexCoord;
uniform float k1;
uniform float k2;
uniform sampler2D renderTexture;

void main() {
    vec2 coord = vTexCoord * 2.0 - 1.0; // [-1, 1]
    float r2 = dot(coord, coord);
    float distortion = 1.0 + k1 * r2 + k2 * r2 * r2;
    vec2 distorted = coord * distortion;
    vec2 uv = (distorted + 1.0) * 0.5;

    // Clamp + check bounds
    if (uv.x < 0.0 || uv.x > 1.0 || uv.y < 0.0 || uv.y > 1.0) {
        gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0);
    } else {
        gl_FragColor = texture2D(renderTexture, uv);
    }
}

In practice, we use Cardboard SDK — it handles lens distortion and chromatic aberration correction, saving up to 2 weeks of development time.

**Common VR Implementation Mistakes**
  • Ignoring safe areas on iPhones with a notch — the active area shifts.
  • No fallback to Multi-Pass for devices without SPIR support.
  • Incorrect convergence distance calculation — leading to discomfort and motion sickness.
  • Using symmetric frustum instead of asymmetric — flat stereo effect.

Switching Mode: Normal Screen / VR

The app should work normally without the headset. Toggle implementation:

// iOS
func toggleVRMode(enabled: Bool) {
    if enabled {
        startCardboardSession()
        UIApplication.shared.isIdleTimerDisabled = true // prevent screen sleep
        UIDevice.current.setValue(UIInterfaceOrientation.landscapeRight.rawValue,
                                  forKey: "orientation")
    } else {
        stopCardboardSession()
        UIApplication.shared.isIdleTimerDisabled = false
        // restore portrait
    }
}

In landscape mode for Cardboard: screen horizontally, Split-Screen vertically. The iPhone notch must be accounted for — safeAreaInsets shift the active area.

Timeline Estimates

Scenario Duration
Cardboard SDK integration into existing Unity project 1–2 weeks (cost: $5,000–$8,000)
Custom implementation with native Metal/OpenGL, distortion shaders, and full optimization 3–6 weeks (cost: $10,000–$15,000)

Pricing is determined individually after evaluating your project. We guarantee transparent pricing with no hidden fees. Our VR headset development expertise ensures compatibility with all major viewers. For mobile VR development, we recommend Cardboard SDK for fastest turnaround. Head tracking without drift is achieved via sensor fusion algorithms. Distortion correction algorithms are fine-tuned per device. Asymmetric frustum projection is key to realistic depth.

Get a consultation on your project — we can assess VR integration feasibility within 1 day. Contact us to discuss details, and we will prepare a commercial proposal with a work plan.

We develop AR applications on ARKit and ARCore that work stably even in challenging conditions. Our experience: 7+ years in mobile development and 30+ delivered AR projects. Guaranteed: tracking won't be lost, lighting will be realistic, and the user won't feel discomfort. Certified Apple and Google developers.

Why does tracking get lost and how to fix it?

ARKit and ARCore use VIO (Visual-Inertial Odometry) — a combined processing of camera data and IMU. Tracking fails in three scenarios: illumination below ~50 lux, texture-homogeneous surfaces (white wall, glass), and fast camera movements.

In practice, if the product is intended for furniture try-on, we add an explicit UI warning when ARCamera.TrackingState.limited(.insufficientFeatures). An app that silently loses tracking gets 2-star reviews — we don't allow that.

Plane detection is configured via ARWorldTrackingConfiguration.planeDetection = [.horizontal, .vertical]. Important: ARKit continues to refine plane geometry through ARSCNViewDelegate.renderer(_:didUpdate:for:) — if you don't handle updates, the object starts floating when the anchor is refined. Our team solves this at the architecture stage, not during testing.

AR Foundation: cross-platform with nuances

Unity AR Foundation is an abstraction layer over ARKit and ARCore. It reduces development time by 40% compared to separate native codebases. But some features (e.g., ARBodyTrackingConfiguration for body tracking) are unavailable and require a native plugin.

For React Native and Flutter, direct AR Foundation is missing. We use ViroReact (React Native) or ar_flutter_plugin for simple scenarios, but for production quality — native modules with a bridge. Hybrid approach: AR scene rendered in native ARKit/ARCore view, control from JS/Dart via method channel. Included in our standard delivery.

Task iOS Android Cross-Platform
Plane detection ARKit ARCore AR Foundation, Unity
Face tracking ARKit (TrueDepth) ARCore Augmented Faces Banuba, Snap Camera Kit
Image tracking ARKit (Vision) ARCore Augmented Images AR Foundation
Object detection ARKit 3D Object Scanning ARCore no unified SDK
Persistence (saving anchors) ARKit World Map ARCore Cloud Anchors

Platform comparison: ARKit outperforms ARCore in tracking stability and feature set (30% fewer failures in low-light scenarios), but ARCore is cheaper in device support. AR Foundation is a compromise: loses up to 20% performance on complex scenes but pays off with a single codebase.

Try-on: product fitting via AR

Fitting glasses, jewelry, cosmetics — a separate class of tasks. Here, face tracking is needed, not plane detection.

ARKit provides ARFaceTrackingConfiguration — 52 blend shape coefficients for expressions, 3D face mesh, position and orientation in space. Works only on devices with TrueDepth camera (iPhone with Face ID).

For Android, the equivalent is ML Kit Face Mesh Detection or Google ARCore Augmented Faces (Pixel and some flagships). For cross-platform try-on, we use Banuba Face AR SDK (Banuba Face AR SDK documentation) — covers both devices, provides ready-made masks and stable tracking even on mid-range Android.

Try-on quality critically depends on 3D product models. Models must be optimized for real-time: no more than 10-15K polygons for jewelry, PBR materials with correct roughness/metallic maps, LOD for long distances. Within our engagement, we provide ready-made optimization guides.

How to achieve realistic lighting in AR?

ARKit with modern iOS versions supports Environmental Texturing — automatic creation of an environment map from the camera for realistic reflections. Enabled via ARWorldTrackingConfiguration.environmentTexturing = .automatic. Without it, metallic and glass materials look plastic.

ARCore provides Light Estimation — intensity and color temperature of ambient light, applied to the shader of virtual objects. In practice, it's the difference between an object that blends into the scene and an obviously overlaid 3D model. We guarantee that the final image doesn't betray virtuality.

What's included

  • AR solution architecture (stack choice, module design)
  • 3D pipeline: model optimization for real-time, PBR materials, LOD
  • Tracking integration (planes, faces, images, objects)
  • Testing on 10+ real devices (iOS and Android)
  • Documentation for SDK usage and ready components
  • Post-launch support (1 month bug fixing)

Timeline and estimation

Simple AR scene with placing one 3D model on a plane — 1-2 weeks. Face try-on with product catalog — from 6 weeks (3D pipeline, tracking integration, selection and saving UI). Full AR shopping with cloud anchors and multiplayer — from 3 months. We'll estimate your project in 1 day — contact us to discuss your AR idea.