Commit 1273dc0e authored by Johannes Maul's avatar Johannes Maul
Browse files

Small Timemeasurement + disabled DebugValues

parent d64f21a3
......@@ -41,8 +41,9 @@ function easyExample(exampleType, buildDefault)
% faces(:,4) = faces(:,4) - 1; %currently non dynamic labels
% nodes(:,1:2) = nodes(:,1:2) +10;
end
[projection,debug, debugMiss, profiling] = nv_ray_tracing_basic(detectorPositionCoordinates, faces, nodes, source, detectorSizeUint,attenuationCoefficentValues' ); %parameters always in this order
tic;
[projection, profiling] = nv_ray_tracing_basic(detectorPositionCoordinates, faces, nodes, source, detectorSizeUint,attenuationCoefficentValues' ); %parameters always in this order
toc;
times = reformatProfile(profiling);
% debugMissFormated = reshape(debugMiss,[200 detectorSizeUint(1) detectorSizeUint(2)]);
projectionAsImage = reshape(projection,detectorSizeUint);
......
......@@ -56,7 +56,7 @@ void main()
{
uint n = uint(rayPayload.hitCounter - mod(rayPayload.hitCounter, 2)); //Abschnitt getestet, indem verglichen mit Matlab. Bei Ungleichheit stop. Kein Stop => ERg = gleich
debug.values[rayPayload.outputId] = n;
// debug.values[rayPayload.outputId] = n;
if (n > sizeZ )
{
n = sizeZ;
......@@ -148,34 +148,34 @@ void main()
{
// debug.values[rayPayload.outputId+i] += length((finalDistances[i] - finalDistances[i+1]) * rayDir);
// attenuationValue += length((finalDistances[i] - finalDistances[i+1]) * rayDir);
debug.values[rayPayload.outputId+debugCounter] = finalDistances[i];
debugCounter++;
debug.values[rayPayload.outputId+debugCounter] = finalDistances[i+1];
debugCounter++;
debug.values[rayPayload.outputId+debugCounter] = finalFaces[i]-1;
debugCounter++;
// debug.values[rayPayload.outputId+debugCounter] = finalDistances[i];
// debugCounter++;
// debug.values[rayPayload.outputId+debugCounter] = finalDistances[i+1];
// debugCounter++;
// debug.values[rayPayload.outputId+debugCounter] = finalFaces[i]-1;
// debugCounter++;
attenuationValue += length((finalDistances[i] - finalDistances[i+1]) *rayDir) * attCoefDyn.values[finalFaces[i]-1];
debug.values[rayPayload.outputId+debugCounter] = attenuationValue;
debugCounter++;
// debug.values[rayPayload.outputId+debugCounter] = attenuationValue;
// debugCounter++;
//debug.values[rayPayload.outputId+i] = length((finalDistances[i] - finalDistances[i+1]) * rayDir) * attCoef.attCoefVal[finalFaces[i]-1];
}
debug.values[rayPayload.outputId+debugCounter] = attenuationValue * attCoef.attCoefVal.w;
debugCounter++;
debug.values[rayPayload.outputId+4] = attenuationValue * attCoef.attCoefVal.w;
// attenuationValue = exp(float(attenuationValue * attCoef.attCoefVal.w));
debug.values[rayPayload.outputId+debugCounter+1] = attenuationValue;
debugCounter++;
// debug.values[rayPayload.outputId+debugCounter] = attenuationValue * attCoef.attCoefVal.w;
// debugCounter++;
// debug.values[rayPayload.outputId+4] = attenuationValue * attCoef.attCoefVal.w;
//// attenuationValue = exp(float(attenuationValue * attCoef.attCoefVal.w));
// debug.values[rayPayload.outputId+debugCounter+1] = attenuationValue;
// debugCounter++;
// debug.values[rayPayload.outputId] = attenuationValue;
// if(attenuationValue != 0)
// {
attVal.values[attValId] = attenuationValue;
debug.values[rayPayload.outputId + 2] = attVal.values[attValId];
debugCounter++;
// debug.values[rayPayload.outputId + 2] = attVal.values[attValId];
// debugCounter++;
// }
// attVal.values[attValId] = attenuationValue;
// attVal.values[attValId] = 1;
// debug.values[rayPayload.outputId] = attVal.values[attValId];
debug.values[rayPayload.outputId+3] = debugCounter+1;
// debug.values[rayPayload.outputId+3] = debugCounter+1;
}
// debug.values[rayPayload.outputId] = attVal.values[attValId];
......
#version 460
#extension GL_NV_ray_tracing : require
#define debug 0
//#define debug 0
layout(binding = 0, set = 0) uniform accelerationStructureNV topLevelAS;
//layout(binding = 1, set = 0, rgba8) uniform image2D image;
......
#define debug //if this line is commented, you have comment it in the shaders too!
//#define debug //if this line is commented, you have comment it in the shaders too!
#define profile
//#define advancedOutput //fr primitives und 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