I guess there could have been a lot of better time uses than emulating GLSL shaders in OpenCV and then pipe-ing it to ffmpeg.
Threading is done via openmp, to disable it remove DEFINES from CXXFLAGS in Makefile
Make sure to install OpenCV (preferably the latest one) and install ffmpeg.
g++ main.cpp -std=c++11 -o raymarching `pkg-config opencv --cflags --libs`
or use
make
./raymarching | ffmpeg -f rawvideo -pixel_format bgr24 -video_size 320x240 -i - -f mpegts -preset veryslow -vcodec libx264 udp://localhost:5000
Pipe the output directly to ffmpeg with this command
Open VLC player (or SMPlayer) and use CTRL+N (CTRL+U - SMPlayer) to open the stream from URL
udp://@0.0.0.0:5000
Check xdPixel's tutorial for code. It's his RayMarching code after all.
Why not ???