Skip to content

Commit

Permalink
Remove incorrect russion roulette. (#1019)
Browse files Browse the repository at this point in the history
Setting rayDepth to 1 -> light cannot bounce off the ground, thus everything but the sky is black.
Setting rayDepth to 2 -> light can bounce off of the ground/blocks, but cannot bounce off of anything else. Emitters do not work.
Setting rayDepth to 3 -> hey look, torches give off light now!
Setting rayDepth to 4 -> the start of indirect illumination from emitters...
  • Loading branch information
LasaBir authored Aug 3, 2021
1 parent 273394b commit a3af940
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions chunky/src/java/se/llbit/chunky/renderer/scene/Scene.java
Original file line number Diff line number Diff line change
Expand Up @@ -811,12 +811,12 @@ public void updateOpacity(Ray ray) {
}

/**
* Test if the ray should be killed (using Russian Roulette).
* Test if the ray should be killed <strike>(using Russian Roulette)</strike>.
*
* @return {@code true} if the ray needs to die now
*/
public final boolean kill(int depth, Random random) {
return depth >= rayDepth && random.nextDouble() < .5f;
return depth >= rayDepth;
}

/**
Expand Down

0 comments on commit a3af940

Please sign in to comment.