Commit 92516fe9 authored by johannes.maul's avatar johannes.maul
Browse files

Update README.md

parent 6c519407
...@@ -145,4 +145,32 @@ In other words, the current algorithm always expects to leave a region after ent ...@@ -145,4 +145,32 @@ In other words, the current algorithm always expects to leave a region after ent
Normaly this double layer exists also for the outer layer but there it has not even the same positions but the same region. With _unique(faces,'rows')_ in Matlab before calling the raytracing kernel these outer layer can be deleted. Normaly this double layer exists also for the outer layer but there it has not even the same positions but the same region. With _unique(faces,'rows')_ in Matlab before calling the raytracing kernel these outer layer can be deleted.
## Extended debug data ## Extended debug data
The implementation offers advanced debug output. Therefore the comments in the first line in nv_ray_tracing_basic.cpp and the 4th line in raygen.rgen has to be uncommented. Both lines descriping #define debug. Then the call from the kernel changes to
```matlab
[attenuationValues, debugGen,debugMiss,profiling] = nv_ray_tracing_basic(detectorPositionCoordinates, faces, nodes, source, detectorSizeUint,attenuationCoefficentValues);
times = reformatProfile(profiling);
```
The variable _debugGen_ contains the debug data from the raygen shader.
The variable _debugMiss_ contains the debug data from the miss shader.
The debug data from _debugGen_ is already implemented, comes as a linear buffer and gives data for ray generated (size of detector), to see the correct values use _debugGen = reshape(debugGen, [18 detectorSizeUint]);_. The output data is:
* debugData.debugValues[debugId + 0 ] = gl_LaunchSizeNV.x;
* debugData.debugValues[debugId + 1] = gl_LaunchSizeNV.y;
* debugData.debugValues[debugId+ 2 ] = gl_LaunchIDNV.x;
* debugData.debugValues[debugId+ 3 ] = gl_LaunchIDNV.y;
* debugData.debugValues[debugId + 4] = targetXId;
* debugData.debugValues[debugId + 5] = targetYId;
* debugData.debugValues[debugId + 6] = targetZId;
* debugData.debugValues[debugId + 7] = target.x;
* debugData.debugValues[debugId + 8] = target.y;
* debugData.debugValues[debugId + 9] = target.z;
* debugData.debugValues[debugId + 10] = origin.x;
* debugData.debugValues[debugId + 11] = origin.y;
* debugData.debugValues[debugId + 12] = origin.z;
* debugData.debugValues[debugId + 13] = direction.x;
* debugData.debugValues[debugId + 14] = direction.y;
* debugData.debugValues[debugId + 15] = direction.z;
* debugData.debugValues[debugId + 16] = rayId;
* debugData.debugValues[debugId + 17] = rayPayload.outputId;
The variable _debugMiss_ can be filled by own needs. You implement some comments in the miss shader, e.g. _debug.values[rayPayload.outputId] = n;_. <br>
It has the same size then _debugGen_ so for each ray, but it has a depth of 200 by default. so the command would be _debugMiss = reshape(debugMiss, [200 detectorSizeUint]);_ to get proper results. Overall it can be used to see which triangles got hit or with which distances.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment