-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathkernel.h
More file actions
38 lines (30 loc) · 1012 Bytes
/
kernel.h
File metadata and controls
38 lines (30 loc) · 1012 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#ifndef KERNEL_H
#define KERNEL_H
#include <stdio.h>
#include <cuda.h>
#include <vector_types.h>
#include "curand_kernel.h"
#include "TokenData.h"
#include "Geometry.h"
#include "Light.h"
#include "Shader.h"
#include "bvh.h"
const int kMaxStackSize = 100;
const int kGimmeLotsOfMemory = 1000000 * 256;
const int kBlockWidth = 16;
const int kNumStreams = 4;
const int kMonteCarloSamples = 256;
const int kMonteCarloSamplesRoot = 16;
const int kMaxTextures= 10;
typedef enum {PHONG, COOK_TORRANCE} ShadingType;
const int kMaxRecurse = 6;
const float kAirIOR = 1.0f;
const int kXAxis = 0, kYAxis = 1, kZAxis = 2;
const int kAxisNum = 3;
extern "C" void launch_kernel(TKSceneData *data, ShadingType stype, int width,
int height, uchar4 *output, int sampleCount);
template<int t>
__device__ glm::vec3 shadeObject(BVHTree *tree,
Light *lights[], int lightCount, Geometry *geom,
float intParam, Ray ray, Shader **shader, curandState randStates[]);
#endif //KERNEL_H