反锯齿Three.js / WebGL [英] Anti Aliasing Three.js / WebGL

查看:541
本文介绍了反锯齿Three.js / WebGL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我使用轨道器旋转模型时,我遇到了抗锯齿问题

I have an issue with anti aliasing when i spin model with orbiter

我正在使用

渲染器= new THREE.WebGLRenderer({
serveDrawingBuffer:true,
antialias:true});

renderer = new THREE.WebGLRenderer({ preserveDrawingBuffer: true, antialias: true });

它正在帮助但不能完全解决问题。

it is helping but not resolving the issue fully.

在此位置看起来不错:

有人知道如何解决吗?或有任何想法我还能尝试什么? (代码示例将不胜感激)

Does anyone know how to resolve this? or have any idea what else can i try? ( code sample would be appreciated )

谢谢

编辑:

好,我已经添加了此内容:

Ok i have added this:

renderer.setPixelRatio(2);

renderer.setPixelRatio(2);

并改善了很多(请参见下面的结果),但是仍然显示出一点点,

and it has improved a LOT ( see result bellow ), but still shows a bit,

有人有其他想法建议吗?

anyone has any other idea suggestion?

推荐答案

线条纹理吗?

如果是这样,我会遇到类似问题,然后根据相机的位置而不是完全位于顶部,我的纹理会变得模糊。也许这对您有所帮助:

If so, I had a simular issue then depending on the camera position not completely on top my texture would get blurry. Maybe this helps for you:

texture.minFilter = THREE.LinearFilter;

这篇关于反锯齿Three.js / WebGL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆