Pixel-Composer/shaders/sh_level/sh_level.fsh

22 lines
459 B
Text
Raw Normal View History

2022-01-13 05:24:03 +01:00
varying vec2 v_vTexcoord;
varying vec4 v_vColour;
2024-01-21 10:21:38 +01:00
uniform vec2 lw;
uniform vec2 lr;
uniform vec2 lg;
uniform vec2 lb;
uniform vec2 la;
2022-01-13 05:24:03 +01:00
void main() {
vec4 col = v_vColour * texture2D( gm_BaseTexture, v_vTexcoord );
2024-01-21 10:21:38 +01:00
col.r = (col.r - lr.x) / (lr.y - lr.x);
col.g = (col.g - lg.x) / (lg.y - lg.x);
col.b = (col.b - lb.x) / (lb.y - lb.x);
col.a = (col.a - la.x) / (la.y - la.x);
2022-12-27 04:00:50 +01:00
2024-01-21 10:21:38 +01:00
col.rgb = (col.rgb - lw.x) / (lw.y - lw.x);
2022-01-13 05:24:03 +01:00
gl_FragColor = col;
}