-
Notifications
You must be signed in to change notification settings - Fork 156
Open
Description
Hello,
I found an issue in the tutorial: The calculations to be added to the closest hit shader do not indicate the actual out value at the end of the code block.
So this block:
// Vector toward the light
vec3 L;
float lightIntensity = pcRay.lightIntensity;
float lightDistance = 100000.0;
// Point light
if(pcRay.lightType == 0)
{
vec3 lDir = pcRay.lightPosition - worldPos;
lightDistance = length(lDir);
lightIntensity = pcRay.lightIntensity / (lightDistance * lightDistance);
L = normalize(lDir);
}
else // Directional light
{
L = normalize(pcRay.lightPosition);
}
should be extended with:
float dotNL = max(dot(worldNrm, L), 0.2);
prd.hitValue = vec3(dotNL);
There is also a weird sentence in the middle of the chapter that should be cleaned up: Those matrices are compute using the information provided we we set the TLAS and BLAS.
Cheers!
Metadata
Metadata
Assignees
Labels
No labels