getIndex(r, g, b) return (r * this.size * this.size) + (g * this.size) + b;
return lut;
| Operation | 17³ (ms) | 33³ (ms) | 65³ (ms) | Memory (MB) | |-----------|----------|----------|----------|-------------| | Identity generation | 2.1 | 8.7 | 78.3 | 4.2 | | Apply S-curve + saturation | 5.4 | 21.2 | 201.5 | 12.8 | | Export to .cube | 1.8 | 9.4 | 89.0 | N/A | | | 1.1 | 4.3 | 42.0 | 9.1 |
The story of is a tale of a lone developer, Leo, who was tired of bulky video editing software just to apply a simple color grade. He dreamt of a world where cinematic looks could be generated instantly in a web browser. The Spark of an Idea
Keep in mind, this is a very basic example. Real-world LUTs and color grading operations can be much more complex, involving sophisticated algorithms and nuanced color science.
class LUTCreator constructor(size = 16) this.size = size; this.lut = this.generateLUT();