-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathnotes.txt
35 lines (27 loc) · 1.72 KB
/
notes.txt
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
Iif a given point (x,y,z) is on the sphere, then x^2+y^2+z^2=R^2.
If the given point (x,y,z) is inside the sphere, then x^2+y^2+z^2<R^2,
and if a given point (x,y,z) is outside the sphere, then x^2+y^2+z^2>R^2.
It gets uglier if the sphere center is at (Cx,Cy,Cz):
(x−Cx)^2+(y−Cy)^2+(z−Cz)^2=r^2
((A+tb)−C)⋅((A+tb)−C)=r^2
which becomes
t^2b⋅b+2tb⋅(A−C)+(A−C)⋅(A−C)−r^2=0
t is only unknown
0 roots of t -> miss
1 root of t -> hits but doesn't 'enter'
2 roots of t -> enter and exit
A functional ray tracing system is implemented by combining four components as described in the following steps:
Create one or more acceleration structures over one or many geometry meshes and instances of these meshes in the scene.
See “Acceleration structures”.
Create a pipeline of programs that contains all programs that will be invoked during a ray tracing launch.
See “Program pipeline creation”.
Create a shader binding table that includes references to these programs and their parameters and choose a data layout
that matches the implicit shader binding table record selection of the instances and geometries in the acceleration
structures.
See “Shader binding table”.
Launch a device-side kernel that will invoke a ray generation program with a multitude of threads calling optixTrace
to begin traversal and the execution of the other programs. See “Ray generation launches”. Device-side functionality
is described in “Device-side functions”.
Ray tracing work can be interleaved with other CUDA work to generate data, move data to and from the device, and move
data to other graphics APIs. It is the application's responsibility to coordinate all work on the GPU. NVIDIA OptiX
does not synchronize with any other work.