WhiteDragonLight Posted January 12, 2021 Share Posted January 12, 2021 Hello everyone, this is my first post on these forums. I'm working on a top-down retro RPG thingy and there's a scene where I need to gradually add "noise" to both the tileset and sprite textures as the player walks. I've tried adding a graphics object and then plotting with fillPoint() like so: let graphics = this.add.graphics(); this.events.on('playerMove', () => { for (let i = 0; i < 50; i++) { let point = this.getRandomCoords(); graphics.fillPoint(point.x, point.y, 3); } }); This kinda works but it's far from ideal and it just breaks at one point giving the following warning:WebGL warning: bufferSubData: Offset+size passes the end of the buffer. So I'm looking for alternatives to achieve a similar effect. I was wondering if it was possible to modify tileset and sprite textures programatically for instance (that would be ideal) or just any other way to generate the same effect. Basically, I want to add random white dots on screen until you can no longer tell what's going on. Link to comment Share on other sites More sharing options...
WhiteDragonLight Posted January 26, 2021 Author Share Posted January 26, 2021 @samme Helped me with this so this is solved. If anyone runs into a similar issue, the answer is rendering your graphics into a RenderTexture object. Link to comment Share on other sites More sharing options...
Recommended Posts