mirror of
https://github.com/TheRedShip/RT_GPU.git
synced 2025-09-28 02:58:35 +02:00
+ | Pixelisation when moving
This commit is contained in:
@ -117,6 +117,11 @@ GPUCamera Camera::getGPUData()
|
||||
return (data);
|
||||
}
|
||||
|
||||
float Camera::getVelocity()
|
||||
{
|
||||
return (glm::length(_velocity));
|
||||
}
|
||||
|
||||
void Camera::setPosition(glm::vec3 position)
|
||||
{
|
||||
_position = position;
|
||||
|
@ -162,3 +162,13 @@ int Window::getFrameCount(void) const
|
||||
{
|
||||
return (_frameCount);
|
||||
}
|
||||
|
||||
int Window::getPixelisation(void)
|
||||
{
|
||||
bool mouse = glfwGetMouseButton(_window, GLFW_MOUSE_BUTTON_RIGHT) == GLFW_PRESS;
|
||||
bool movement = _scene->getCamera()->getVelocity() > 0.0f;
|
||||
|
||||
if (mouse || movement)
|
||||
return (1);
|
||||
return (0);
|
||||
}
|
Reference in New Issue
Block a user