-
Notifications
You must be signed in to change notification settings - Fork 173
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #458 from Hultan/draw_3d
New example: text/draw_3d
- Loading branch information
Showing
2 changed files
with
841 additions
and
0 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,19 @@ | ||
#version 330 | ||
|
||
// Input vertex attributes (from vertex shader) | ||
in vec2 fragTexCoord; | ||
in vec4 fragColor; | ||
|
||
// Input uniform values | ||
uniform sampler2D texture0; | ||
uniform vec4 colDiffuse; | ||
|
||
// Output fragment color | ||
out vec4 finalColor; | ||
|
||
void main() | ||
{ | ||
vec4 texelColor = texture(texture0, fragTexCoord); | ||
if (texelColor.a == 0.0) discard; | ||
finalColor = texelColor * fragColor * colDiffuse; | ||
} |
Oops, something went wrong.