Source: filters/fxaa/FXAAFilter.js

filters/fxaa/FXAAFilter.js

  1. import * as core from '../../core';
  2. import { readFileSync } from 'fs';
  3. import { join } from 'path';
  4. /**
  5. *
  6. * Basic FXAA implementation based on the code on geeks3d.com with the
  7. * modification that the texture2DLod stuff was removed since it's
  8. * unsupported by WebGL.
  9. *
  10. * @see https://github.com/mitsuhiko/webgl-meincraft
  11. *
  12. * @class
  13. * @extends PIXI.Filter
  14. * @memberof PIXI.filters
  15. *
  16. */
  17. export default class FXAAFilter extends core.Filter
  18. {
  19. /**
  20. *
  21. */
  22. constructor()
  23. {
  24. // TODO - needs work
  25. super(
  26. // vertex shader
  27. readFileSync(join(__dirname, './fxaa.vert'), 'utf8'),
  28. // fragment shader
  29. readFileSync(join(__dirname, './fxaa.frag'), 'utf8')
  30. );
  31. }
  32. }