Why does my image has a square pattern in cuda path tracer?
I managed to fix it. It was indeed related to repeating random sequences.
The problem was the following. curandState* randState is an array of curandStates, and most calls to curand_* require a pointer of a curandState.
I was sending the randState, the array, to curand_* functions and not for example, a pointer of one of its members.
Now most of my images are like this: