Skip to content

Commit b609179

Browse files
znowu w zyciu mi nie wyszlo
1 parent 0afd2fa commit b609179

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

include/nbl/builtin/hlsl/path_tracing/unidirectional.hlsl

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -185,16 +185,17 @@ struct Unidirectional
185185
// bounces
186186
// note do 1-based indexing because we expect first dimension was consumed to generate the ray
187187
bool continuePath = true;
188+
bool notMissed = true;
188189
for (uint16_t d = 1; (d <= maxDepth) && continuePath; d++)
189190
{
190191
ray.setT(numeric_limits<scalar_type>::max);
191192
closest_hit_type intersection = intersector_type::traceClosestHit(scene, ray);
192193

193-
continuePath = intersection.foundHit();
194-
if (continuePath)
194+
notMissed = intersection.foundHit();
195+
if (notMissed)
195196
continuePath = closestHitProgram(d==maxDepth, d, sampleIndex, ray, intersection);
196197
}
197-
if (continuePath)
198+
if (!notMissed)
198199
missProgram(ray);
199200

200201
const uint32_t sampleCount = sampleIndex + 1;

0 commit comments

Comments
 (0)