mirror of
https://github.com/Ttanasart-pt/Pixel-Composer.git
synced 2024-11-15 06:53:59 +01:00
13 lines
284 B
Plaintext
13 lines
284 B
Plaintext
|
varying vec2 v_vTexcoord;
|
||
|
varying vec4 v_vColour;
|
||
|
|
||
|
uniform vec2 dimension;
|
||
|
uniform vec2 threshold;
|
||
|
|
||
|
void main() {
|
||
|
vec4 c = texture2D( gm_BaseTexture, v_vTexcoord );
|
||
|
float a = (c.r + c.g + c.b) / 3.;
|
||
|
|
||
|
gl_FragColor = vec4(vec3(smoothstep(threshold[0], threshold[1], a)), 1.);
|
||
|
}
|