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
de61388f
Commit
de61388f
authored
3 years ago
by
Alex Laptop
Browse files
Options
Downloads
Patches
Plain Diff
[
#114
] Reenabled shadow rescaling to avoid GI bleeding
parent
19313d46
Branches
Branches containing commit
Tags
Tags containing commit
Loading
Pipeline
#27303
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/assets/shaders/shadowMapping.inc
+2
-2
2 additions, 2 deletions
projects/voxelization/assets/shaders/shadowMapping.inc
with
2 additions
and
2 deletions
projects/voxelization/assets/shaders/shadowMapping.inc
+
2
−
2
View file @
de61388f
...
@@ -56,7 +56,7 @@ vec4 unquantizeMoments(vec4 moments){
...
@@ -56,7 +56,7 @@ vec4 unquantizeMoments(vec4 moments){
unquantized
.
g
=
0.125
*
moments
.
g
+
moments
.
a
;
unquantized
.
g
=
0.125
*
moments
.
g
+
moments
.
a
;
unquantized
.
b
=
-
0.75
*
moments
.
r
+
0.75
*
sqrt
(
3
)
*
moments
.
b
;
unquantized
.
b
=
-
0.75
*
moments
.
r
+
0.75
*
sqrt
(
3
)
*
moments
.
b
;
unquantized
.
a
=
-
0.125
*
moments
.
g
+
moments
.
a
;
unquantized
.
a
=
-
0.125
*
moments
.
g
+
moments
.
a
;
return
unquantized
*
0.98
;
return
unquantized
/
0.98
;
// division reduces light bleeding
}
}
float
rescaleRange
(
float
a
,
float
b
,
float
v
)
float
rescaleRange
(
float
a
,
float
b
,
float
v
)
...
@@ -91,7 +91,7 @@ float shadowTest(vec3 worldPos, LightInfo lightInfo, texture2D shadowMap, sample
...
@@ -91,7 +91,7 @@ float shadowTest(vec3 worldPos, LightInfo lightInfo, texture2D shadowMap, sample
float
shadow
=
ComputeMSMShadowIntensity
(
shadowMapSample
,
lightPos
.
z
,
depthBias
,
momentBias
);
float
shadow
=
ComputeMSMShadowIntensity
(
shadowMapSample
,
lightPos
.
z
,
depthBias
,
momentBias
);
return
clamp
(
shadow
,
0
,
1
);
return
clamp
(
shadow
,
0
,
1
);
return
reduceLightBleeding
(
shadow
,
0.1
f
);
//
return reduceLightBleeding(shadow, 0.1f);
}
}
#endif // #ifndef SHADOW_MAPPING_INC
#endif // #ifndef SHADOW_MAPPING_INC
\ 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