mirror of
https://github.com/Toastconcern/FrameStudio.git
synced 2026-10-29 04:02:56 +01:00
Frame Studio and Frame Home: cross-platform builds
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>
This commit is contained in:
commit
f7345a5ac3
1176 files changed
+1634784
No files matched your search
@@ -0,0 +1,15 @@
|
||||
#version 450
|
||||
// Shaded (spec 0 = 1): faceted from the surface's own slope, so shapes read without any lighting; else flat.
|
||||
layout(constant_id = 0) const int kShade = 1;
|
||||
layout(location = 0) in vec3 vWorld;
|
||||
layout(location = 1) flat in vec4 vColor;
|
||||
layout(location = 0) out vec4 outColor;
|
||||
void main() {
|
||||
vec3 c = vColor.rgb;
|
||||
if (kShade == 1) {
|
||||
vec3 n = cross(dFdx(vWorld), dFdy(vWorld));
|
||||
float l = dot(n, n) > 1e-20 ? abs(dot(normalize(n), normalize(vec3(0.35, 0.85, 0.4)))) : 1.0;
|
||||
c *= 0.42 + 0.58 * l;
|
||||
}
|
||||
outColor = vec4(c, vColor.a);
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
#version 450
|
||||
// Debug views (HslRenderer::setDebugView): any mesh, drawn by its position alone in a flat colour per draw.
|
||||
#extension GL_EXT_multiview : require
|
||||
layout(location = 0) in vec3 position;
|
||||
struct Draw { mat4 clipFromModel[2]; mat4 worldFromModel; vec4 color; };
|
||||
layout(std430, set = 0, binding = 0) readonly buffer Draws { Draw d[]; } draws; // one per draw (firstInstance)
|
||||
layout(location = 0) out vec3 vWorld;
|
||||
layout(location = 1) flat out vec4 vColor;
|
||||
void main() {
|
||||
gl_Position = draws.d[gl_InstanceIndex].clipFromModel[gl_ViewIndex] * vec4(position, 1.0);
|
||||
vWorld = (draws.d[gl_InstanceIndex].worldFromModel * vec4(position, 1.0)).xyz;
|
||||
vColor = draws.d[gl_InstanceIndex].color;
|
||||
}
|
||||
Executable
+22
@@ -0,0 +1,22 @@
|
||||
#!/bin/sh
|
||||
# Regenerates src/debug_spirv.h from debug.vert / debug.frag (needs glslc: the Frame has it in /usr/bin).
|
||||
set -e
|
||||
cd "$(dirname "$0")"
|
||||
glslc -O --target-env=vulkan1.1 -fshader-stage=vert debug.vert -o /tmp/debug.vert.spv
|
||||
glslc -O --target-env=vulkan1.1 -fshader-stage=frag debug.frag -o /tmp/debug.frag.spv
|
||||
python3 - /tmp/debug.vert.spv /tmp/debug.frag.spv > ../../src/debug_spirv.h <<'PY'
|
||||
import struct, sys
|
||||
print("#pragma once")
|
||||
print("// GENERATED by tools/debugview/gen_debug_spirv.sh from tools/debugview/debug.{vert,frag}. Do not edit by hand.")
|
||||
print("// vert: in vec3 position @0; set0 b0 buffer { Draw { mat4 clipFromModel[2]; mat4 worldFromModel; vec4 color; } d[]; } by gl_InstanceIndex")
|
||||
print("// frag: out = color, faceted shading when spec 0 = 1")
|
||||
print("#include <cstddef>\n#include <cstdint>\n")
|
||||
for name, path in (("Vert", sys.argv[1]), ("Frag", sys.argv[2])):
|
||||
data = open(path, "rb").read()
|
||||
words = struct.unpack("<%dI" % (len(data) // 4), data)
|
||||
print("static const uint32_t kDebug%sSpirv[] = {" % name)
|
||||
for i in range(0, len(words), 8):
|
||||
print(" " + ",".join("0x%08x" % w for w in words[i:i + 8]) + ",")
|
||||
print("};")
|
||||
print("static const size_t kDebug%sSize = sizeof(kDebug%sSpirv);\n" % (name, name))
|
||||
PY
|
||||
Reference in new issue
Block a user