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
b0eb31c1
Commit
b0eb31c1
authored
3 years ago
by
Alexander Gauggel
Browse files
Options
Downloads
Patches
Plain Diff
[
#82
] Make lens dirt energy conserving
parent
65a5a19f
No related branches found
No related tags found
1 merge request
!70
Resolve "Voxel cone tracing"
Pipeline
#26063
failed
3 years ago
Stage: build
Stage: deploy
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
projects/voxelization/resources/shaders/bloomFlaresComposite.comp
+10
-3
10 additions, 3 deletions
.../voxelization/resources/shaders/bloomFlaresComposite.comp
with
10 additions
and
3 deletions
projects/voxelization/resources/shaders/bloomFlaresComposite.comp
+
10
−
3
View file @
b0eb31c1
...
@@ -41,7 +41,14 @@ float getLensDirtWeight(vec2 uv){
...
@@ -41,7 +41,14 @@ float getLensDirtWeight(vec2 uv){
uv.x *= targetAspectRatio / dirtAspectRatio;
uv.x *= targetAspectRatio / dirtAspectRatio;
float dirt = texture(sampler2D(dirtTexture, radialLUTSampler), uv).r;
float dirt = texture(sampler2D(dirtTexture, radialLUTSampler), uv).r;
float dirtStrength = 0.75;
float dirtStrength = 0.4f;
// manually looked up in gimp, must be adjusted when changing dirt texture
float dirtMean = 0.132;
// make sure no energy is lost
// otherwise bloom is darkened when the dirt increases
dirt /= dirtMean;
return mix(1, dirt, dirtStrength);
return mix(1, dirt, dirtStrength);
}
}
...
@@ -62,8 +69,8 @@ void main()
...
@@ -62,8 +69,8 @@ void main()
vec3 main_color = imageLoad(colorBuffer, pixel_coord).rgb;
vec3 main_color = imageLoad(colorBuffer, pixel_coord).rgb;
// composite blur and lens features
// composite blur and lens features
float bloom_weight = 0.
15
f;
float bloom_weight = 0.
06
f;
float lens_weight = 0.
15
f;
float lens_weight = 0.
02
f;
float main_weight = 1 - (bloom_weight + lens_weight);
float main_weight = 1 - (bloom_weight + lens_weight);
lens_color *= starburst(UV);
lens_color *= starburst(UV);
...
...
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