diff --git a/src/NoteField.cpp b/src/NoteField.cpp index 55f8b2e7c7..5f577cd9f5 100644 --- a/src/NoteField.cpp +++ b/src/NoteField.cpp @@ -867,7 +867,15 @@ void NoteField::DrawPrimitives() ASSERT(GAMESTATE->m_pCurSong != nullptr); const TimingData &timing = *pTiming; - const RageColor text_glow= RageColor(1,1,1,std::cos(RageTimer::GetTimeSinceStartFast()*2)/2+0.5f); + + // Create an oscillating / pulsing glow effect. + // Converts a counter to radians and uses the cosine for a cyclic appearance. + static std::uint_fast16_t iGlowCounter; + static constexpr float fCyclical = 2.0f * 3.14159265f / 360.0f; + iGlowCounter = (iGlowCounter + 1) % 360; + float phase = iGlowCounter * fCyclical; + float glow = std::cos(phase) * 0.5f + 0.5f; + const RageColor text_glow = RageColor(1.0f, 1.0f, 1.0f, glow); float horiz_align= align_right; float side_sign= 1;