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
894ceabb
Commit
894ceabb
authored
3 years ago
by
Alexander Gauggel
Browse files
Options
Downloads
Patches
Plain Diff
[
#70
] Lighting fix
parent
7077401d
No related branches found
No related tags found
1 merge request
!57
Resolve "Basic voxelization"
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
projects/voxelization/resources/shaders/shader.vert
+1
-1
1 addition, 1 deletion
projects/voxelization/resources/shaders/shader.vert
projects/voxelization/src/main.cpp
+1
-1
1 addition, 1 deletion
projects/voxelization/src/main.cpp
with
2 additions
and
2 deletions
projects/voxelization/resources/shaders/shader.vert
+
1
−
1
View file @
894ceabb
...
@@ -16,7 +16,7 @@ layout( push_constant ) uniform constants{
...
@@ -16,7 +16,7 @@ layout( push_constant ) uniform constants{
void
main
()
{
void
main
()
{
gl_Position
=
mvp
*
vec4
(
inPosition
,
1
.
0
);
gl_Position
=
mvp
*
vec4
(
inPosition
,
1
.
0
);
passNormal
=
inNormal
;
passNormal
=
mat3
(
model
)
*
inNormal
;
// assuming no weird stuff like shearing or non-uniform scaling
passUV
=
inUV
;
passUV
=
inUV
;
passPos
=
(
model
*
vec4
(
inPosition
,
1
)).
xyz
;
passPos
=
(
model
*
vec4
(
inPosition
,
1
)).
xyz
;
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
projects/voxelization/src/main.cpp
+
1
−
1
View file @
894ceabb
...
@@ -360,7 +360,7 @@ int main(int argc, const char** argv) {
...
@@ -360,7 +360,7 @@ int main(int argc, const char** argv) {
vulkanCorrectionMatrix
[
3
][
2
]
=
0.5
;
vulkanCorrectionMatrix
[
3
][
2
]
=
0.5
;
projectionLight
=
vulkanCorrectionMatrix
*
projectionLight
;
projectionLight
=
vulkanCorrectionMatrix
*
projectionLight
;
const
glm
::
mat4
viewLight
=
glm
::
lookAt
(
glm
::
vec3
(
0
),
-
lightInfo
.
direction
,
glm
::
vec3
(
0
,
-
1
,
0
));
const
glm
::
mat4
viewLight
=
glm
::
lookAt
(
glm
::
vec3
(
0
),
lightInfo
.
direction
,
glm
::
vec3
(
0
,
-
1
,
0
));
lightInfo
.
lightMatrix
=
projectionLight
*
viewLight
;
lightInfo
.
lightMatrix
=
projectionLight
*
viewLight
;
lightBuffer
.
fill
({
lightInfo
});
lightBuffer
.
fill
({
lightInfo
});
...
...
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