---
id: wiki-2026-0508-가상현실-vr
title: 가상현실(VR)
category: 10_Wiki/Topics
status: verified
canonical_id: self
aliases: [VR, Virtual Reality, 가상현실]
duplicate_of: none
source_trust_level: A
confidence_score: 0.9
verification_status: applied
tags: [vr, xr, immersive, hardware, graphics]
raw_sources: []
last_reinforced: 2026-05-10
github_commit: pending
tech_stack:
  language: C++
  framework: OpenXR / Unity XR / Unreal XR
---

# 가상현실(VR)

## 매 한 줄
> **"매 VR 의 head-mounted display + 6DoF tracking 의 immersive 3D world."**. 매 1968 Sutherland 의 Sword of Damocles 의 origin, 매 2026 의 Apple Vision Pro 2 / Quest 4 / Valve Deckard 의 mainstream 진입, 매 spatial computing 의 paradigm shift.

## 매 핵심

### 매 hardware stack
- HMD: dual-display (매 eye 마다 4K micro-OLED 의 2026 표준).
- Tracking: inside-out SLAM (매 cameras + IMU) 또는 outside-in lighthouse.
- Controllers: 6DoF + finger tracking + haptics.
- Eye tracking + foveated rendering: 매 GPU cost 의 50-70% 감소.

### 매 software stack
- OpenXR: 매 Khronos cross-vendor standard.
- Unity XR / Unreal XR / Godot XR: engine layer.
- WebXR: browser-based VR.
- visionOS / Horizon OS / SteamVR: platform layer.

### 매 응용
1. Gaming (Half-Life Alyx, Beat Saber).
2. Training simulation (surgery, aviation, military).
3. Virtual collaboration (Horizon Workrooms, Spatial).
4. Therapy (PTSD exposure, phobia treatment).

## 💻 패턴

### Pattern 1 — OpenXR session bootstrap (C++)
```cpp
XrInstance instance;
XrInstanceCreateInfo ci{XR_TYPE_INSTANCE_CREATE_INFO};
strcpy(ci.applicationInfo.applicationName, "MyVRApp");
ci.applicationInfo.apiVersion = XR_CURRENT_API_VERSION;
xrCreateInstance(&ci, &instance);

XrSystemId sysId;
XrSystemGetInfo sgi{XR_TYPE_SYSTEM_GET_INFO};
sgi.formFactor = XR_FORM_FACTOR_HEAD_MOUNTED_DISPLAY;
xrGetSystem(instance, &sgi, &sysId);
```

### Pattern 2 — Unity XR Interaction (C#)
```csharp
using UnityEngine.XR.Interaction.Toolkit;

public class GrabHandler : MonoBehaviour {
    void OnEnable() {
        var grab = GetComponent<XRGrabInteractable>();
        grab.selectEntered.AddListener(OnGrab);
    }
    void OnGrab(SelectEnterEventArgs args) {
        Debug.Log($"Grabbed by {args.interactorObject}");
    }
}
```

### Pattern 3 — foveated rendering hint (Unreal)
```cpp
// VRS (Variable Rate Shading) tied to eye gaze
FEyeTrackerGazeData gaze;
UEyeTrackerFunctionLibrary::GetGazeData(gaze);
FoveationRenderer->SetFoveationCenter(gaze.GazeOrigin, gaze.GazeDirection);
FoveationRenderer->SetFoveationLevel(EFoveationLevel::High);
```

### Pattern 4 — locomotion (teleport, smooth, room-scale)
```csharp
// Teleport: discrete jump (low motion sickness).
// Smooth: continuous joystick (immersion ↑, sickness ↑).
// Room-scale: physical walking within play area.
locomotionProvider.MoveType = comfortSetting == HIGH ? Teleport : Smooth;
```

### Pattern 5 — async reprojection (90Hz lock)
```cpp
// Compositor re-warps last frame using latest head pose
// when app misses frame budget. Critical for sub-20ms motion-to-photon.
xrEndFrame(session, &endInfo); // compositor handles reprojection
```

### Pattern 6 — WebXR session
```javascript
const session = await navigator.xr.requestSession('immersive-vr', {
  requiredFeatures: ['local-floor', 'hand-tracking']
});
const refSpace = await session.requestReferenceSpace('local-floor');
session.requestAnimationFrame(onXRFrame);
```

## 매 결정 기준
| 상황 | Approach |
|---|---|
| 매 cross-platform deploy | OpenXR + Unity XR |
| 매 web reach | WebXR |
| 매 Apple ecosystem only | visionOS native (Swift + RealityKit) |
| 매 maximum fidelity (PCVR) | Unreal + Vulkan |
| 매 mobile standalone | Quest native (Android NDK) |

**기본값**: 매 Unity XR + OpenXR 의 cross-vendor.

## 🔗 Graph
- 부모: [[Computer-Graphics]] · [[Human-Computer-Interaction]]
- 변형: [[Mixed-Reality]] · [[Spatial-Computing]]
- Adjacent: [[깊이_지각(Depth_perception)]]

## 🤖 LLM 활용
**언제**: 매 immersive simulation 의 design 시, 매 OpenXR API 의 boilerplate 생성, 매 locomotion 의 comfort tradeoff 분석.
**언제 X**: 매 hardware-specific tuning (매 HMD 마다 의 IPD calibration), 매 user 의 actual motion sickness 의 real-world test.

## ❌ 안티패턴
- **Frame drops**: 매 90Hz 미달 → motion sickness 직결. 매 budget 의 11ms hard cap.
- **Smooth locomotion default**: 매 first-time user 의 nausea 의 cause. Teleport default.
- **Camera jerks**: 매 cinematic cuts 의 cinema convention 의 VR 적용 금지.
- **Tiny UI**: 매 angular size <2° 의 unreadable. 매 dpi 의 web 의 mental model 금지.

## 🧪 검증 / 중복
- Verified (Khronos OpenXR spec, Apple visionOS docs, Meta Developer docs).
- 신뢰도 A.

## 🕓 Changelog
| 날짜 | 변경 |
|---|---|
| 2026-05-08 | Phase 1 |
| 2026-05-10 | Manual cleanup — VR hardware/software stack + OpenXR/Unity/Unreal patterns |
