How to add a lens using Three.js?

I would like to add a lens to my project like http://threejs.org/examples/webgl_lensflares.html

But Chrome warns me that "WebGL: INVALID_OPERATION: copyTexImage2D: framebuffer is an incompatible format," and the lens flash does not appear.

I searched a lot, but did not answer correctly, please help.

+4
source share
1 answer

Change your renderer to add alpha to the framebuffer so that it is the same expected framebuffer format as lenflares (RGBA):

renderer = new THREE.WebGLRenderer( { antialias: true, alpha: true } ); 
+9
source

Source: https://habr.com/ru/post/1493386/


All Articles