Jump to content

Drawing on multiple renderer textures to not get into the gpu texture limit / Hard drawing edges


ChriD
 Share

Recommended Posts

Hi,

I am a newbie to PixiJs.
I want to achieve an application which shows a map and which has a "fog of war" which will be removed manually by left click and mousemove.
I managed to build this, but due to the fact that some maps are very big (texture size bigger than max gpu texture size), i am splitting the image into tiles and arrange them in a container. Of course i do the same with the fog container.

To reveal the map i use a inverted mask on the fog tiles and use a rendere texture to draw it.

It works, but of course i have some "hard" lines when drawing parallel ond the edges (revealing) of the fog tiles.
My question is if there is a better way to do this or if i do have to tinker around so that i am drawing the "rest of the brush" on the adjoining renderTexture

I am not sure if i have explained it correctly.

But here is an example with 4 tiles
https://www.pixiplayground.com/#/edit/yWVqf6LPG9lY-OwPoypJ2

 

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...