Code
Code & Libraries
Open-source implementations of the Mixwell brushes and Reverse-Drift Functions, released under the MIT license and free to use, including commercially. Every file below can be read here with syntax highlighting, downloaded directly, or browsed on GitHub.
Mixwell GLSL
GLSLGLSL implementations of the Mixwell brushes and Reverse-Drift Functions, for WebGL and OpenGL shader environments. Two variants are provided: the full library, and a much lighter brush-only build for when you do not need the Newton solver.
- Mixwell.glslFull library
The complete Mixwell library: brushes, particle drift, Reverse-Drift Functions, and the Newton solver.
- MixwellBrush.glslLite library
Brush only, with the Newton solver removed. A much lighter drop-in when you just need the Mixwell brush.
Mixwell HLSL
HLSLHLSL implementations of the Mixwell brushes and Reverse-Drift Functions, for real-time engines and shader toolchains. Two variants are provided: the full library, and a much lighter brush-only build for when you do not need the Newton solver.
An application demonstrating periodicity-exploiting evaluation with these shaders is coming soon.
- Mixwell.hlslFull library
The complete Mixwell library: brushes, particle drift, Reverse-Drift Functions, and the Newton solver.
- MixwellBrush.hlslLite library
Brush only, with the Newton solver removed. A much lighter drop-in when you just need the Mixwell brush.
Mixwell OpenCL for Houdini
OpenCLThe Mixwell function library in OpenCL, for GPU evaluation inside Houdini Copernicus. It provides the brush, particle-drift, and Reverse-Drift Function routines (plus the math helpers they rely on) that the Houdini project below uses to build its patterns. Two variants are provided: the full library, and a much lighter brush-only build for when you do not need the Newton solver.
- Mixwell.clKernel library
The full Mixwell library: brushes, particle drift, and Reverse-Drift Functions, along with the math helpers they depend on.
- MixwellBrush.clLite library
Brush only, with the Newton solver removed. A much lighter drop-in when you just need the Mixwell brush.
Houdini scene
A Houdini project containing worked examples for many of the patterns and figures from the paper. Each example is a COP network built with Houdini Copernicus, with the OpenCL node that runs the Mixwell kernels sitting inside the COP network.
Mixwell OSL for Houdini and Redshift
OSLAn Open Shading Language implementation of the Mixwell brushes and Reverse-Drift Functions, used to render the paper's marbling results in Houdini with Redshift. Wire the nodes up in a Redshift Material Builder: a UV-to-position node produces the 2D Mixwell position, one or more RDF passes reverse-drift that position, and a color-map node samples the paint pattern at the end. RDF passes compose, so stacking them builds up complex patterns without any intermediate texture resampling.
- Mixwell_UVtoPosition.oslEntry point
Maps UV coordinates to the 2D Mixwell position (pMixwell) that every later node consumes, with scale and offset controls.
- Mixwell_GelGit.oslRDF pass
Applies Gel-Git (bidirectional comb) reverse-drift to pMixwell.
- Mixwell_Nonpareil.oslRDF pass
Applies Nonpareil (noisy comb) reverse-drift, with per-tine gap noise.
- Mixwell_TriWave.oslRDF pass
Applies a triangle-wave comb reverse-drift, using the Mixwell brush with adaptive midpoint integration.
Samples the paint pattern at the drifted pMixwell position. Supports several patterns and color palettes.
- Mixwell_UV_Test.oslUtility
A minimal UV/grid shader to confirm OSL is working in your Redshift setup before wiring up Mixwell.
Houdini scene

The Houdini scene used to stage the teaser render, showing how the shot was assembled and how the Mixwell OSL materials are applied.
The artist's scarf models are not included in this public release, so the scene will not render as-is. The models used in the paper are available separately: Russian Scarves (TurboSquid) ↗
Redshift Material Builder graphs
These are the shader graphs behind the three scarves in the teaser image, left to right. Each one wires the OSL nodes above into a Redshift Material Builder: a UV-to-position node feeds one or more RDF passes, and a color-map node samples the paint pattern at the end. Click a graph to view it full size.
