TR.Stride icon indicating copy to clipboard operation
TR.Stride copied to clipboard

Buoyancy Crash as a result of IndexOutOfRange in SampleRepeat

Open sandsalamand opened this issue 1 year ago • 0 comments

static Vector4 SampleRepeat(Vector4[] source, int w, int h, int x, int y)
{
    x = x % w;
    y = y & h;

    return source[y * w + x];
}

source has a size of 65536 as a result of the 256 x 256 set in Size, and y * w = 65536

sandsalamand avatar Oct 19 '23 09:10 sandsalamand