-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
REVIEWED: skinning shader for GLSL 100 #4412
- Loading branch information
Showing
2 changed files
with
26 additions
and
20 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 |
---|---|---|
@@ -1,17 +1,20 @@ | ||
#version 100 | ||
|
||
// Input vertex attributes (from vertex shader) | ||
in vec2 fragTexCoord; | ||
in vec4 fragColor; | ||
precision mediump float; | ||
|
||
// Output fragment color | ||
out vec4 finalColor; | ||
// Input vertex attributes (from vertex shader) | ||
varying vec2 fragTexCoord; | ||
varying vec4 fragColor; | ||
|
||
// Input uniform values | ||
uniform sampler2D texture0; | ||
uniform vec4 colDiffuse; | ||
|
||
void main() | ||
{ | ||
// Fetch color from texture sampler | ||
vec4 texelColor = texture(texture0, fragTexCoord); | ||
finalColor = texelColor*colDiffuse*fragColor; | ||
|
||
// Calculate final fragment color | ||
gl_FragColor = texelColor*colDiffuse*fragColor; | ||
} |
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