-
-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
how to use EffectComposer/UnrealBloomPass in Aframe #4897
Comments
英语不太好,我就直接写中文了, 以上问题我已经解决,希望对有需要的人有帮助 经过多天研读源码,加上看threejs范例,最终花了五天时间找到了方案【之前没怎么做过这方面底层】 1、在我们需要做多通道渲染时候,每个通道都会调用renderer.render(),如果我们想依靠onBeforeRender和onAfterRender解决这一问题,这会导致递归,造成栈溢出,而且a-sence.js中render()的renderer.render(this.object3D, this.camera);调用会冗余 【最终解决方案:核心代码】
2、在自己项目中声明你自己需要的Composer,挂载到renderer对象 _ 强烈呼吁:希望Aframe官网能开一个回调,能够重构renderer.render()地方的执行代码,这样我们就可以在不修改Aframe源码的基础上支持各种threejs的Composer引用了 _ 关键的副作用-注意:此方案的引入致使renderer的onBeforeRender和onAfterRender这两个钩子函数已不可再使用,因为bloomComposer和finalComposer的render()都会默认调用renderer.render(),从而引发递归,造成栈溢出 如有码友有类似问题需要解决,可以详询我:wechat/QQ:1215458034 |
Post processing still depends on pending THREE work mrdoob/three.js#18846 |
We have an example of using UnrealBloomPass in #5648 |
Closing this. Can reopen if necessary |
Description:
i write the threejs code in vue + Aframe, but it`s not work and no error
i so rewrited Aframe/core/sence/a-sence.js[function render] on my location, code as
my copy example1: https://wow.techbrood.com/fiddle/54961
my copy example2: https://blog.csdn.net/qq_39503511/article/details/111029877
need help !
The text was updated successfully, but these errors were encountered: