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>
16 lines
576 B
GLSL
16 lines
576 B
GLSL
#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);
|
|
}
|