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

80 lines
1.9 KiB
GLSL

// Node parameter inputs
uniform sampler2D tex_in;
uniform vec4 color_in;
uniform float radius_in;
uniform float opacity_in;
uniform bool inner_in;
uniform vec2 resolution_in;
// Standard inputs
uniform int ove_iteration;
in vec2 ove_texcoord;
out vec4 frag_color;
void main(void) {
vec4 pixel_here = texture(tex_in, ove_texcoord);
// Detect no-op situations
if (radius_in == 0.0
|| opacity_in == 0.0
|| (inner_in && pixel_here.a == 0.0)
|| (!inner_in && pixel_here.a == 1.0)) {
// No-op, do nothing
frag_color = pixel_here;
return;
}
float radius = ceil(radius_in);
float stroke_weight = 0.0;
// Loop over box
for (float i=-radius + 0.5; i<=radius; i += 2.0) {
float x_coord = i / resolution_in.x;
for (float j=-radius + 0.5; j<=radius; j += 2.0) {
float y_coord = j / resolution_in.y;
if (abs(length(vec2(i, j))) < radius) {
// Get pixel here
float alpha = texture(tex_in, ove_texcoord + vec2(x_coord, y_coord)).a;
if (inner_in) {
alpha = 1.0 - alpha;
}
stroke_weight += alpha;
if (stroke_weight >= 1.0) {
break;
}
}
}
if (stroke_weight >= 1.0) {
stroke_weight = 1.0;
break;
}
}
stroke_weight *= opacity_in;
if (inner_in) {
stroke_weight *= pixel_here.a;
}
// Make RGBA color
vec4 stroke_col = color_in * stroke_weight;
if (inner_in) {
// Alpha over the stroke over the texture
stroke_col = pixel_here * (1.0 - stroke_col.a) + stroke_col;
} else {
// Alpha over the texture over the stroke
stroke_col = stroke_col * (1.0 - pixel_here.a) + pixel_here;
}
frag_color = stroke_col;
}