mirror of
https://github.com/Ttanasart-pt/Pixel-Composer.git
synced 2024-11-11 04:54:06 +01:00
19 lines
381 B
Plaintext
19 lines
381 B
Plaintext
|
//
|
||
|
// Simple passthrough fragment shader
|
||
|
//
|
||
|
varying vec2 v_vTexcoord;
|
||
|
varying vec4 v_vColour;
|
||
|
|
||
|
uniform float black;
|
||
|
uniform float white;
|
||
|
|
||
|
void main() {
|
||
|
vec4 col = v_vColour * texture2D( gm_BaseTexture, v_vTexcoord );
|
||
|
|
||
|
col.r = (col.r - black) / (white - black);
|
||
|
col.g = (col.g - black) / (white - black);
|
||
|
col.b = (col.b - black) / (white - black);
|
||
|
|
||
|
gl_FragColor = col;
|
||
|
}
|