filter.fragment.fx 287 B

12345678910111213
  1. // Samplers
  2. varying vec2 vUV;
  3. uniform sampler2D textureSampler;
  4. uniform mat4 kernelMatrix;
  5. void main(void)
  6. {
  7. vec3 baseColor = texture2D(textureSampler, vUV).rgb;
  8. vec3 updatedColor = (kernelMatrix * vec4(baseColor, 1.0)).rgb;
  9. gl_FragColor = vec4(updatedColor, 1.0);
  10. }