MCPcopy Create free account
hub / github.com/RenderKit/embree / noise

Function noise

tutorials/common/tutorial/noise.cpp:74–83  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

72 }
73
74 float noise(float x)
75 {
76 float fx = floorf(x);
77 int X = (int)fx & 255;
78 x -= fx;
79 float u = fade(x);
80 float g00 = grad(p[X ],x );
81 float g10 = grad(p[X+1],x-1);
82 return mylerp(u,g00,g10);
83 }
84
85 float noise(float x, float y)
86 {

Callers 3

displacementFunction · 0.85
noise3DFunction · 0.85
displacementFunction · 0.85

Calls 3

fadeFunction · 0.85
gradFunction · 0.85
mylerpFunction · 0.70

Tested by

no test coverage detected