Skip to content

Commit 500272c

Browse files
author
Tom Clabault
committed
Some fixes for the ReGIR blog post
1 parent 0940342 commit 500272c

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

_posts/2025-09-26-regir.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -496,7 +496,7 @@ unsigned int custom_regir_hash(float3 world_position, float cell_size, unsigned
496496
497497
The hash function computes both a hash-key 'cell_hash' that will be used to index the hash grid buffer and a checksum that can be used to detect collisions: it can happen that two very different
498498
positions in world space end up yielding the same 'cell_hash', but chances are that the 'checksum' is going to be different, allowing us to detect the collision. If it happens that the checksum
499-
is also the same, that's very unfortunate on top of that, the checksum and we'll end up using the reservoirs of one grid cell to shade another cell in the grid. This is not the end of the world but
499+
is also the same, that's very unfortunate and we'll end up using the reservoirs of one grid cell to shade another cell in the grid. This is not the end of the world but
500500
that's going to increase variance when that happens. 'checksum' uses a full 32-bit unsigned integer however so this situation should happen extremely infrequently. 'cell_hash' on the other hand is
501501
computed modulo 'total_number_of_cells'. This is such that we do not get an index out of the hash function that does not fit in our hash grid buffer ('total_number_of_cells'
502502
is the size of our hash grid buffer, allocated to a fixed size in advance).
@@ -997,7 +997,7 @@ NEE, jitter the shading point position randomly and only then look up which grid
997997
{% include figure.liquid path="assets/img/blogs/regir-many-lights/jittering-grid-cell-artifacts.png" class="img-fluid rounded z-depth-1" zoomable=true %}
998998
</div>
999999
<div class="caption">
1000-
Jittering the NEE shading point before running it through the hash function to get the grid cell reduces grid cells artifacts, not just in high lighting frequency areas.
1000+
Jittering the NEE shading point before running it through the hash function to get the grid cell reduces grid cells artifacts, not just in high lighting frequency areas. Left is with jittering, right is without.
10011001
</div>
10021002

10031003
Grid cells artifacts are massively reduced and the image looks much cleaner.

0 commit comments

Comments
 (0)