mirror of
https://github.com/Nexoniarz/Fry3DX.git
synced 2026-11-03 20:44:26 +00:00
Shapes with live settings, shape editing, knife and hole tools, drawing shapes onto other objects, combining objects (add / subtract / overlap), copies, thickness, painting with stickers and layers, a Layout tab, a Print tab with checks, packed .fry files with autosave, export to GLB, glTF, FBX, OBJ, 3MF, STL and PLY, folders in Layers, its own crash screen, and a website for GitHub Pages in docs/. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NMSrd5oe1GpUD7E6d825KP
25 lines
1.1 KiB
C++
25 lines
1.1 KiB
C++
#pragma once
|
||
// .ksky: a sky for the renderer, compiled by assetc from an equirectangular .hdr.
|
||
// KskyHeader
|
||
// `levels` images of width >> k × height >> k RGBM8 pixels (rows top-down), largest first
|
||
// Directions are world space (+Z up): u = atan2(d.y, d.x) / 2π + 0.5, v = acos(d.z) / π.
|
||
// A pixel's linear radiance is rgb · a · kSkyRange. The sky is normalised so its upper half
|
||
// averages 1 (the engine scales it by the map's sky intensity), and the sun is taken out of
|
||
// it (the engine draws its own, matching the shadows). Level k is the sky as a surface of
|
||
// roughness k / (levels - 1) reflects it (GGX prefiltered), for image-based reflections.
|
||
#include <cstdint>
|
||
|
||
namespace keel {
|
||
|
||
inline constexpr uint32_t kKskyVersion = 1;
|
||
inline constexpr float kSkyRange = 16.0f;
|
||
|
||
struct KskyHeader {
|
||
char magic[4]; // "KSKY"
|
||
uint32_t version;
|
||
uint32_t width, height, levels;
|
||
float sunDir[3]; // towards where the sun was in the photo
|
||
float sh[27]; // 9 RGB spherical harmonics of the light it casts: Σ shᵢ·Yᵢ(n) = irradiance / π
|
||
};
|
||
|
||
} // namespace keel
|