File tree Expand file tree Collapse file tree
include/nbl/builtin/hlsl/path_tracing Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -106,6 +106,7 @@ NBL_CONCEPT_END(
106106 ((NBL_CONCEPT_REQ_EXPR_RET_TYPE)((closest_hit.getObjectID ()), ::nbl::hlsl::is_same_v, typename T::object_handle_type))
107107 ((NBL_CONCEPT_REQ_EXPR_RET_TYPE)((closest_hit.getPosition ()), ::nbl::hlsl::is_same_v, typename T::vector3_type))
108108 ((NBL_CONCEPT_REQ_EXPR_RET_TYPE)((closest_hit.getInteraction ()), ::nbl::hlsl::is_same_v, typename T::interaction_type))
109+ ((NBL_CONCEPT_REQ_EXPR_RET_TYPE)((closest_hit.getGeometricNormal ()), ::nbl::hlsl::is_same_v, typename T::vector3_type))
109110);
110111#undef closest_hit
111112#include <nbl/builtin/hlsl/concepts/__end.hlsl>
Original file line number Diff line number Diff line change @@ -127,7 +127,7 @@ struct Unidirectional
127127 nee_ray.init (origin, direction);
128128 nee_ray.template setInteraction<anisotropic_interaction_type>(interaction);
129129 nee_ray.setT (t);
130- tolerance_method_type::template adjust<ray_type>(nee_ray, direction , depth);
130+ tolerance_method_type::template adjust<ray_type>(nee_ray, intersectData. getGeometricNormal () , depth);
131131 if (getLuma (neeContrib.quotient) > lumaContributionThreshold)
132132 ray.addPayloadContribution (neeContrib.quotient * intersector_type::traceShadowRay (scene, nee_ray, ret.getLightObjectID ()));
133133 }
@@ -164,8 +164,7 @@ struct Unidirectional
164164 vector3_type direction = bxdfSample;
165165 ray.init (origin, direction);
166166 ray.template setInteraction<anisotropic_interaction_type>(interaction);
167- ray.setT (1.0 /*kSceneSize*/ );
168- tolerance_method_type::template adjust<ray_type>(ray, direction, depth);
167+ tolerance_method_type::template adjust<ray_type>(ray, intersectData.getGeometricNormal (), depth);
169168
170169 return true ;
171170 }
You can’t perform that action at this time.
0 commit comments