Using THREE.ShaderPass for custom effects
With THREE.ShaderPass
, we can apply a large number of additional effects to our scene by passing in a custom shader. Three.js comes with a set of shaders that can be used together with this THREE.ShaderPass
. They will be listed in this section. We’ve divided this section into three parts.
The first set involves simple shaders. All of these shaders can be viewed and configured by opening up the shaderpass-simple.html
example:
BleachBypassShader
: This creates a bleach bypass effect. With this effect, a silver-like overlay will be applied to the image.BlendShader
: This isn’t a shader that you apply as a single postprocessing step, but it allows you to blend two textures together. You can, for instance, use this shader to smoothly blend the rendering of one scene into another (not shown inshaderpass-simple.html
).BrightnessContrastShader
: This allows you to change the brightness and contrast of an image.
...