Base class code cleanup

This commit is contained in:
Sascha Willems 2024-03-20 07:49:06 +01:00
parent c6cd406c6f
commit 52779a1bd1
4 changed files with 85 additions and 74 deletions

View file

@ -3,7 +3,7 @@
*
* Updated compute shader by Lukas Bergdoll (https://github.com/Voultapher)
*
* Copyright (C) 2016-2023 by Sascha Willems - www.saschawillems.de
* Copyright (C) 2016-2024 by Sascha Willems - www.saschawillems.de
*
* This code is licensed under the MIT license (MIT) (http://opensource.org/licenses/MIT)
*/
@ -553,8 +553,8 @@ public:
}
else
{
float normalizedMx = (mousePos.x - static_cast<float>(width / 2)) / static_cast<float>(width / 2);
float normalizedMy = (mousePos.y - static_cast<float>(height / 2)) / static_cast<float>(height / 2);
float normalizedMx = (mouseState.position.x - static_cast<float>(width / 2)) / static_cast<float>(width / 2);
float normalizedMy = (mouseState.position.y - static_cast<float>(height / 2)) / static_cast<float>(height / 2);
compute.uniformData.destX = normalizedMx;
compute.uniformData.destY = normalizedMy;
}