BlurMaterial.js 618 B

1234567891011121314151617181920212223242526
  1. // see http://john-chapman-graphics.blogspot.co.at/2013/01/ssao-tutorial.html
  2. import * as THREE from "../../libs/three.js/build/three.module.js";
  3. Potree.BlurMaterial = class BlurMaterial extends THREE.ShaderMaterial{
  4. constructor(parameters = {}){
  5. super();
  6. let uniforms = {
  7. near: { type: 'f', value: 0 },
  8. far: { type: 'f', value: 0 },
  9. screenWidth: { type: 'f', value: 0 },
  10. screenHeight: { type: 'f', value: 0 },
  11. map: { type: 't', value: null }
  12. };
  13. this.setValues({
  14. uniforms: uniforms,
  15. vertexShader: Potree.Shaders['blur.vs'],
  16. fragmentShader: Potree.Shaders['blur.fs']
  17. });
  18. }
  19. };