Update: added a few more functions.
Results, on AMD EPYC 7571.
Note: time for _identity functions is essentially pure
overhead of the test setup.
sRGB→Linear:
| Function | Abs. error (Linf) | Time, ns |
|---|
| static double anta_coef[61][3]={ | |
| //wavelength ext.coef sca.coef | |
| // [um] [1/km] [1/km] | |
| { 2.500E-01,1.387E-02,1.386E-02}, | |
| { 3.000E-01,1.389E-02,1.388E-02}, | |
| { 3.500E-01,1.366E-02,1.364E-02}, | |
| { 4.000E-01,1.321E-02,1.320E-02}, | |
| { 4.500E-01,1.269E-02,1.268E-02}, | |
| { 5.000E-01,1.210E-02,1.210E-02}, | |
| { 5.500E-01,1.149E-02,1.148E-02}, |
| # START OF HEADER | |
| # | |
| # Measured sky radiance data, from [1], converted | |
| # into CIE XYZ tristimulus values (see [2]). | |
| # See also [3] for visualization and additional info. | |
| # | |
| # Location: the roof of Rhodes Hall at Cornell University. | |
| # Latitude: 42.443449 | |
| # Longitude: -76.481962 | |
| # |
| <h1 class="line" data-line="0">On integrals of biquadratic gaussians</h1> | |
| <p class="line" data-line="2">This short note aims to prove that</p> | |
| <p class="line" data-line="4" align="center"><svg class="svg-preview" id="s2tex_0" style="vertical-align:-13.25626pt; opacity: 1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="629" height="46" viewBox="1872.02 1482.793 375.99 27.497"><defs><path id="s35g2-6" d="M4.462-3.415h3.033c.185 0 .381 0 .381-.218s-.196-.218-.381-.218H4.462v-3.01c0-.175 0-.404-.218-.404s-.219.196-.219.37v3.044H.982c-.186 0-.382 0-.382.218s.196.218.382.218h3.043v2.979H.982c-.186 0-.382 0-.382.218S.796 0 .982 0h6.513c.185 0 .381 0 .381-.218s-.196-.218-.381-.218H4.462z"></path><path id="s35g2-7" d="M4.462-1.604h3.033c.185 0 .381 0 .381-.218s-.196-.218-.381-.218H4.462v-2.978h3.033c.185 0 .381 0 .381-.218s-.196-.219-.381-.219H.982c-.186 0-.382 0-.382.219s.196.218.382.218h3.043v2.978H.982c-.186 0-.382 0-.382.218s.196.218.382.218h3.043V1.44c0 .175 0 .37.219.37s.218 |
| // Public Domain under http://unlicense.org, see link for details. | |
| // Self-reference: https://gist.github.com/fp64/1a3166ca35118167af8839b40d4e7b94 | |
| // Minimalist version: https://gist.github.com/fp64/2e25143e754424d4a2f592d9493451bc | |
| // Somewhat minimalistic dual-backend C program for plain WinAPI and SDL2, | |
| // that creates a (possibly fullscreen) window and provides keyboard input | |
| // and in-memory colorbuffer to draw to (no GAPI, i.e. softrender). | |
| // Compilation, WinAPI (assuming MinGW): | |
| // gcc -std=c99 -O2 demo.c -o demo.exe -mwindows -static |
| // Public Domain under http://unlicense.org, see link for details. | |
| // Self-reference: https://gist.github.com/fp64/2e25143e754424d4a2f592d9493451bc | |
| // Expanded version: https://gist.github.com/fp64/1a3166ca35118167af8839b40d4e7b94 | |
| // Minimalistic dual-backend C program for plain WinAPI and SDL2, | |
| // that creates a (non-resizable) window and provides keyboard input | |
| // and in-memory colorbuffer to draw to (no GAPI, i.e. softrender). | |
| // Compilation, WinAPI (assuming MinGW): | |
| // gcc -std=c99 -O2 demo.c -o demo.exe -mwindows -static |
| // Public Domain under http://unlicense.org, see link for details. | |
| // NOTE: gohufont (https://font.gohu.org/) itself | |
| // is licensed under WTFPL (http://www.wtfpl.net/about/). | |
| // Bitmap font, embeded as a C/C++ array. | |
| // NOTE: this file isn't a "proper" C/C++ header. | |
| // You are expected to e.g. #include it in the middle of a .c file. | |
| // Usage: pixel at position (x,y) from the lower-left |
| // Public Domain under http://unlicense.org, see link for details. | |
| // A lossless random-access compressor for GLSL (and C). | |
| // Version 1.0. | |
| // WARNING: proof-of-concept, may be buggy. | |
| // See https://www.shadertoy.com/view/4cdyWN for usage example. | |
| // | |
| // Compilation: | |
| // g++ -O3 glhf.cpp -o glhf | |
| // Example of usage: |
Update: added a few more functions.
Results, on AMD EPYC 7571.
Note: time for _identity functions is essentially pure
overhead of the test setup.
sRGB→Linear:
| Function | Abs. error (Linf) | Time, ns |
|---|
| // Public Domain under http://unlicense.org, see link for details. | |
| // Simple self-contained software triangle rasterizer, largerly based on | |
| // https://fgiesen.wordpress.com/2013/02/10/optimizing-the-basic-rasterizer/ | |
| // See also https://gist.github.com/rygorous/9b793cd21d876da928bf4c7f3e625908 | |
| // Not optimized for speed, but should be practical for | |
| // less speed-intensive purposes. | |
| #if 0 |
| // Public Domain under http://unlicense.org, see link for details. | |
| // Downsized version of u32noise.h ( https://gist.github.com/fp64/126289051f0c9e1b70bcba7c3e07a82f ). | |
| // Probably useless as actual PRNGs, but may be helpful for testing. | |
| #ifndef U16NOISE_H | |
| #define U16NOISE_H | |
| #include <stdint.h> |