GrodanBoll2000 Posted July 19, 2018 Share Posted July 19, 2018 As title says, I'm using the Pixi Renderer of Proton.js. I want to have the effect of not clearing the screen after every draw call, just like when I turn preserve drawing buffer to true (and renderer.autoClear = false;) in the WebGL renderer. There's nothing like that for the Pixi renderer when I look into the Proton.js source code. I've isolated the Pixi renderer part of the Proton.js source code if someone can help me find what to change/add in order to achieve the effect i want. Thanks. https://gist.github.com/scummtomte/ac8dfc3ff5c5810c32891c26cd0f88b4 Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted July 19, 2018 Share Posted July 19, 2018 http://pixijs.download/dev/docs/PIXI.WebGLRenderer.html its called clearBeforeRender. However i do not have guarantees that it works on iphone and some other devices. even on PC's it can be a problem. If you see it, try using temporary RenderTexture and render to screen from it. This is different topic and it will require from you proper research in pixi-examples repo Quote Link to comment Share on other sites More sharing options...
GrodanBoll2000 Posted July 19, 2018 Author Share Posted July 19, 2018 Thanks for your response. I got it to work by changing not the code i linked but instead, changing in the pixi.js file. There are problems for Safari though, background is flickering like crazy between red and black even though the background should be black only (works in the other browsers). The particles moves fine till they are dead, then the drawn trace that is preserved starts to flicker like crazy a few pixels from its position to its previous position whatever direction it came from. Any ideas of how to solve or is there a better way to do draw feedback? Thanks. Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted July 19, 2018 Share Posted July 19, 2018 > There are problems for Safari though, background is flickering like crazy between red and black even though the background should be black only (works in the other browsers). It switches between multiple framebuffers, nobody knows why. Time to dig into RenderTexture tricks Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.