MCPcopy Create free account
hub / github.com/TheRealMJP/BakingLab / CMJRandFloat

Function CMJRandFloat

SampleFramework11/v1.02/Graphics/Sampling.cpp:134–144  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

132}
133
134static float CMJRandFloat(uint32 i, uint32 p)
135{
136 i ^= p;
137 i ^= i >> 17;
138 i ^= i >> 10; i *= 0xb36534e5;
139 i ^= i >> 12;
140 i ^= i >> 21; i *= 0x93fc4795;
141 i ^= 0xdf6e307f;
142 i ^= i >> 17; i *= 1 | p >> 18;
143 return i * (1.0f / 4294967808.0f);
144}
145
146 // Returns a 2D sample from a particular pattern using correlated multi-jittered sampling [Kensler 2013]
147Float2 SampleCMJ2D(int32 sampleIdx, int32 numSamplesX, int32 numSamplesY, int32 pattern)

Callers 1

SampleCMJ2DFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected