-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathmaterial_sets_shared.h
More file actions
55 lines (36 loc) · 992 Bytes
/
material_sets_shared.h
File metadata and controls
55 lines (36 loc) · 992 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#pragma once
#include "../common/common.h"
namespace Shared {
enum RayType {
RayType_Primary = 0,
NumRayTypes
};
struct Vertex {
float3 position;
float3 normal;
float2 texCoord;
};
struct Triangle {
uint32_t index0, index1, index2;
};
struct PerspectiveCamera {
float aspect;
float fovY;
float3 position;
Matrix3x3 orientation;
};
struct MaterialData {
float3 color;
};
struct GeometryData {
ROBuffer<Vertex> vertexBuffer;
ROBuffer<Triangle> triangleBuffer;
};
struct PipelineLaunchParameters {
OptixTraversableHandle travHandle;
int2 imageSize; // Note that CUDA/OptiX built-in vector types with width 2 require 8-byte alignment.
optixu::BlockBuffer2D<float4, 1> resultBuffer;
PerspectiveCamera camera;
};
using MyPayloadSignature = optixu::PayloadSignature<float3>;
}