Pixel-Composer/shaders/sh_rd_render/sh_rd_render.fsh

14 lines
289 B
Text
Raw Normal View History

2024-01-10 06:36:33 +01:00
varying vec2 v_vTexcoord;
varying vec4 v_vColour;
void main() {
vec4 col = texture2D( gm_BaseTexture, v_vTexcoord );
if(col.r + col.g == 0.) {
gl_FragColor = vec4(0., 0., 0., 1.);
} else {
float whi = (col.g) / (col.r + col.g);
gl_FragColor = vec4(whi, whi, whi, 1.);
}
}