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
26d7b83f
Commit
26d7b83f
authored
3 years ago
by
Alexander Gauggel
Browse files
Options
Downloads
Patches
Plain Diff
[
#82
] Reduce shadow swimming on movement
parent
0a9a1156
No related branches found
No related tags found
1 merge request
!70
Resolve "Voxel cone tracing"
Pipeline
#26012
passed
3 years ago
Stage: build
Stage: deploy
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
projects/voxelization/src/ShadowMapping.cpp
+4
-0
4 additions, 0 deletions
projects/voxelization/src/ShadowMapping.cpp
with
4 additions
and
0 deletions
projects/voxelization/src/ShadowMapping.cpp
+
4
−
0
View file @
26d7b83f
...
...
@@ -115,6 +115,10 @@ glm::mat4 computeShadowViewProjectionMatrix(
getMinMaxView
(
voxelVolumeCorners
);
glm
::
vec3
scale
=
glm
::
vec3
(
2
)
/
(
maxView
-
minView
);
// rotationaly invariant to avoid swimming when moving camera
scale
=
glm
::
vec3
(
glm
::
max
(
glm
::
max
(
scale
.
x
,
scale
.
y
),
scale
.
z
));
glm
::
vec3
offset
=
-
0.5
f
*
(
maxView
+
minView
)
*
scale
;
glm
::
mat4
crop
(
1
);
...
...
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