Sampler.h 513 Bytes
Newer Older
Nianchen Deng's avatar
Nianchen Deng committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#pragma once
#include "Common.h"

class Sampler
{
public:
    Sampler(glm::vec2 depthRange, uint samples) : _dispRange(1.0f / depthRange.x, 1.0f / depthRange.y),
                                                  _samples(samples) {}

    void sampleOnRays(sptr<CudaArray<glm::vec3>> o_sphericalCoords,
                      sptr<CudaArray<float>> o_depths,
                      sptr<CudaArray<glm::vec3>> rays,
                      glm::vec3 rayCenter);

private:
    glm::vec2 _dispRange;
    uint _samples;
};