mirror of
https://github.com/Toastconcern/FrameStudio.git
synced 2026-10-29 04:02:56 +01:00
Frame Studio now builds for Windows (x64, x86, ARM64), Linux (x64, x86, ARM64)
and macOS (Apple Silicon, Intel):
- studio/platform.h with Win32 and POSIX implementations (dialogs through
tinyfiledialogs on Linux/macOS), a GLFW window beside the Win32 one, and a
platform-neutral frame pacer
- MoltenVK support in the renderer (portability enumeration) and bundled in
the macOS app
- 32-bit builds: large-address-aware, LZMA packing within a 32-bit address space
- unaligned file reads in the loaders go through loadUnaligned (no UB)
- scripts/build-studio.sh, studio/build_windows.bat [x64|x86|arm64],
cmake/llvm-mingw.cmake, and a GitHub Actions workflow building every target
Frame Home installs without Studio: frame/install-frame-home.{sh,ps1} and
"Install Frame Home.bat" (packaged as FrameHome-installer.zip).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
31 lines
1.6 KiB
C++
31 lines
1.6 KiB
C++
#pragma once
|
|
// Homes as the Steam Frame's native environment.
|
|
//
|
|
// SteamVR's compositor draws its environment itself from an equirectangular background image
|
|
// (8192x4096, like its own night_mountains.png), optionally dome-projected: the image is projected
|
|
// from the viewer's eye height onto a sphere of a given radius with a flat floor, so the floor and the
|
|
// room's walls appear at roughly the right distance. No app runs; the compositor owns it.
|
|
//
|
|
// A home is rendered with its own Meta shaders into six 90-degree faces around the viewer and
|
|
// resampled into that layout. The image centre is the direction `yawDeg` faces (0 = -Z, the home's
|
|
// forward), with the image's right-hand side to the viewer's right.
|
|
#include "hsl_renderer.h"
|
|
#include "hsl_scene.h"
|
|
|
|
#include <string>
|
|
#include <vector>
|
|
|
|
struct PanoramaView {
|
|
float eye[3] = {0, 1.6f, 0}; // where the viewer stands (eye height above the home's floor)
|
|
float yawDeg = 0; // direction that becomes the image centre
|
|
};
|
|
|
|
// Renders width x width/2 RGB8 (sRGB). Leaves the renderer resized to the face size.
|
|
bool renderPanorama(HslRenderer& r, const PanoramaView& view, uint32_t width, std::vector<u8>& rgb);
|
|
|
|
// Median horizontal distance from `eye` to the home's visible geometry: the dome radius that puts the
|
|
// projected walls where they are. Falls back to `fallback` when nothing is hit (open outdoor homes).
|
|
float panoramaDomeRadius(const HslRenderer& r, const HslScene& scene, const float eye[3], float fallback = 10.0f);
|
|
|
|
bool writePng(const std::string& path, const std::vector<u8>& rgb, uint32_t w, uint32_t h);
|