Trying to wrap my head around the FBO technique following along Nicolas Barradeau's FBO Particles blog post.
-
Use WebGL1Renderer, otherwise the WebGLRenderer that now uses WebGL2 by default,
gl.getExtension()will always returnnulland and error will be thrown when we check for support. -
Within the FBO class update method, when updating the texture uniform value, don't set it to render texture object but use its
.textureproperty instead. Like so :// NOPE particles.material.uniforms.positions.value = rtt; // YEP particles.material.uniforms.positions.value = rtt.texture;
-
update the
BufferGeometry.addAttributemethod toBufferGeometry.setAttribute. Syntax stays the same. -
Enable the
WEBGL_color_buffer_floatextension to maximise portability and get rid of warning.gl.getExtension("WEBGL_color_buffer_float");