Kesshi Posted March 2, 2017 Share Posted March 2, 2017 Maybe someone can help me to understand this. Because there is no "nice" way to enable/disable a post-process i have to call attachPostProcess/detachPostProcess very frequently in my project. Not so nice but it works. Today i noticed that the internal textures of the post-processes are recreated all the time. After looking at the BJS sources i saw that attachPostProcess and detachPostProcess both are calling _cascadePostProcessesToRigCams which always invalidates the texture of the first post-process: https://github.com/BabylonJS/Babylon.js/blob/master/src/Cameras/babylon.camera.ts#L298 That means every time i disable/enable a post-process the texture will be recreated. My question is, why is it necessary to invalidate the post-process textures (and only for the first one??) in this case? I disabled this for a short test and everything was working as expected without that annoying texture recreation. Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.