Skip to content

How to use post processing stack / webGL renderer #86

@heaversm

Description

@heaversm

Hi - I'm trying to implement the post processing stack of threejs. Do you have an example of this? I'm trying to port a working non-ar example of this into threejs. Normally what I would do is create a webGL renderer:

renderer = new THREE.WebGLRenderer({alpha: true});
renderer.setSize( ww,wh );
document.body.appendChild( renderer.domElement );

and then add all my passes:

composer = new THREE.EffectComposer( renderer );
composer.addPass( new THREE.RenderPass( scene, camera ) );

dotEffect = new THREE.ShaderPass( THREE.DotScreenShader );
dotEffect.uniforms[ 'scale' ].value = 4;
composer.addPass( dotEffect );

...

I noticed a few things:

  • I'm not sure how to refer to my renderer in 8th wall, so I can't pass a reference to it to my effect composer.

  • The post processing stack does not seem to be loaded by default so I have to load all the scripts individually.

Any idea how to get going with this? I'm just trying to incorporate it into the 8thwall / web / gettingstarted / xr3js example.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions