From ed8d6da5f42e5f4f1df33a7779c4216cb77f8e53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=91=D1=80=D0=B0=D0=BD=D0=B8=D0=BC=D0=B8=D1=80=20=D0=9A?= =?UTF-8?q?=D0=B0=D1=80=D0=B0=D1=9F=D0=B8=D1=9B?= Date: Thu, 25 Aug 2022 21:12:09 -0700 Subject: [PATCH] Cleanup. --- examples/47-pixelformats/pixelformats.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/examples/47-pixelformats/pixelformats.cpp b/examples/47-pixelformats/pixelformats.cpp index 0aa2a23d7..8cfdcc598 100644 --- a/examples/47-pixelformats/pixelformats.cpp +++ b/examples/47-pixelformats/pixelformats.cpp @@ -576,12 +576,11 @@ public: if (bgfx::isValid(m_checkerboard) ) { static int64_t timeOffset = bx::getHPCounter(); - const float time = m_animate - ? float( (bx::getHPCounter()-timeOffset)/double(bx::getHPFrequency() ) ) - : 0.0f - ; - const float xx = bx::sin(time * 0.17f); - const float yy = bx::cos(time * 0.13f); + const float time = float( (bx::getHPCounter()-timeOffset)/double(bx::getHPFrequency() ) ); + const float animate = float(m_animate)*0.5f; + const float xx = bx::sin(time * 0.37f) * animate; + const float yy = bx::cos(time * 0.43f) * animate; + const float uTile = bx::max(1.0f, previewSize.x / kCheckerboardSize); const float vTile = bx::max(1.0f, previewSize.y / kCheckerboardSize);