author | Wuzzy <almikes@aol.com> |
Tue, 04 Apr 2017 21:17:02 +0200 | |
changeset 12162 | e837912ba85d |
parent 11800 | 2028bd2a6c5b |
child 12884 | 286e170f4f6b |
permissions | -rw-r--r-- |
11800 | 1 |
precision mediump float; |
2 |
||
8334
abb48dd39e26
Added shaders and -GL2 option
Michael Hartman <omh1280@gmail.com>
parents:
diff
changeset
|
3 |
uniform sampler2D tex0; |
abb48dd39e26
Added shaders and -GL2 option
Michael Hartman <omh1280@gmail.com>
parents:
diff
changeset
|
4 |
uniform vec4 tint; |
abb48dd39e26
Added shaders and -GL2 option
Michael Hartman <omh1280@gmail.com>
parents:
diff
changeset
|
5 |
uniform bool enableTexture; |
abb48dd39e26
Added shaders and -GL2 option
Michael Hartman <omh1280@gmail.com>
parents:
diff
changeset
|
6 |
|
abb48dd39e26
Added shaders and -GL2 option
Michael Hartman <omh1280@gmail.com>
parents:
diff
changeset
|
7 |
varying vec2 tex; |
abb48dd39e26
Added shaders and -GL2 option
Michael Hartman <omh1280@gmail.com>
parents:
diff
changeset
|
8 |
|
abb48dd39e26
Added shaders and -GL2 option
Michael Hartman <omh1280@gmail.com>
parents:
diff
changeset
|
9 |
|
abb48dd39e26
Added shaders and -GL2 option
Michael Hartman <omh1280@gmail.com>
parents:
diff
changeset
|
10 |
void main() |
abb48dd39e26
Added shaders and -GL2 option
Michael Hartman <omh1280@gmail.com>
parents:
diff
changeset
|
11 |
{ |
abb48dd39e26
Added shaders and -GL2 option
Michael Hartman <omh1280@gmail.com>
parents:
diff
changeset
|
12 |
if(enableTexture){ |
abb48dd39e26
Added shaders and -GL2 option
Michael Hartman <omh1280@gmail.com>
parents:
diff
changeset
|
13 |
gl_FragColor = texture2D(tex0, tex) * tint; |
abb48dd39e26
Added shaders and -GL2 option
Michael Hartman <omh1280@gmail.com>
parents:
diff
changeset
|
14 |
}else{ |
abb48dd39e26
Added shaders and -GL2 option
Michael Hartman <omh1280@gmail.com>
parents:
diff
changeset
|
15 |
gl_FragColor = tint; |
abb48dd39e26
Added shaders and -GL2 option
Michael Hartman <omh1280@gmail.com>
parents:
diff
changeset
|
16 |
} |
abb48dd39e26
Added shaders and -GL2 option
Michael Hartman <omh1280@gmail.com>
parents:
diff
changeset
|
17 |
} |