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
1c616e18
Commit
1c616e18
authored
3 years ago
by
Alexander Gauggel
Browse files
Options
Downloads
Patches
Plain Diff
[
#82
] Slightly adjust lense flare feature generation
parent
80059ef8
No related branches found
No related tags found
1 merge request
!70
Resolve "Voxel cone tracing"
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
projects/voxelization/resources/shaders/lensFlares.comp
+4
-8
4 additions, 8 deletions
projects/voxelization/resources/shaders/lensFlares.comp
with
4 additions
and
8 deletions
projects/voxelization/resources/shaders/lensFlares.comp
+
4
−
8
View file @
1c616e18
...
...
@@ -12,7 +12,7 @@ vec3 sampleColorChromaticAberration(vec2 _uv)
vec2 toCenter = (vec2(0.5) - _uv);
vec3 colorScales = vec3(-1, 0, 1);
float aberrationScale = 0.1;
float aberrationScale = 0.1
5
;
vec3 scaleFactors = colorScales * aberrationScale;
float r = texture(sampler2D(blurBuffer, linearSampler), _uv + toCenter * scaleFactors.r).r;
...
...
@@ -26,7 +26,7 @@ vec3 ghost_vectors(vec2 _uv)
{
vec2 ghost_vec = (vec2(0.5f) - _uv);
const uint c_ghost_count =
64
;
const uint c_ghost_count =
8
;
const float c_ghost_spacing = length(ghost_vec) / c_ghost_count;
ghost_vec *= c_ghost_spacing;
...
...
@@ -55,7 +55,7 @@ vec3 halo(vec2 _uv)
{
const float c_aspect_ratio = float(imageSize(lensBuffer).x) / float(imageSize(lensBuffer).y);
const float c_radius = 0.6f;
const float c_halo_thickness = 0.
1
f;
const float c_halo_thickness = 0.
08
f;
vec2 halo_vec = vec2(0.5) - _uv;
//halo_vec.x /= c_aspect_ratio;
...
...
@@ -75,11 +75,7 @@ vec3 halo(vec2 _uv)
float distance_to_border = c_halo_thickness - distance_to_halo;
halo_weight = distance_to_border / c_halo_thickness;
//halo_weight = clamp((halo_weight / 0.4f), 0.0f, 1.0f);
halo_weight = pow(halo_weight, 2.0f);
//halo_weight = 1.0f;
halo_weight = pow(clamp(halo_weight + 0.1, 0, 1), 2);
}
return sampleColorChromaticAberration(_uv + halo_vec) * halo_weight;
...
...
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