The blog at the bottom of the sea
Most Recent Posts:2026-10-15 Binary Serialization in df_game_data2026-10-07 Why The AI Determinism Argument Annoys Me2026-10-03 The Double Headed Stack Allocator2026-07-01 What To Learn To Be A Real Time Graphics Programmer2026-05-19 My Professional Motivations, Qualifications, and Role Preferences2
- Posts
- 275 from 4 May 2012 to 24 Oct 2026
- Posting
- monthly (6 in the last year)
- Kind
- personal blog
- Feed
- https://blog.demofox.org/feed/
2026 6
2025 7
- Using Information Entropy To Make Choices / Choose Experiments
- Derivatives, Gradients, Jacobians and Hessians – Oh My!
- Toroidally Progressive Stratified Sampling in 1D
- Thresholding Modern Blue Noise Textures
- Considering Democrats Blameless is a Medically Useless Diagnosis for the USA
- Simulating Dice Rolls With Coin Flips
- Dice, (De)Convolution and Generating Functions
2024 6
- Scaling Points In a Specific Direction
- A Two Dimensional Low Discrepancy Shuffle Iterator (+Random Access & Inversion)
- Summing Blue Noise Octaves Like Perlin Noise
- A Low Discrepancy Shuffle Iterator (+Random Access & Inversion)
- What I wish I knew about ESPP and RSUs sooner (company stock benefits. 2024, USA, California)
- Gradient Descent With Adam in Plain C++
2023 18
- Making Blue Noise Point Sets With Sliced Optimal Transport
- Deriving the Inverse CDF of a Rotated Square Projected onto a Line
- Interpolating Color Image Histograms Using Sliced Optimal Transport
- How To Make Your Own Spooky Magic Eye Pictures (Autostereograms)
- When There Are Too Many Experiments (Tests) To Do! Part 2: Orthogonal Arrays
- Fractional Factorial Experiment Design: When There Are Too Many Experiments To Do
- Alan Wolfe (Atrix256/Demofox) Banned (?) From X (Twitter)
- Generating Hamiltonian Cycles on Graphs with Prime Numbers of Nodes, Without Repeating Edges
- Sparse Pairwise Voting or Tournaments (Implementing SoME3 Voting)
- Permutation Iteration and Random Access
- Inverting Gauss’ Formula
- Random Sampling Experiments: Avoid The Sides!
- Euler’s Best Candidate – For Generating Blue Noise Sample Points, and More
- Euler’s Number & Probability
- Uniform 1D Red Noise & Blue Noise Part 2
- Uniform 1D Red Noise & Blue Noise
- Fibonacci Word Sampling: A Sorted Golden Ratio Low Discrepancy Sequence
- Generalizing Binary Search To Higher Dimensions
2022 16
- Rapidly Solving Sudoku, N-Queens, Pentomino Placement, and More, With Knuth’s Algorithm X and Dancing Links.
- Calculating Discrete Sums With Umbral Calculus
- Calculating the Similarity of Histograms or PDFs & Interpolating Them Using the p-Wasserstein Distance
- Rounding Modes For Integer Division
- Calculating SVD and PCA in C++
- Programming PCA From Scratch In C++
- Piecewise Least Squares Curve Fitting
- Fitting Data Points With Weighted Least Squares
- Sampling Importance Resampling
- Picking Fairly From a List of Unknown Size With Reservoir Sampling
- Image Sharpening Convolution Kernels
- The Discrete Cosine Transform, and Derivatives
- Adjusting Point Sets in Frequency Space Using a Differentiable Fourier Transform
- Two Low Discrepancy Grids: Plus Shaped Sampling LDG, and R2 LDG
- Distance Between Points on a “Toroidal Disk”
- Interleaved Gradient Noise: A Different Kind of Low Discrepancy Sequence
2021 7
2020 21
- Multiple Importance Sampling in 1D
- Frequency Domain Image Compression and Filtering
- When Life Gives You Lemons, Make Random Numbers
- Irrational Numbers
- Using Low Discrepancy Sequences With Rejection Sampling
- Interpolating Data Over Arbitrary Shapes With Laplace’s Equation and Walk on Spheres
- Weighted Round Robin (Weighted Random Integers) Using The Golden Ratio Low Discrepancy Sequence
- Casual Shadertoy Path Tracing 3: Fresnel, Rough Refraction & Absorption, Orbit Camera
- Casual Shadertoy Path Tracing 2: Image Improvement and Glossy Reflections
- A Link Between Russian Roulette and Rejection Sampling / Importance Sampling
- Casual Shadertoy Path Tracing 1: Basic Camera, Diffuse, Emissive
- Using Blue Noise For Raytraced Soft Shadows
- Ray Marching Fog With Blue Noise
- Guess a Number Between 1 and 10
- Basic Methods For Finding Zeroes and Mins / Maxes of Functions
- Using White Noise to Choose Between Red Noise and Blue Noise
- How Do I Calculate Variance in 1 Pass?
- Using Low Discrepancy Sequences & Blue Noise in Loot Drop Tables for Games
- A Fun 2d Rotation Matrix Derivation
- IIR Audio & Data Filters – Featuring Biquads
- FIR Audio & Data Filters
2019 10
- Bezier Triangles
- Calculating Information Entropy
- Bayes’ Theorem Intuition
- Measuring Debug STL Container Perf Cost in MSVC
- Dice, Distributions & Noise Colors
- Generating Blue Noise Textures With Void And Cluster
- Taking the Max of Uniform Random Numbers
- Generating Random Numbers From a Specific Distribution With The Metropolis Algorithm (MCMC)
- Markov Chain Text Generation
- Linear Fit Search
2018 16
- Posts TODO
- How To: Data Lookups Via Raytracing
- Not All Blue Noise is Created Equal
- Tiled Blue Noise
- Blending an HDR color into a U8 Buffer
- Pathtraced Depth of Field & Bokeh
- Monte Carlo Integration Explanation in 1D
- Test
- A Neat Trick For Compressing Networked State Data
- Taking a Stroll Between The Pixels
- Prefix Sums and Summed Area Tables
- An Idea: Raytracing Lookup Tables
- A Very Quick DirectX Raytracing API Primer
- Don’t Convert sRGB U8 to Linear U8!
- Granular Audio Synthesis
- What the Heck is Blue Noise?
2017 30
- C++ Differentiable Programming: Searching For An Optimal Dither Pattern
- Dissecting “Tiny Clouds”
- Demystifying Floating Point Precision
- My Old Master: On Optimism
- Animating Noise For Integration Over Time 2: Uniform Over Time
- Animating Noise For Integration Over Time
- Transmuting White Noise To Blue, Red, Green, Purple
- Generating Blue Noise Sample Points With Mitchell’s Best Candidate Algorithm
- Calculating the Distance Between Points in “Wrap Around” (Toroidal) Space
- Half Tile Offset Streaming World Grids
- Generating Random Numbers From a Specific Distribution With Rejection Sampling
- Generating Random Numbers From a Specific Distribution By Inverting the CDF
- Counting Bits & The Normal Distribution
- WebGL PBR Implementation
- A Tool To Debug Teams (Knoster)
- Why Are Some Shadows Soft And Other Shadows Hard?
- SIMD / GPU Friendly Branchless Binary Search
- When Random Numbers Are Too Random: Low Discrepancy Sequences
- Improved Storage Space Efficiency of GPU Texture Sampler Bezier Curve Evaluation
- Solving N equations and N unknowns: The Fine Print (Gauss Jordan Elimination)
- Orthogonal Projection Matrix Plainly Explained
- Plastic Bag Ban – Semi Reusable Bag Kiosks a Better Solution?
- Neural Network Recipe: Recognize Handwritten Digits With 95% Accuracy
- Neural Network Gradients: Backpropagation, Dual Numbers, Finite Differences
- How to Train Neural Networks With Backpropagation
- Multivariable Dual Numbers & Automatic Differentiation
- A Geometric Interpretation of Neural Networks
- My Old Master: How to Correct as a Mentor or a Teacher
- Raytracing Reflection, Refraction, Fresnel, Total Internal Reflection, and Beer’s Law
- Incremental Least Squares Surface and Hyper-Volume Fitting
2016 33
- Incremental Least Squares Curve Fitting
- Evaluating Points on Analytical Surfaces and in Analytical Volumes Using the GPU Texture Sampler
- Failed Experiment: The GPU Texture Sampler is Turing Complete But That Fact is Pretty Useless
- Evaluating Polynomials with the GPU Texture Sampler
- The Secret to Writing Fast Code / How Fast Code Gets Slow
- Minimizing Code Complexity by Programming Declaratively
- Low Tech Homomorphic Encryption
- A Data Point for MSVC vs Clang Code Generation
- Is Code Faster Than Data? Examining Hash Tables
- Is Code Faster Than Data? Switch Statements vs. Arrays
- Exploring Compile Time Hashing
- Path Tracing – Getting Started With Diffuse and Emissive
- Incremental Averaging
- Understanding The Discrete Fourier Transform
- Fourier Transform (And Inverse) Of Images
- Intro To Audio Synthesis For Music Presentation
- The Beating Effect
- Synthesizing a Plucked String Sound With the Karplus-Strong Algorithm
- Who Cares About Dynamic Array Growth Strategies?
- Shamir’s Quest: Collect Any 3 Keys To Unlock The Secret!
- Turning a Truth Table Into A digital Circuit (ANF)
- Game Development Needs Data Pipeline Middleware
- Using Wang Tiles to Simulate Turing Machines
- A Sixth Way To Calculate Sine Without Trig
- Matrix Form of Bezier Curves
- Actually Making Signed Distance Field Textures With JFA
- Fast Voronoi Diagrams and Distance Field Textures on the GPU With the Jump Flooding Algorithm
- GPU Texture Sampler Bezier Curve Evaluation
- G-Buffer Upsizing
- Normalized Vector Interpolation TL;DR
- How and Why Cleaning Up Code or Processes Gives Multiplicative Benefits
- Failed Shadertoy “Dust” Game – Browsers Need To Compile Shaders Off the Main Thread!
- Making a Ray Traced Snake Game in Shadertoy
2015 49
- Simplifying Boolean Expressions With Karnaugh Maps
- What Happens When you Mix Hash Tables and Binary Searching?
- O(1) Data Lookups With Minimal Perfect Hashing
- Hiding a Lookup Table in a Modulus Operation
- Quantum Computing For Programmers Part 2: Multiple Qubits
- Quantum Computing For Programmers Part Ib: Bloch Sphere
- Quantum Computing For Programmers Part I: One Qubit
- Quantum Computing References
- Solving Nested Modulus Equations
- Solving Simultaneous Congruences (Chinese Remainder Theorem)
- Modular Multiplicative Inverse
- Improving the Security of the Super Simple Symmetric Leveled Homomorphic Encryption Implementation
- Super Simple Symmetric Leveled Homomorphic Encryption Implementation
- Gaussian Blur
- Box Blur
- Resizing Images With Bicubic Interpolation
- Cubic Hermite Rectangles
- Cubic Hermite Interpolation
- Lagrange Rectangles
- Finite Differences
- Rectangular Bezier Patches
- Lagrange Interpolation
- The De Casteljau Algorithm for Evaluating Bezier Curves
- What is Pre-multiplied Alpha and Why Does it Matter?
- Adventures in Learning How to Publish a Research Paper Part 1
- A Fifth Way to Calculate Sine Without Trig
- Easy Binomial Expansion & Bezier Curve Formulas
- No Bad Code, Creeping Normality and Social Structure Code Organization
- Bilinear Filtering & Bilinear Interpolation
- FlipQuad & FlipTri Antialiasing
- 4-Rook Antialiasing (RGSS)
- Quincunx Antialiasing
- Frequency Domain Audio Synthesis – With IFFT and Oscillators
- Decibels (dB) and Amplitude
- DIY Synth: Convolution Reverb & 1D Discrete Convolution of Audio Samples
- DIY Synth: Multitap Reverb
- DIY Synth: Delay Effect (Echo)
- DIY Synth: Flange Effect
- DIY Synth: Basic Drum
- HyperLogLog: Estimate Unique Value Counts Like The Pros
- Avoiding The Performance Hazzards of std::function
- Count Min Sketch: A Probabilistic Histogram
- Writing a Basic Search Engine AKA Calculating Similarity of Histograms with Dot Product
- Estimating Set Membership With a Bloom Filter
- Getting Strongly Typed Typedefs Using Phantom Types
- Estimating Counts of Distinct Values with KMV
- Programmatically Calculating GCD and LCM
- DAPSE Preview
- Bresenham’s Drawing Algorithms
2014 21
- Dual Numbers & Automatic Differentiation
- Using Imaginary Numbers To Rotate 2D Vectors
- Four Ways to Calculate Sine Without Trig
- One Dimensional Bezier Curves
- Counting in Binary is a Fractal
- Wang Tiling
- Temporal supersampling, flipquads and real time raytracing
- What if My Equation DOESN’T Equal Zero??
- Situational Leadership
- Distance Field Textures
- Analytic Fog Density
- Feistel Networks – Do They Have to use XOR?
- Bezier Curves Part 2 (and Bezier Surfaces)
- Implicit vs Parametric vs Explicit Surfaces
- Bezier Curves
- Soft Maximum vs Hard Maximum
- Lots of Skyboxes!
- Converting RGB to Grayscale
- A trip through the Graphics Pipeline
- Shadertoy – WebGLSL pixel shaders
- Getting Ideal Disk Reads on the Cheap
2013 18
- Transformation Matrix Basics
- Converting To and From Polar / Spherical Coordinates Made Easy
- How to Test Randomness of Numbers
- External C++ Header Guards
- Alloca and Realloc – Useful Tools, Not Ancient Relics
- Is pre-increment really faster than post increment? Part 2
- A Super Tiny Random Number Generator
- Fast & Lightweight Random “Shuffle” Functionality – FIXED!
- The Incredible Time Traveling Random Number Generator
- Why do you hate me rand()?!
- Fast & Lightweight Random “Shuffle” Functionality
- Efficiently Generate Random Numbers Without Repeats
- Is pre-increment really faster than post increment? Part 1
- The Black Art of sizeof() aka Compile Time Type Deduction
- Lists of Macro Lists
- Macro Lists For The Win – Side B
- Macro Lists For The Win
- Permutation Programming Without Maintenance Nightmares
2012 17
- Mechanical Computer Quest Part I
- B.A.M. Neural Networks
- How to Render the Mandelbrot Set
- Bias And Gain Are Your Friend
- Anatomy of a Skeletal Animation System Part 3
- Anatomy of a Skeletal Animation System Part 2
- Anatomy of a Skeletal Animation System Part 1
- Encryption 101: Realistic Security
- Cryptography 101: Encryption – Asymmetric Keys
- Cryptography 101: Encryption – Symmetric Keys
- Cryptography 101: Encryption – One Time Pad
- Cryptography 101: Hashing
- Recording lagless demo videos of a laggy game
- DIY Synth 3: Sampling, Mixing, and Band Limited Wave Forms
- DIY Synth 2: Common Wave Forms
- DIY Synth 1: Sound Output
- MoriRT: Pixel and Geometry Caching to Aid Real Time Raytracing