MCPcopy Create free account
hub / github.com/Apress/Ray-Tracing-Gems-II / uniform

Function uniform

Chapter_20/program.cpp:40–42  ·  view source on GitHub ↗

NOTE: uniform is thread-safe since random generator is in a thread_local variable

Source from the content-addressed store, hash-verified

38
39// NOTE: uniform is thread-safe since random generator is in a thread_local variable
40float uniform() {
41 return random.uniform(random.rng);
42}
43
44// NOTE: This function only applies gamma.
45uint32_t convert_sRGB(vec3 color) {

Callers 9

renderFunction · 0.85
render_mis_weightsFunction · 0.85
random_quadFunction · 0.85
random_on_sphereFunction · 0.85
russian_rouletteFunction · 0.85
random_beckmanFunction · 0.85
sample_materialFunction · 0.85
sample_lightsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected