File tree 3 files changed +21
-3
lines changed
3 files changed +21
-3
lines changed Original file line number Diff line number Diff line change @@ -4,5 +4,8 @@ optixGlass
4
4
5
5
![ Glass Teapot] ( ./optixGlass.png )
6
6
7
- A physically based glass shader example, using path tracing.
7
+ A physically based glass shader example, using path tracing. Drag the sliders around to change the color of the glass.
8
+
9
+ Scene credit:
10
+ [ Benedikt Bitterli] ( https://benedikt-bitterli.me/resources )
8
11
Original file line number Diff line number Diff line change 5
5
![ VOX scene] ( ./optixVox.png )
6
6
7
7
A sample that renders a subset of the [ MagicaVoxel @ ephtracy] ( https://ephtracy.github.io/ ) 8-bit VOX file format, using path tracing.
8
- This is not volume rendering; "voxels" are solid boxes.
8
+ This is not volume rendering; "voxels" are solid boxes. Give multiple files on the command line to load them all and arrange them in
9
+ a grid.
9
10
10
11
Scene credit:
11
12
[ Mike Judge] ( https://github.com/mikelovesrobots/mmmm )
Original file line number Diff line number Diff line change 27
27
*/
28
28
29
29
30
+ // Intersection and bounds programs for custom box prims as the leaf nodes of a
31
+ // BVH. The boxes are represented as 4 bytes per box (VOX format).
32
+
33
+ // Note:
34
+ // This is a compromise between intersection cost and memory cost: a BVH
35
+ // built over triangles could be faster to intersect, but would use more memory
36
+ // for the leaves (12 triangles per box), while an intersector that handled
37
+ // larger chunks of boxes via 3d grid traversal would be slower but would
38
+ // reduce the size of the BVH. The compromise solution seems fine for a single
39
+ // VOX file (max 256**3 boxes) or a handful of files. The custom 3d grid
40
+ // intersector could be interesting for very large scenes, e.g., Minecraft
41
+ // files, that might have far more than 256**3 boxes.
42
+
43
+
30
44
#include < optix.h>
31
45
#include < optixu/optixu_math_namespace.h>
32
46
#include < optixu/optixu_matrix_namespace.h>
36
50
37
51
using namespace optix ;
38
52
39
- // Compressed 8-bit indices as in VOX format. We expand these into floating point coords during intersection.
53
+ // 8-bit indices as in VOX format. We expand these into floating point coords during intersection.
40
54
rtBuffer< optix::uchar4 > box_buffer;
41
55
42
56
rtBuffer< optix::uchar4 > palette_buffer;
You can’t perform that action at this time.
0 commit comments