为什么SSAARenderPass会混淆纹理?

时间:2018-11-30 13:37:19

标签: three.js

我正在使用SSAARenderPass,例如以下示例:https://threejs.org/examples/?q=ssaa#webgl_postprocessing_ssaa

我的应用程序中的效果编辑器是这样创建的:

this.composer = new THREE.EffectComposer(this.renderer)

// clear pass
const clearPass = new THREE.ClearPass( 0x123456, 1 );
this.composer.addPass( clearPass )

// ssaa render pass
const ssaaRenderPass = new THREE.SSAARenderPass( this.scene, this.camera );
ssaaRenderPass.unbiased = false;
ssaaRenderPass.sampleLevel = 1 // when set to 5 it "ruins" the scene (see screens)
this.composer.addPass( ssaaRenderPass );

// copy pass
const copyPass = new THREE.ShaderPass( THREE.CopyShader );
copyPass.renderToScreen = true;
this.composer.addPass( copyPass );

这是将sampleLevel设置为1的场景片段的样子:

enter image description here

这是sampleLevel设置为5的场景:

enter image description here

棒的边缘已正确“消除锯齿”,而且纹理以奇怪的方式受到影响。知道什么可能导致这种奇怪的行为吗?我想要实现的效果比抗锯齿效果更好的默认渲染器提供的抗锯齿效果更好:是的,因为有时在某些相机位置,我会看到摇杆的“像素化”边缘。

这是没有任何着色器的场景的外观:

enter image description here

0 个答案:

没有答案