Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
VkCV Framework
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Vulkan2021
VkCV Framework
Commits
a82d4018
Commit
a82d4018
authored
3 years ago
by
Alexander Gauggel
Browse files
Options
Downloads
Patches
Plain Diff
[
#106
] Reduce motion blur artifacts when using mouse at high fraerate
parent
7a78a501
No related branches found
No related tags found
1 merge request
!89
Resolve "Indirect Dispatch"
Pipeline
#26748
passed
3 years ago
Stage: build
Stage: deploy
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
projects/indirect_dispatch/src/App.cpp
+8
-1
8 additions, 1 deletion
projects/indirect_dispatch/src/App.cpp
projects/indirect_dispatch/src/AppConfig.hpp
+2
-2
2 additions, 2 deletions
projects/indirect_dispatch/src/AppConfig.hpp
with
10 additions
and
3 deletions
projects/indirect_dispatch/src/App.cpp
+
8
−
1
View file @
a82d4018
...
@@ -290,7 +290,14 @@ void App::run() {
...
@@ -290,7 +290,14 @@ void App::run() {
const
float
microsecondToSecond
=
0.000001
;
const
float
microsecondToSecond
=
0.000001
;
const
float
fDeltatimeSeconds
=
microsecondToSecond
*
std
::
chrono
::
duration_cast
<
std
::
chrono
::
microseconds
>
(
frameEndTime
-
frameStartTime
).
count
();
const
float
fDeltatimeSeconds
=
microsecondToSecond
*
std
::
chrono
::
duration_cast
<
std
::
chrono
::
microseconds
>
(
frameEndTime
-
frameStartTime
).
count
();
const
float
motionBlurMotionFactor
=
1
/
(
fDeltatimeSeconds
*
cameraShutterSpeedInverse
);
// small mouse movements are restricted to pixel level and therefore quite unprecise
// therefore extrapolating movement at high framerates results in big jerky movements
// this results in wide sudden motion blur, which looks quite bad
// as a workaround the time scale is limited to a maximum value
const
float
motionBlurTimeScaleMax
=
1.
f
/
60
;
const
float
deltaTimeMotionBlur
=
std
::
max
(
fDeltatimeSeconds
,
motionBlurTimeScaleMax
);
const
float
motionBlurMotionFactor
=
1
/
(
deltaTimeMotionBlur
*
cameraShutterSpeedInverse
);
vkcv
::
PushConstants
motionBlurPushConstants
(
sizeof
(
float
)
*
2
);
vkcv
::
PushConstants
motionBlurPushConstants
(
sizeof
(
float
)
*
2
);
...
...
This diff is collapsed.
Click to expand it.
projects/indirect_dispatch/src/AppConfig.hpp
+
2
−
2
View file @
a82d4018
...
@@ -5,6 +5,6 @@ namespace AppConfig{
...
@@ -5,6 +5,6 @@ namespace AppConfig{
const
int
defaultWindowWidth
=
1280
;
const
int
defaultWindowWidth
=
1280
;
const
int
defaultWindowHeight
=
720
;
const
int
defaultWindowHeight
=
720
;
const
vk
::
Format
depthBufferFormat
=
vk
::
Format
::
eD32Sfloat
;
const
vk
::
Format
depthBufferFormat
=
vk
::
Format
::
eD32Sfloat
;
const
vk
::
Format
colorBufferFormat
=
vk
::
Format
::
eB10G11R11UfloatPack32
;
const
vk
::
Format
colorBufferFormat
=
vk
::
Format
::
eB10G11R11UfloatPack32
;
const
vk
::
Format
motionBufferFormat
=
vk
::
Format
::
eR16G16Sfloat
;
const
vk
::
Format
motionBufferFormat
=
vk
::
Format
::
eR16G16Sfloat
;
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment