-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
HAH look at this monke
- Loading branch information
Showing
14 changed files
with
191 additions
and
79 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,23 @@ | ||
#version 460 core | ||
|
||
layout(location = 0) in vec3 a_VertexPos; | ||
layout(location = 0) in vec3 a_Pos; | ||
layout(location = 1) in vec2 a_TexUV; | ||
layout(location = 2) in vec3 a_Normal; | ||
|
||
layout(location = 0) out VS_OUT { | ||
vec2 v_TexCoords; | ||
float v_Shading; | ||
} vs_Out; | ||
|
||
layout(std140, binding = 0) uniform u_Camera { | ||
mat4 u_CameraTransforms; | ||
vec4 u_CameraPos; | ||
}; | ||
|
||
const vec3 c_Sunlight = normalize(vec3(0.0, 2.0, 1.0)); | ||
|
||
void main(void) { | ||
gl_Position = u_CameraTransforms * vec4(a_VertexPos, 1.0f); | ||
gl_Position = u_CameraTransforms * vec4(a_Pos, 1.0f); | ||
vs_Out.v_TexCoords = a_TexUV; | ||
vs_Out.v_Shading = max(0.4f, (1. + dot(abs(a_Normal), c_Sunlight)) / 2.0f); | ||
} |
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
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
Oops, something went wrong.