diff --git a/src/etc-internal.h b/src/etc-internal.h index c9bd520..9bab3a8 100644 --- a/src/etc-internal.h +++ b/src/etc-internal.h @@ -61,7 +61,7 @@ struct Vec4 return (x == other.x && y == other.y && z == other.z && w == other.w); } - bool xyzHasEffect() const + bool xyzNotNull() const { return (x != 0.0 || y != 0.0 || z != 0.0); } diff --git a/src/graphics.cpp b/src/graphics.cpp index 5730cfb..74e97a3 100644 --- a/src/graphics.cpp +++ b/src/graphics.cpp @@ -174,7 +174,7 @@ public: const IntRect &viewpRect = glState.scissorBox.get(); const IntRect &screenRect = geometry.rect; - const bool toneRGBEffect = t.xyzHasEffect(); + const bool toneRGBEffect = t.xyzNotNull(); const bool toneGrayEffect = t.w != 0; const bool colorEffect = c.w > 0; const bool flashEffect = f.w > 0; @@ -240,7 +240,7 @@ public: /* Then apply them using hardware blending */ gl.BlendFuncSeparate(GL_ONE, GL_ONE, GL_ZERO, GL_ONE); - if (add.xyzHasEffect()) + if (add.xyzNotNull()) { gl.BlendEquation(GL_FUNC_ADD); shader.setColor(add); @@ -248,7 +248,7 @@ public: screenQuad.draw(); } - if (sub.xyzHasEffect()) + if (sub.xyzNotNull()) { gl.BlendEquation(GL_FUNC_REVERSE_SUBTRACT); shader.setColor(sub);