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
Merge requests
!70
Resolve "Voxel cone tracing"
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Resolve "Voxel cone tracing"
82-voxel-cone-tracing
into
develop
Overview
7
Commits
95
Pipelines
67
Changes
1
Merged
Ghost User
requested to merge
82-voxel-cone-tracing
into
develop
3 years ago
Overview
7
Commits
95
Pipelines
67
Changes
1
Expand
Closes
#82 (closed)
Edited
3 years ago
by
Tobias Frisch
0
0
Merge request reports
Viewing commit
5b76744d
Prev
Next
Show latest version
1 file
+
6
−
6
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
5b76744d
[
#82
] Minor shader adjustments
· 5b76744d
Alexander Gauggel
authored
3 years ago
projects/voxelization/resources/shaders/shader.frag
+
6
−
6
Options
@@ -40,11 +40,11 @@ vec3 cookTorrance(vec3 f0, float r, vec3 N, vec3 V, vec3 L){
float
NoL
=
clamp
(
dot
(
N
,
L
),
0
,
1
);
float
NoV
=
clamp
(
abs
(
dot
(
N
,
V
)),
0
,
1
);
// abs to account for wrong visibility caused by normal mapping
vec3
F
=
fresnelSchlick
(
NoH
,
f0
);
float
D
=
GGXDistribution
(
r
,
NoH
);
float
G
=
GGXSmithShadowing
(
r
,
NoV
,
NoL
);
vec3
F
=
fresnelSchlick
(
NoH
,
f0
);
float
D
=
GGXDistribution
(
r
,
NoH
);
float
G
=
GGXSmithShadowing
(
r
,
NoV
,
NoL
);
return
(
F
*
D
*
G
)
/
max
(
4
*
NoV
*
NoL
,
0
.
0000
0
1
);
return
(
F
*
D
*
G
)
/
max
(
4
*
NoV
*
NoL
,
0
.
00001
);
}
float
roughnessToConeAngleDegree
(
float
r
){
@@ -75,8 +75,8 @@ void main() {
vec3
B
=
cross
(
N_geo
,
T
)
*
passTangent
.
w
;
mat3
TBN
=
mat3
(
T
,
B
,
N_geo
);
normalTexel
=
normalTexel
*
2
-
1
;
vec3
N
=
TBN
*
normalTexel
;
vec3
N
=
normalize
(
TBN
*
normalTexel
)
;
vec3
L
=
lightInfo
.
L
;
vec3
V
=
normalize
(
cameraPos
-
passPos
);
Loading