Skip to content

Commit a6b8e93

Browse files
committed
Fix uninitialized boolean rendering black videos on llvmpipe and macos, add 'block' parameter on the webui
1 parent bc3185f commit a6b8e93

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

DepthFlow/Resources/Shaders/DepthFlow.glsl

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,10 @@ DepthFlow DepthMake(
4646
camera.zoom += (depth.zoom - 1.0) + ((1/depth.away) - 1.0);
4747
camera.plane_point = vec3(0.0, 0.0, depth.away);
4848
camera = iCameraProject(camera);
49+
depth.oob = camera.out_of_bounds;
4950

50-
if (camera.out_of_bounds) {
51-
depth.oob = true;
51+
if (depth.oob)
5252
return depth;
53-
}
5453

5554
// Point where the ray intersects with the infinity plane, with a fixed point
5655
// pivoting around depth=steady. I do not know how the math works.

DepthFlow/Webui.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,8 @@ def launch(self,
141141
help="Number of maximum concurrent renders")]=4,
142142
browser: Annotated[bool, typer.Option("--open", " /--no-open",
143143
help="Open the WebUI in the browser")]=True,
144+
block: Annotated[bool, typer.Option("--block", "-b", " /--no-block",
145+
help="Holds the main thread until the WebUI is closed")]=True,
144146
) -> gradio.Blocks:
145147
with gradio.Blocks(
146148
theme=gradio.themes.Default(
@@ -288,6 +290,7 @@ def launch(self,
288290
allowed_paths=[DEPTHFLOW.DIRECTORIES.DATA],
289291
favicon_path=DEPTHFLOW.RESOURCES.ICON_PNG,
290292
inbrowser=browser, show_api=False,
293+
prevent_thread_lock=(not block),
291294
max_threads=threads,
292295
server_name=server,
293296
server_port=port,

0 commit comments

Comments
 (0)