Fix a bug in the morton_index function

This commit is contained in:
Luke Benstead 2019-03-11 09:12:48 +00:00
parent a561fd469f
commit 8f26e9c364

View File

@ -768,7 +768,7 @@ static inline GLuint morton_1by1(GLuint x) {
} }
static inline GLuint morton_index(GLuint x, GLuint y) { static inline GLuint morton_index(GLuint x, GLuint y) {
return (morton_1by1(y) << 1) + morton_1by1(x); return (morton_1by1(y) << 1) | morton_1by1(x);
} }
void APIENTRY glTexImage2D(GLenum target, GLint level, GLint internalFormat, void APIENTRY glTexImage2D(GLenum target, GLint level, GLint internalFormat,