diff --git a/glm/detail/func_common.inl b/glm/detail/func_common.inl index 59a31d9b..6760b65f 100644 --- a/glm/detail/func_common.inl +++ b/glm/detail/func_common.inl @@ -439,7 +439,13 @@ namespace detail template GLM_FUNC_QUALIFIER genType mod(genType x, genType y) { - return mod(tvec1(x), y).x; +# if GLM_COMPILER & GLM_COMPILER_CUDA + // Another Cuda compiler bug https://github.com/g-truc/glm/issues/530 + tvec1 Result(mod(tvec1(x), y)); + return Result.x; +# else + return mod(tvec1(x), y).x; +# endif } template class vecType>