alandtse / alandtse/imgui-vr-helper

Feature Request: Curved Cylinder Projection for HUDMode

Abierto
#3 0 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
C++
Estrellas
0
Forks
2
Merge medio
1 d 18 h
PR fusionados (30 d)
11

Descripción

# Feature Request: Curved Cylinder Projection for HUDMode to Prevent Lens Clipping and Maximize Usable Space

## Background
Currently, `imgui-vr-helper` composites `kClientFlag_HUDMode` overlays as a flat 3D quad in head space (`InSceneOverlay.cpp` / `ComputeHUDQuad`). While this is simple to render, it introduces two limitations in VR:
1. **Circle-in-a-Square Loss**: Because VR lenses are circular/oval, fitting a flat rectangular ImGui viewport inside the circular field of view requires shrinking the quad significantly to prevent its corners from being clipped by the physical lens edges. This discards roughly ~36% of the headset's horizontal field of view.
2. **Perspective Distortion**: The left and right edges of a flat panel are physically further from the player's eyes than the center, causing perspective compression/stretching that makes text harder to read in the periphery.

## Proposal
Implement a curved **cylinder projection** (projecting the HUD texture onto a horizontal arc wrapped around the player's head) as an option or default for `HUDMode`.

### Key Benefits:
1. **No Lens Clipping**: The horizontal curvature matches the natural shape of the headset lenses, allowing the HUD to span a wider field of view without losing the corners to the lens mask.
2. **Uniform Focal Distance**: Every point along the horizontal axis of the HUD remains at the exact same distance from the player's eyes, resolving perspective stretching.
3. **Wider Layouts**: Mods can make full use of horizontal space for wrapping wide subtitle lists, combat stats, or debug graphs into the player's peripheral vision.

### Implementation Considerations:
* **Geometry**: Instead of drawing a single flat 2D quad (2 triangles), the helper would draw a tessellated grid (e.g., a curved mesh of 16-32 horizontal segments) bent along a cylinder of radius `hudDepth`.
* **Disparity & Stereo Convergence**: To keep stereo fusion comfortable, the helper should still project the cylindrical coordinates eye-independently using the raw projection tangents (`GetProjectionRaw`).
* **API Impact**: Expose a new setting (e.g. `hudCurvature` or `hudShape = "cylinder"`) in `ImGuiVRHelper.toml`.

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.