NTrace
GPU ray tracing framework
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
RendererKernels.hpp
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2009-2011, NVIDIA Corporation
3
* All rights reserved.
4
*
5
* Redistribution and use in source and binary forms, with or without
6
* modification, are permitted provided that the following conditions are met:
7
* * Redistributions of source code must retain the above copyright
8
* notice, this list of conditions and the following disclaimer.
9
* * Redistributions in binary form must reproduce the above copyright
10
* notice, this list of conditions and the following disclaimer in the
11
* documentation and/or other materials provided with the distribution.
12
* * Neither the name of NVIDIA Corporation nor the
13
* names of its contributors may be used to endorse or promote products
14
* derived from this software without specific prior written permission.
15
*
16
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
17
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19
* DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
20
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26
*/
27
28
#pragma once
29
#include "
base/DLLImports.hpp
"
30
#include "
Util.hpp
"
31
32
namespace
FW
33
{
34
//------------------------------------------------------------------------
35
36
enum
37
{
38
CountHits_BlockWidth
= 32,
39
CountHits_BlockHeight
= 8,
40
};
41
42
//------------------------------------------------------------------------
43
44
struct
ReconstructInput
45
{
46
S32
numRaysPerPrimary
;
47
S32
firstPrimary
;
48
S32
numPrimary
;
49
bool
isPrimary
;
50
bool
isAO
;
51
bool
isDiffuse
;
52
bool
isTextured
;
53
bool
isPathTraced
;
54
CUdeviceptr
primarySlotToID
;
// const S32*
55
CUdeviceptr
primaryResults
;
// const RayResult*
56
CUdeviceptr
batchIDToSlot
;
// const S32*
57
CUdeviceptr
batchResults
;
// const RayResult*
58
CUdeviceptr
triMaterialColor
;
// const U32* ABGR
59
CUdeviceptr
triShadedColor
;
// const U32* ABGR
60
CUdeviceptr
pixels
;
// U32* ABGR
61
62
CUdeviceptr
texCoords
;
// const Vec2f*
63
CUdeviceptr
normals
;
// const Vec3f*
64
CUdeviceptr
triVertIndex
;
// const Vec3i*
65
CUdeviceptr
atlasInfo
;
// const Vec4f*
66
CUdeviceptr
matId
;
// const U32*
67
CUdeviceptr
matInfo
;
// const Vec4f*
68
};
69
70
//------------------------------------------------------------------------
71
72
struct
CountHitsInput
73
{
74
S32
numRays
;
75
CUdeviceptr
rayResults
;
// const RayResult*
76
S32
raysPerThread
;
77
};
78
79
//------------------------------------------------------------------------
80
81
#if FW_CUDA
82
extern
"C"
83
{
84
85
__constant__
ReconstructInput
c_ReconstructInput;
86
__global__
void
reconstructKernel(
void
);
87
88
__constant__
CountHitsInput
c_CountHitsInput;
89
__device__
S32
g_CountHitsOutput;
90
__global__
void
countHitsKernel(
void
);
91
92
texture<float4, 2> t_textures;
93
94
}
95
#endif
96
97
//------------------------------------------------------------------------
98
}
FW::ReconstructInput::firstPrimary
S32 firstPrimary
Definition:
RendererKernels.hpp:47
FW::ReconstructInput::isDiffuse
bool isDiffuse
Definition:
RendererKernels.hpp:51
FW::CountHitsInput::numRays
S32 numRays
Definition:
RendererKernels.hpp:74
FW::ReconstructInput::triVertIndex
CUdeviceptr triVertIndex
Definition:
RendererKernels.hpp:64
FW::CountHits_BlockWidth
Definition:
RendererKernels.hpp:38
FW::ReconstructInput::pixels
CUdeviceptr pixels
Definition:
RendererKernels.hpp:60
FW::ReconstructInput::numRaysPerPrimary
S32 numRaysPerPrimary
Definition:
RendererKernels.hpp:46
FW::ReconstructInput::batchResults
CUdeviceptr batchResults
Definition:
RendererKernels.hpp:57
FW::ReconstructInput
Definition:
RendererKernels.hpp:44
FW::ReconstructInput::isTextured
bool isTextured
Definition:
RendererKernels.hpp:52
FW::ReconstructInput::texCoords
CUdeviceptr texCoords
Definition:
RendererKernels.hpp:62
FW::ReconstructInput::primaryResults
CUdeviceptr primaryResults
Definition:
RendererKernels.hpp:55
FW::ReconstructInput::normals
CUdeviceptr normals
Definition:
RendererKernels.hpp:63
FW::ReconstructInput::triMaterialColor
CUdeviceptr triMaterialColor
Definition:
RendererKernels.hpp:58
FW::ReconstructInput::isPrimary
bool isPrimary
Definition:
RendererKernels.hpp:49
FW::CountHits_BlockHeight
Definition:
RendererKernels.hpp:39
FW::ReconstructInput::batchIDToSlot
CUdeviceptr batchIDToSlot
Definition:
RendererKernels.hpp:56
FW::ReconstructInput::matInfo
CUdeviceptr matInfo
Definition:
RendererKernels.hpp:67
FW::ReconstructInput::atlasInfo
CUdeviceptr atlasInfo
Definition:
RendererKernels.hpp:65
FW::S32
signed int S32
Definition:
Defs.hpp:88
FW::CountHitsInput::rayResults
CUdeviceptr rayResults
Definition:
RendererKernels.hpp:75
Util.hpp
FW::ReconstructInput::isAO
bool isAO
Definition:
RendererKernels.hpp:50
FW::ReconstructInput::numPrimary
S32 numPrimary
Definition:
RendererKernels.hpp:48
FW::CountHitsInput
Definition:
RendererKernels.hpp:72
DLLImports.hpp
FW::ReconstructInput::isPathTraced
bool isPathTraced
Definition:
RendererKernels.hpp:53
FW::ReconstructInput::triShadedColor
CUdeviceptr triShadedColor
Definition:
RendererKernels.hpp:59
FW::ReconstructInput::primarySlotToID
CUdeviceptr primarySlotToID
Definition:
RendererKernels.hpp:54
FW::ReconstructInput::matId
CUdeviceptr matId
Definition:
RendererKernels.hpp:66
FW::CountHitsInput::raysPerThread
S32 raysPerThread
Definition:
RendererKernels.hpp:76
src
rt
cuda
RendererKernels.hpp
Generated on Wed Dec 10 2014 14:36:53 for NTrace by
1.8.6