-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Working MeshLoading Sample (#3) Working MeshLoading Sample * Fix vertex shader matrices calulcation * PR changes : Added comments, refactored macro for tinyobjloader
- Loading branch information
Showing
11 changed files
with
184 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#version 460 core | ||
|
||
in vec3 vColor; | ||
in vec3 vNormal; | ||
|
||
out vec4 outColor; | ||
|
||
void main() | ||
{ | ||
outColor = vec4(vNormal, 1.0); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#version 460 core | ||
|
||
layout(std140, binding = 0) uniform Matrices | ||
{ | ||
mat4 WorldMatrix; | ||
mat4 ViewMatrix; | ||
mat4 ProjMatrix; | ||
}; | ||
|
||
layout(location = 0) in vec3 inPosition; | ||
layout(location = 1) in vec3 inNormal; | ||
layout(location = 2) in vec3 inColor; | ||
|
||
out vec3 vColor; | ||
out vec3 vNormal; | ||
|
||
void main() | ||
{ | ||
vec4 position = vec4(inPosition, 1.0); | ||
position = WorldMatrix * position; | ||
position = ViewMatrix * position; | ||
position = ProjMatrix * position; | ||
|
||
gl_Position = position; | ||
vNormal = inNormal; | ||
vColor = inColor; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters