Files
Mike-Solar 28c4426236 build: split the engine into liboakengine.so; worker drops the UI entirely
Physical split: app/{audio,cli,codec,common,config,node,pluginSupport,
render,task,timeline,undo,tool,shaders} plus coreengine, version and
ui/icons+colorcoding move to a new top-level engine/ tree, built as
liboakengine.so (shared). The render backends (oakgl/oakvulkan) move
with it and link the engine library instead of embedding a static
render-core subset (libolive-rendercore is gone).

- oak-render-worker now links liboakengine instead of the whole
  libolive-editor object set: 336MB -> 2.9MB, no Qt Widgets UI
- the editor links liboakengine for the engine and keeps only UI
  objects in libolive-editor
- install/packaging: GNUInstallDirs libdir on Linux, bundle copy on
  macOS, oakengine.dll staged for NSIS, AppImage validation entry
- fix backend lookup for the new layout: DynamicRenderer searched
  ../app but backends now live in engine/; a stale pre-split liboakgl
  in the build tree got dlopened instead, re-initialized and later
  destroyed the interposed engine statics (full-suite segfault at
  DialogSequenceParameterTab, found via gdb watchpoint)
2026-07-20 03:23:28 +08:00

54 lines
1.7 KiB
GLSL

// Input variables
uniform sampler2D tex_in;
uniform float left_in;
uniform float top_in;
uniform float right_in;
uniform float bottom_in;
uniform float feather_in;
uniform vec2 resolution_in;
// Input texture coordinate
in vec2 ove_texcoord;
out vec4 frag_color;
void main() {
float multiplier = 1.0;
vec2 feather_normalized = vec2(feather_in / resolution_in.x, feather_in / resolution_in.y);
vec2 feather_normalized_half = feather_normalized * 0.5;
// Calculate left cropping
float left_adjustment;
float right_adjustment;
float top_adjustment;
float bottom_adjustment;
if (feather_in == 0.0) {
if (ove_texcoord.x < left_in
|| ove_texcoord.x > (1.0-right_in)
|| ove_texcoord.y < (top_in)
|| ove_texcoord.y > (1.0-bottom_in)) {
multiplier = 0.0;
}
} else {
float left_adjustment = clamp((ove_texcoord.x - (left_in - feather_normalized.x*(1.0-left_in))) / feather_normalized.x, 0.0, 1.0);
multiplier *= left_adjustment;
float right_adjustment = 1.0-clamp((ove_texcoord.x - ((1.0-right_in) - feather_normalized.x*(right_in))) / feather_normalized.x, 0.0, 1.0);
multiplier *= right_adjustment;
float top_adjustment = clamp((ove_texcoord.y - (top_in - feather_normalized.y*(1.0-top_in))) / feather_normalized.y, 0.0, 1.0);
multiplier *= top_adjustment;
float bottom_adjustment = 1.0-clamp((ove_texcoord.y - ((1.0-bottom_in) - feather_normalized.y*(bottom_in))) / feather_normalized.y, 0.0, 1.0);
multiplier *= bottom_adjustment;
}
if (multiplier > 0.0) {
vec4 color = texture(tex_in, ove_texcoord) * multiplier;
frag_color = color;
} else {
frag_color = vec4(0.0);
}
}