This repository has been archived by the owner on Jun 17, 2022. It is now read-only.
-
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.
- Loading branch information
Showing
7 changed files
with
432 additions
and
155 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#version 450 | ||
|
||
layout(location=0) in vec3 v_color; | ||
layout(location=0) out vec4 f_color; | ||
|
||
void main() { | ||
f_color = vec4(v_color, 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 450 | ||
|
||
layout(location=0) in vec3 a_position; | ||
|
||
layout(location=0) out vec3 v_color; | ||
|
||
layout(set=0, binding=0) | ||
uniform Uniforms { | ||
vec3 u_view_position; // unused | ||
mat4 u_view_proj; | ||
}; | ||
|
||
layout(set=1, binding=0) | ||
uniform Light { | ||
vec3 u_position; | ||
vec3 u_color; | ||
}; | ||
|
||
// Let's keep our light smaller than our other objects | ||
float scale = 0.25; | ||
|
||
void main() { | ||
vec3 v_position = a_position * scale + u_position; | ||
gl_Position = u_view_proj * vec4(v_position, 1); | ||
|
||
v_color = u_color; | ||
} |
Oops, something went wrong.