- Bluenoise in the game INSIDE (dithering, raymarching, reflections)
- Dithering, Ray marching, shadows etc
- A Survery of Blue Noise and Its Applications
- Moments In Graphics (void-and-cluster)
- Bart Wronski Implementation of Solid Angle algorithm
Latency Comparison Numbers (~2012) | |
---------------------------------- | |
L1 cache reference 0.5 ns | |
Branch mispredict 5 ns | |
L2 cache reference 7 ns 14x L1 cache | |
Mutex lock/unlock 25 ns | |
Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
Compress 1K bytes with Zippy 3,000 ns 3 us | |
Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |
static __m128i const shuffles[16] = { | |
#define _ -1 // for readability | |
{ _,_,_,_, _,_,_,_, _,_,_,_, _,_,_,_ }, // 0000 | |
{ 0,1,_,_, _,_,_,_, _,_,_,_, _,_,_,_ }, // 0001 | |
{ _,_,_,_, 0,1,_,_, _,_,_,_, _,_,_,_ }, // 0010 | |
{ 0,1,_,_, 2,3,_,_, _,_,_,_, _,_,_,_ }, // 0011 | |
{ _,_,_,_, _,_,_,_, 0,1,_,_, _,_,_,_ }, // 0100 | |
{ 0,1,_,_, _,_,_,_, 2,3,_,_, _,_,_,_ }, // 0101 | |
{ _,_,_,_, 0,1,_,_, 2,3,_,_, _,_,_,_ }, // 0110 | |
{ 0,1,_,_, 2,3,_,_, 4,5,_,_, _,_,_,_ }, // 0111 |
REM On Unix you would do this: find ./ -type f -exec dos2unix {} \; | |
REM After installing dos2unix.exe in Windows, you can create a small bat script with the below in it to | |
REM recursively change the line endings. Careful if you have any hidden directories (e.g. .git) | |
for /f "tokens=* delims=" %%a in ('dir "C:\Users\username\path\to\directory" /s /b') do ( | |
"C:\Program Files\unix2dos.exe" %%a | |
) |
#define STB_IMAGE_IMPLEMENTATION | |
#define STB_IMAGE_WRITE_IMPLEMENTATION | |
#define STBI_ONLY_PNG | |
#define STBI_ONLY_JPEG | |
#define STBI_ONLY_BMP | |
#define STBI_ONLY_GIF | |
#include "stb_image.h" | |
#include "stb_image_write.h" |
package ; | |
#if macro | |
import haxe.macro.Context; | |
import haxe.macro.Printer; | |
import haxe.macro.Expr; | |
class MacroEnum { | |
macro public static function buildToString():Array<Field> { |
// Taken from the Rust code base: https://github.com/rust-lang/rust/blob/3809bbf47c8557bd149b3e52ceb47434ca8378d5/src/libstd/sys_common/mod.rs#L124 | |
// Computes (value*numer)/denom without overflow, as long as both | |
// (numer*denom) and the overall result fit into i64 (which is the case | |
// for our time conversions). | |
int64_t int64MulDiv(int64_t value, int64_t numer, int64_t denom) { | |
int64_t q = value / denom; | |
int64_t r = value % denom; | |
// Decompose value as (value/denom*denom + value%denom), | |
// substitute into (value*numer)/denom and simplify. | |
// r < denom, so (denom*numer) is the upper bound of (r*numer) |
#include <time.h> // Robert Nystrom | |
#include <stdio.h> // @munificentbob | |
#include <stdlib.h> // for Ginny | |
#define r return // 2008-2019 | |
#define l(a, b, c, d) for (i y=a;y\ | |
<b; y++) for (int x = c; x < d; x++) | |
typedef int i;const i H=40;const i W | |
=80;i m[40][80];i g(i x){r rand()%x; | |
}void cave(i s){i w=g(10)+5;i h=g(6) | |
+3;i t=g(W-w-2)+1;i u=g(H-h-2)+1;l(u |
Here is a short guide that will help you setup your environment to create signed commits
or signed tags
with Git locally. This has been extensively tested on Windows with Git and the Github Desktop application: I use it every day for my professional development projects.
I you face any issue, feel free to leave a comment below.