我有一个 Three.js 项目,其中包含 3D 模型、地面和网格。使用outlinePass ( https://trijs.org/examples/?q=outl#webgl_postprocessing_outline )勾勒出3D 模型的轮廓。
我可以使用 Transformcontrol ( https://thirdjs.org/examples/?q=transf#misc_controls_transform ) 移动对象,并且可以使用 Orbitcontrols 更改相机位置 ( https://thirdjs.org/examples/?q=轨道#misc_controls_orbit)
问题:图形似乎渲染得很糟糕,这里有一些屏幕截图: https: //i.stack.imgur.com/QxjrZ.jpg
我真的不知道应该在这里使用哪些设置:
renderer = new THREE.WebGLRenderer();//{ antialias: true } ); With antialiasing or without?
//antialiasing is only needed when not using fxaa, right??
renderer.setPixelRatio( window.devicePixelRatio );
renderer.setSize( window.innerWidth, window.innerHeight );
renderer.gammaOutput = true;
renderer.physicallyCorrectLights = true;
camera = new THREE.PerspectiveCamera( 45, container.offsetWidth / container.offsetHeight, 0.001, 1000 );
camera.addEventListener( 'change', render ); //Is this necessary? Seems like it …Run Code Online (Sandbox Code Playgroud)