1
0
mirror of https://github.com/Swordfish90/cool-retro-term.git synced 2025-01-18 20:20:45 +00:00

Fix: motion blur depends quadratically on fps and not linearly.

This commit is contained in:
Filippo Scognamiglio 2014-07-26 15:12:38 +02:00
parent 1ca30accf2
commit cb0e94a6e2

View File

@ -39,11 +39,11 @@ Item{
//The blur effect has to take into account the framerate //The blur effect has to take into account the framerate
property int fps: shadersettings.fps !== 0 ? shadersettings.fps : 60 property int fps: shadersettings.fps !== 0 ? shadersettings.fps : 60
property real fpsAttenuation: 60 / fps property real fpsAttenuation: Math.sqrt(60 / fps)
property real mBlur: shadersettings.motion_blur property real mBlur: shadersettings.motion_blur
property real motionBlurCoefficient: (_maxBlurCoefficient * mBlur + _minBlurCoefficient * (1 - mBlur)) property real motionBlurCoefficient: (_maxBlurCoefficient * mBlur + _minBlurCoefficient * (1 - mBlur))
property real _minBlurCoefficient: 0.75 property real _minBlurCoefficient: 0.70
property real _maxBlurCoefficient: 0.95 property real _maxBlurCoefficient: 0.90
property size virtualPxSize: Qt.size(1,1) property size virtualPxSize: Qt.size(1,1)
property size virtual_resolution: Qt.size(width / virtualPxSize.width, height / virtualPxSize.height) property size virtual_resolution: Qt.size(width / virtualPxSize.width, height / virtualPxSize.height)
@ -199,6 +199,8 @@ Item{
recursive: true recursive: true
live: false live: false
hideSource: true
smooth: false smooth: false
antialiasing: false antialiasing: false