0
我想用效果作曲家的FXAA,但我不能讓它正常工作。EffectComposer只繪製紋理到屏幕
這是場景,它是如何通過WebGLRenderer呈現: http://imageshack.us/a/img515/143/rendererscene.png
這是使用EffectComposer相同相同的場景: http://imageshack.us/a/img849/5336/composerscene.png
它只顯示質感。
renderer = new THREE.WebGLRenderer({ antialias : true });
renderer.shadowMapEnabled = true;
renderer.shadowMapSoft = true;
renderer.shadowCameraNear = 1;
renderer.shadowCameraFar = camera.far;
renderer.shadowCameraFov = 40;
renderer.shadowMapBias = 0.0039;
renderer.shadowMapDarkness = 0.6;
renderer.shadowMapWidth = graphics_options.shadow_res;
renderer.shadowMapHeight = graphics_options.shadow_res;
renderer.setClearColorHex(cwe_settings.bg_color, cwe_settings.bg_alpha);
document.getElementById("blackboard").appendChild(renderer.domElement);
renderer.physicallyBasedShading = true;
(...)
composer = new THREE.EffectComposer(renderer);
composer.addPass(new THREE.RenderPass(scene, camera));
effectFXAA = new THREE.ShaderPass(THREE.FXAAShader);
effectFXAA.uniforms['resolution'].value.set(1/(window.innerWidth), 1/(window.innerHeight));
effectFXAA.renderToScreen = true;
composer.addPass(effectFXAA);
Animationloop:
(...)
composer.render(scene, camera);
有沒有人有同樣的問題
我的代碼結構如下?我在互聯網上沒有找到類似的東西。
你能提供一個現場實例嗎? – WestLangley