author | nemo |
Mon, 03 Dec 2018 12:43:49 -0500 | |
branch | 0.9.23 |
changeset 14383 | bdf5840863c6 |
parent 11795 | 2028bd2a6c5b |
child 12879 | 286e170f4f6b |
permissions | -rw-r--r-- |
11795 | 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 |
} |