-
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.
3: Get a texture loaded. The texture coordinate buffer is not complet…
…ed yet.
- Loading branch information
1 parent
694ea9f
commit 5b0ca19
Showing
10 changed files
with
134 additions
and
38 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
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
.../Playground/Resources/Shaders/vertex.glsl → ...d/Resources/Shaders/Scanlines/vertex.glsl
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
19 changes: 19 additions & 0 deletions
19
examples/Playground/Resources/Shaders/Texture/fragment.glsl
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,19 @@ | ||
#version 330 core | ||
|
||
in vec2 out_texture_coordinate; | ||
|
||
out vec4 out_frag_color; | ||
|
||
uniform vec2 in_viewport; | ||
uniform sampler2D in_texture; | ||
|
||
void main() | ||
{ | ||
// out_frag_color = texture(in_texture, TexCoord) | ||
out_frag_color = vec4( | ||
1.0f - out_texture_coordinate.x, | ||
1.0f - out_texture_coordinate.y, | ||
0.0f, | ||
1.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#version 330 core | ||
|
||
layout (location = 0) in vec3 in_position; // the in_position variable has attribute position 0 | ||
layout (location = 1) in vec2 in_tex_coordinate; // the in_tex_coordinate variable has attribute position 1 | ||
|
||
out vec2 out_texture_coordinate; | ||
|
||
void main() | ||
{ | ||
gl_Position = vec4(in_position.x, in_position.y, in_position.z, 1.0); | ||
out_texture_coordinate = in_tex_coordinate; | ||
} |
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