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

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

问题描述

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

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

我正在使用

renderer = new THREE.WebGLRenderer({保留绘图缓冲区:真,抗锯齿:真 });

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

它有帮助,但不能完全解决问题.

it is helping but not resolving the issue fully.

在这个位置看起来还可以:

in this position it looks ok:

有谁知道如何解决这个问题?或者知道我还能尝试什么?(代码示例将不胜感激)

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

谢谢

好的,我已经添加了:

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天全站免登陆