swwmgz_m/shaders/glsl/Subpixel.fp

15 lines
431 B
GLSL

// RGB subpixel filter for Ammo LEDs
// GRIDSZ = how many subpixels are in the texture (for layouts where subpixel patterns alternate)
#ifndef GRIDSZ
#define GRIDSZ vec2(1.,1.)
#endif
void SetupMaterial( inout Material mat )
{
mat.Base = getTexel(vTexCoord.st);
vec2 uv = (vTexCoord.st*vec2(textureSize(tex,0)))/GRIDSZ;
mat.Base *= 1.5*texture(pixtex,uv);
mat.Normal = ApplyNormalMap(vTexCoord.st);
mat.Bright = vec4(1.);
}