author | Vittorio Giovara <vittorio.giovara@gmail.com> |
Wed, 04 Nov 2015 16:20:46 +0100 | |
branch | 0.9.22 |
changeset 11348 | 2f812d4513d1 |
parent 8334 | abb48dd39e26 |
child 11317 | 62287d4044e7 |
permissions | -rw-r--r-- |
8334
abb48dd39e26
Added shaders and -GL2 option
Michael Hartman <omh1280@gmail.com>
parents:
diff
changeset
|
1 |
uniform sampler2D tex0; |
abb48dd39e26
Added shaders and -GL2 option
Michael Hartman <omh1280@gmail.com>
parents:
diff
changeset
|
2 |
uniform vec4 tint; |
abb48dd39e26
Added shaders and -GL2 option
Michael Hartman <omh1280@gmail.com>
parents:
diff
changeset
|
3 |
uniform bool enableTexture; |
abb48dd39e26
Added shaders and -GL2 option
Michael Hartman <omh1280@gmail.com>
parents:
diff
changeset
|
4 |
|
abb48dd39e26
Added shaders and -GL2 option
Michael Hartman <omh1280@gmail.com>
parents:
diff
changeset
|
5 |
varying vec2 tex; |
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 |
|
abb48dd39e26
Added shaders and -GL2 option
Michael Hartman <omh1280@gmail.com>
parents:
diff
changeset
|
8 |
void main() |
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 |
if(enableTexture){ |
abb48dd39e26
Added shaders and -GL2 option
Michael Hartman <omh1280@gmail.com>
parents:
diff
changeset
|
11 |
gl_FragColor = texture2D(tex0, tex) * tint; |
abb48dd39e26
Added shaders and -GL2 option
Michael Hartman <omh1280@gmail.com>
parents:
diff
changeset
|
12 |
}else{ |
abb48dd39e26
Added shaders and -GL2 option
Michael Hartman <omh1280@gmail.com>
parents:
diff
changeset
|
13 |
gl_FragColor = tint; |
abb48dd39e26
Added shaders and -GL2 option
Michael Hartman <omh1280@gmail.com>
parents:
diff
changeset
|
14 |
} |
abb48dd39e26
Added shaders and -GL2 option
Michael Hartman <omh1280@gmail.com>
parents:
diff
changeset
|
15 |
} |