Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Low FPS blurs too much #9

Open
Bauxitedev opened this issue Aug 24, 2021 · 2 comments
Open

Low FPS blurs too much #9

Bauxitedev opened this issue Aug 24, 2021 · 2 comments

Comments

@Bauxitedev
Copy link
Owner

If the FPS is low (<40FPS), the blur effect becomes way too strong.

144 FPS:
image

30 FPS:
image

Maybe reduce the intensity depending on the framerate?

@Calinou
Copy link

Calinou commented Apr 22, 2022

If it's exposed as a uniform, it should be possible to adjust the blur intensity automatically depending on the time it took to render the last frame. I'm of the opinion that effects should be as FPS-independent as possible 🙂

For some games, it makes sense to use a stronger motion blur when capping to 30 FPS. That said, this is better done with a setting exposed to the player (which would become a multiplier of this automatic FPS-based intensity).

@Donitzo
Copy link

Donitzo commented Nov 3, 2024

What I specifically did, and I'm not saying this is correct, is that I scaled the angular velocity of the camera based on the framerate. At least in my case that made the blur be fairly consistent based on a reference framerate of 140:

var quat:Quaternion = Quaternion(_camera.global_transform.basis)
var diff:Quaternion = quat - _last_camera_rotation
_last_camera_rotation = quat
var velocity:Quaternion = (diff * 2.0) * Quaternion(-quat.x, -quat.y, -quat.z, quat.w);

var velocity_scale:float = min(1 / delta / 140, 1)

_postprocessor_material.set_shader_parameter('camera_angular_velocity', Vector3(
    velocity.x * velocity_scale, 
    velocity.y * velocity_scale, 
    velocity.z * velocity_scale))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants