NTrace
GPU ray tracing framework
 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 {
40 };
41 
42 //------------------------------------------------------------------------
43 
45 {
49  bool isPrimary;
50  bool isAO;
51  bool isDiffuse;
52  bool isTextured;
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 
73 {
75  CUdeviceptr rayResults; // const RayResult*
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 }
CUdeviceptr triMaterialColor
signed int S32
Definition: Defs.hpp:88