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
a3001dec
Commit
a3001dec
authored
3 years ago
by
Alexander Gauggel
Browse files
Options
Downloads
Patches
Plain Diff
[
#82
] Add missing abs in shader
parent
44555c98
No related branches found
No related tags found
1 merge request
!70
Resolve "Voxel cone tracing"
Pipeline
#25974
passed
3 years ago
Stage: build
Stage: deploy
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
projects/voxelization/resources/shaders/shader.frag
+1
-1
1 addition, 1 deletion
projects/voxelization/resources/shaders/shader.frag
projects/voxelization/resources/shaders/voxelSecondaryBounce.comp
+1
-1
1 addition, 1 deletion
.../voxelization/resources/shaders/voxelSecondaryBounce.comp
with
2 additions
and
2 deletions
projects/voxelization/resources/shaders/shader.frag
+
1
−
1
View file @
a3001dec
...
@@ -91,7 +91,7 @@ void main() {
...
@@ -91,7 +91,7 @@ void main() {
vec3
F_out
=
fresnelSchlick
(
NoV
,
f0
);
vec3
F_out
=
fresnelSchlick
(
NoV
,
f0
);
vec3
diffuse
=
lambertBRDF
(
albedo
)
*
(
1
-
F_in
)
*
(
1
-
F_out
);
vec3
diffuse
=
lambertBRDF
(
albedo
)
*
(
1
-
F_in
)
*
(
1
-
F_out
);
vec3
up
=
N_geo
.
y
>=
0
.
99
?
vec3
(
1
,
0
,
0
)
:
vec3
(
0
,
1
,
0
);
vec3
up
=
abs
(
N_geo
.
y
)
>=
0
.
99
?
vec3
(
1
,
0
,
0
)
:
vec3
(
0
,
1
,
0
);
vec3
right
=
normalize
(
cross
(
up
,
N
));
vec3
right
=
normalize
(
cross
(
up
,
N
));
up
=
cross
(
N
,
right
);
up
=
cross
(
N
,
right
);
mat3
toSurface
=
mat3
(
right
,
up
,
N
);
mat3
toSurface
=
mat3
(
right
,
up
,
N
);
...
...
This diff is collapsed.
Click to expand it.
projects/voxelization/resources/shaders/voxelSecondaryBounce.comp
+
1
−
1
View file @
a3001dec
...
@@ -32,7 +32,7 @@ void main(){
...
@@ -32,7 +32,7 @@ void main(){
float halfVoxelSize = voxelInfo.extent / float(voxelImageSize.x) * 0.5f;
float halfVoxelSize = voxelInfo.extent / float(voxelImageSize.x) * 0.5f;
vec3 pos = voxelCoordinatesToWorldPosition(UV, voxelImageSize.x, voxelInfo, halfVoxelSize);
vec3 pos = voxelCoordinatesToWorldPosition(UV, voxelImageSize.x, voxelInfo, halfVoxelSize);
vec3 up = N.y >= 0.99 ? vec3(1, 0, 0) : vec3(0, 1, 0);
vec3 up =
abs(
N.y
)
>= 0.99 ? vec3(1, 0, 0) : vec3(0, 1, 0);
vec3 right = normalize(cross(up, N));
vec3 right = normalize(cross(up, N));
up = cross(N, right);
up = cross(N, right);
mat3 toSurface = mat3(right, up, N);
mat3 toSurface = mat3(right, up, N);
...
...
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