View csgtree_pruning.txt
none
using "none.libc"
; generate random CSG trees, attempt to optimize and evaluate robustness and
; effectivity in comparison with a full evaluation.
var INSIDE -1
var SURFACE 0
var OUTSIDE 1
View 1ddistances.txt
none
; provided a list of boolean range operations, find the nearest depth
; at which the ray hits a 100% occluding volume
using "none.libc"
"
+++++++++++ (20 30)
--- (19 21)
View ellipsoid_frustum.md

Ellipsoid Frustum Intersection

Yesterday I posted a problem to math stack exchange that bothered me for a while now, and right after I've had a few exchanges on Twitter, I got inspired to attempt a solution.

Here it goes. It's 100% untested but I'm fairly certain that it will work.

The problem is about a form of refining raytracing where we render a big list of convex 3D brushes (and I decided to start with Ellipsoids, since they're so useful) to the screen or a shadow map, without any prebuilt accelleration structure. How does it work? Well, if we had a way to figure out for a portion of the frustum whether it contained a brush, we could

  1. Start with a very low resolution
View gist:1e9f0aa78ff12d17c33af65f56499b59
Müsset im Naturbetrachten when observing nature, you must
Immer eins wie alles achten. mind the single thing as well as everything
Nichts ist drinnen, nichts ist draußen; nothing is inside; nothing is outside
Denn was innen, das ist außen. because what's inside is outside
So ergreifet ohne Säumnis so reach without delay for
Heilig öffentlich Geheimnis! the holy public secret (or mystery)
Freuet euch des wahren Scheins, enjoy the true illusiveness
Euch des ernsten Spieles! enjoy the serious play
Kein Lebend'ges ist ein Eins, nothing alive is just one thing
View gist:8dcb2231d4b1ab4857520e527fc747ce
when the entry label to a function is originally declared (during macro expansion),
the entry label is tagged with the label that was active when the label was declared;
this is called the scope label.
later, during evaluation, when an entry label is encountered as argument, and the
label has a scope label tag, the current frame (a cactus stack) is searched upwards
for the scope label, and truncated by that amount.
if the scope label tag can not be found in upwards frames (and this is the part that
gives me grief, because it happens too much) then the current frame is taken as-is.
View stuff.spv
; SPIR-V
; Version: 1.0
; Generator: Unknown(21315); 20304
; Bound: 50
; Schema: 0
OpCapability Shader
%1 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint Fragment %main "main"
%6 = OpString "/home/lritter/devel/duangle/liminal2/liminal/csgpainter.sc"
View scopes_coverage.txt
Coverage of Implementations in Scopes Compiler
0.52% 83 error handling
0.65% 104 pre-defined type enum
1.24% 198 stream with color formatted output
1.25% 199 IL label printer
1.47% 234 main (loader)
1.56% 249 utilities
1.62% 258 platform ABI linux + windows
View gist:5cffef2fde0f5988260d7dec258f8cf7
# scopes code
fn vertex-shader ()
let x = (unconst (vec2 1 2))
print
compile-glsl
typify vertex-shader
'dump-disassembly
// spirv disassembly
// Module Version 10000
View mingw-w64-clang-4.0.1-1-x86_64-build.log
C:/devel/MINGW-packages/mingw-w64-clang/src/llvm-4.0.1.src/tools/lldb/source/Target/Thread.cpp:1216:61: warning: unknown conversion type character 'l' in format [-Wformat=]
GetID(), static_cast<void *>(up_to_plan_ptr));
^
C:/devel/MINGW-packages/mingw-w64-clang/src/llvm-4.0.1.src/tools/lldb/source/Target/Thread.cpp:1216:61: warning: format '%p' expects argument of type 'void*', but argument 3 has type 'lldb::user_id_t {aka long long unsigned int}' [-Wformat=]
C:/devel/MINGW-packages/mingw-w64-clang/src/llvm-4.0.1.src/tools/lldb/source/Target/Thread.cpp:1216:61: warning: too many arguments for format [-Wformat-extra-args]
C:/devel/MINGW-packages/mingw-w64-clang/src/llvm-4.0.1.src/tools/lldb/source/Target/Thread.cpp: In member function 'void lldb_private::Thread::DiscardThreadPlans(bool)':
C:/devel/MINGW-packages/mingw-w64-clang/src/llvm-4.0.1.src/tools/lldb/source/Target/Thread.cpp:1249:31: warning: unknown conversion type character
View glmain.sc.txt
#!/usr/bin/env scopes
define clibs
load-library "libGL.so"
load-library "libSDL2-2.0.so"
import-c "clibs.h" "
#include <stdint.h>
#include <stdio.h>
#include <SDL2/SDL.h>
#include <SDL2/SDL_syswm.h>