143 bool random (
RayBuffer& orays,
const AABB& bounds,
int numRays,
bool closestHit,
bool PosDir=
false,
U32 randomSeed=0);
156 bool random (
RayBuffer& orays,
const AABB& bounds,
int numRays,
bool closestHit,
bool PosDir,
bool& newBatch,
U32 randomSeed=0);
182 bool batching(
S32 numInputRays,
S32 numSamples,
S32& startIdx,
bool& newBatch,
S32& lo,
S32& hi);
188 S32 m_shadowStartIdx;
190 S32 m_randomStartIdx;
void primaryCPU(RayBuffer &orays, const Vec3f &origin, const Mat4f &nscreenToWorld, S32 w, S32 h, float maxDist)
Generates primary rays on the CPU.
bool ao(RayBuffer &orays, RayBuffer &irays, Scene &scene, int numSamples, float maxDist, bool &newBatch, U32 randomSeed=0)
Generates ao rays on the GPU. Batches rays if necessary.
RayGen(S32 maxBatchSize=8 *1024 *1024)
Constructor.
bool random(RayBuffer &orays, const AABB &bounds, int numRays, bool closestHit, bool PosDir=false, U32 randomSeed=0)
Generates random rays. Used for various tests.
bool randomReflection(RayBuffer &orays, RayBuffer &irays, Scene &scene, int numSamples, float maxDist, bool &newBatch, U32 randomSeed=0)
Generates random reflection rays.
bool shadowCPU(RayBuffer &orays, RayBuffer &irays, int numSamples, const Vec3f &lightPos, float lightRadius, bool &newBatch, U32 randomSeed=0)
Generates shadow rays on the CPU. Batches rays if necessary.
Ray buffer class. Stores rays.
void primary(RayBuffer &orays, const Vec3f &origin, const Mat4f &nscreenToWorld, S32 w, S32 h, float maxDist)
Generates primary rays on the GPU.
bool shadow(RayBuffer &orays, RayBuffer &irays, int numSamples, const Vec3f &lightPos, float lightRadius, bool &newBatch, U32 randomSeed=0)
Generates shadow rays on the GPU. Batches rays if necessary.
bool aoCPU(RayBuffer &orays, RayBuffer &irays, Scene &scene, int numSamples, float maxDist, bool &newBatch, U32 randomSeed=0)
Generates ao rays on the CPU. Batches rays if necessary.
Ray generator class. Generates rays for both the GPU and the CPU.