| Algorithm 1 G Mode |
| 1: , N = maximum number of guide ray |
| 2: 3: 4: Combinations of hit-triangles 5: Combinations buffer 6: procedure Guide mode ( 7: Step 01: Finds combination of hit-triangles 8: for |
| 9: Set origin position (position of L) and random direction 10: Ray tracing processing () 11: if is valid then 12: Add |
| 13: end if 14: end for 15: Step 02: Sorts and removes duplicate combination of hit-triangles 16: for d = 0 to 3 do // depth loop 17: Merge-sort that have depth d in 18: end for 19: for i = 0 to N − 1, j = 0 to N − 1 do // N is number of combinations 20: if is equal to then 21: 22: else 23: Remove from to 24: 25: 26: end if 27: end for |
| 28: end procedure |