Seated in a level's opening cinematic (a passenger), the right controller
turned the game's camera the flat screen shows. The scripted-camera rule
went back out: the main menu is a scripted camera and was immersive.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A scripted camera outside a cinematic (a level's intro) was drawn in
stereo from the head, with the weapon at the controllers in it; it now
goes to the screen like a cinematic. Under the system menu the headset
reports no hands and the weapon fell back to the head; the hands last
seen in focus stand in meanwhile, their buttons let go.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sprites, light volumes (a plasma bolt's glow) and lens flare tests are
projected on the CPU into screen pixels with w 1 and their depth in z, and
the widgets' vertex program takes them to clip space: taken for a point
1 world unit away, a bolt 30 away stood 3 m off in stereo and seemed to be
swallowed half way. Where w is 1 and depth is tested, the depth comes from
z by the shared camera's projection (mv_depth), and the eye's offset is by
it. (Also logs, once each, the other targets the pass draws into.)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The sky is drawn about the camera (its view has no position), so no eye
stands aside of it; the eye's offset made it a dome a few metres away,
flat and swimming (the sea in 'Halo' is the sky's). Its draws take rows
without the offset.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With GL_OVR_multiview2 (vr.multiview), the scene is drawn once, from a
camera between the eyes whose view takes in both (plus a margin), into a
two-layer back buffer: every NV2A vertex program gets a two-view variant
that moves each view's clip position to its eye (x' = a x + b w + c, from
the shared view's and the eye's edges and the eye's place; nv2a_vsh.c),
screen-space geometry excepted. Sampling the back buffer meanwhile reads
the left eye's picture; visibility counts are halved. The host copies each
layer to its eye's image (host_xr_copy_layer_array).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The game steers a vehicle gun's shots (within its deviation cone) at what
the camera aims at; VR had replaced that camera with the barrel's own
line, right on foot but not seated, where a Banshee's nose rises as it
hovers and a tank's turret lags: the Banshee's crosshair rode high. Seated,
the camera is now the player's eyes and the unit's aim (the stick's steer,
the controller at a gun), and the crosshair floats on that line; the
barrel-line crosshair is gone.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A vehicle's gun, once manned, fires along its own barrel (not the aiming
vector) from its primary trigger, moved onto the vehicle's camera line if
it fires from its camera. The crosshair ran from the right hand along the
controller instead, and the Scorpion's shells landed above and behind it.
It now floats on the gun's own line (weapon_vr_manned_gun_line), as the
turret actually points.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Seated, the view stays behind the player's own eyes (vr.vehicle_first_person)
and turns with the vehicle, smoothly between ticks (its interpolated
heading); the head looks around freely, and recentring faces the vehicle's
forward. A driver who steers by facing (jeep, boat, plane, scout, fighter)
steers with the right stick: aside up to vr.vehicle_steer_degrees off the
heading, up and down for pitch (vr.vehicle_pitch_degrees). Gunners, the
tank's driver and passengers aim with the right controller, and turn in
the seat with the stick. The crosshair and its distance follow the
vehicle's aim. While the vehicle turns the player, the eye images darken
from their edges (vr.comfort_vignette, host_xr_set_vignette).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The crosshair used to be cut out of the HUD image (an 80x80 region around
the centre) and moved to where the weapon aims, taking with it whatever
else lay there, such as part of the reload prompt. Now it is drawn alone
first (hud_draw_crosshair), captured into its layer, and the HUD is drawn
afterwards without it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- The weapon's own crosshair (red on an enemy, as in the HUD) is taken
from the HUD's centre and floats where the weapon aims, as far away as
what it aims at, facing the eyes, as large as the HUD showed it
(vr.crosshair). The laser is off by default (vr.laser) and never shows
over the menus.
- Zoomed in, the first-person weapon stays in the hand (the game hides
it), the HUD's crosshair and zoom overlays give way to the scope, which
has a fine cross of its own, and the scope's disc is 10 cm across.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Zoomed in, the player's view is drawn once more, from the weapon along
its aim through the zoom's field of view, into a small square of the
back buffer (the first-person weapon left out), and shown on a disc over
the barrel that magnifies what it covers of the view by the zoom's
magnification (vr.scope_size). The weapon's zoom mask and filters no
longer darken the HUD before the eyes.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With vr.aim_with = "controller" (the default), on foot:
- the unit's aiming vector comes from the right controller, while its
facing (the body, the view and the movement) keeps following the head;
- shots start at the muzzle of the weapon in the hand, kept inside the
level from the camera as before;
- the first-person weapon and hands are posed from the controller
(vr.weapon_forward/right/down place the model in the hand);
- the HUD's crosshair, which marks where the head looks, is left out, and
a laser runs from the weapon to what it aims at (vr.laser).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Android port gets an OpenXR session in the host (Khronos loader, core
OpenXR plus XR_KHR_opengl_es_enable): on a headset the game keeps its
640x480 layout drawn at the eye images' resolution, renders the player's
view once per eye from the tracked eye poses through asymmetric frusta,
and shows the HUD and menus as a head-locked or room-fixed quad layer.
The head aims the player; the right stick turns; the Touch controllers
map onto the Xbox pad; rumble goes to the controllers. Frames without a
player view (menus, loading, cinematics) go onto a screen in the room.
A marker file, xr_test, runs a self-test of the session, layers, colour
path and controllers without game data.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* misc changes and additions
formatting changes and add structs/constants for terminal work
* match write_to_error_file and add error_global_data
* console work
* requested changes
* terminal work
100% match all terminal functions
* Formatting
---------
Co-authored-by: punpckhdq <121350336+punpckhdq@users.noreply.github.com>