使用CanvasRenderer在three.js中绘制线条比WebGLRenderer线条更平滑
问题描述:
Three.js的CanvasRenderer渲染线比WebGLRenderer平滑得多,这一直困扰着我。 WebGLRenderer似乎没有应用抗锯齿。
I've been stuck with an issue with three.js' CanvasRenderer rendering lines a lot smoother than the WebGLRenderer. It appears as if the WebGLRenderer doesn't apply antialiasing.
当我使用three.js画布-行- http://mrdoob.github.io/three.js/examples/canvas_lines.html ,我使用CanvasRenderer看到了这一点:
When I take the three.js canvas - lines - random example from http://mrdoob.github.io/three.js/examples/canvas_lines.html, I see this using the CanvasRenderer:
renderer = new THREE.CanvasRenderer();
到
renderer = new THREE.WebGLRenderer({antialias: true});
,我看到的是:
如您所见,WebGL的质量明显较差。
As you can see, the WebGL clearly has inferior quality. What am I doing wrong?
答
renderer = new THREE.WebGLRenderer({antialias: true});