kaan Posted November 4, 2016 Share Posted November 4, 2016 Hi I'm wondering whether a RenderTexture could be used for a 2d map that is roughly 2000x3000 at most On theory, a RenderTexture is a dream come true, it's like the ultimate cache, I'm just wondering whether it has any downsides, maybe WebGL or Canvas issues, maybe limitations I'm going to invest a considerable amount of effort into converting my complicated (not in a good way : ) and custom 2d map tiling routine, it would be nice to know potential issues beforehand Quote Link to comment Share on other sites More sharing options...
kaan Posted November 4, 2016 Author Share Posted November 4, 2016 After my initial tests, I haven't come across any performance issues yet, however, I've stumbled onto a scale/resolution issue when Canvas is used, I'm guessing/hoping it's not a major issue, a bit digging might manifest a solution Quote Link to comment Share on other sites More sharing options...
xerver Posted November 4, 2016 Share Posted November 4, 2016 Keep in mind not to make the textures too large, or you will have issues with uploading it to the GPU (especially on mobile devices). 2048x2048 is usually a good maximum, see http://webglstats.com for more info. kaan 1 Quote Link to comment Share on other sites More sharing options...
kaan Posted November 4, 2016 Author Share Posted November 4, 2016 Very very interesting, thanks for that insight, I'm guessing MAX_TEXTURE_SIZE is the metric there Would dividing a large texture into 2 or 4 solve the issue? Quote Link to comment Share on other sites More sharing options...
xerver Posted November 5, 2016 Share Posted November 5, 2016 As long as you keep the max size of a single texture below 2048x2048 you should be fine kaan 1 Quote Link to comment Share on other sites More sharing options...
enricosapicco Posted November 11, 2016 Share Posted November 11, 2016 I am using renderTexture for tilingSprite for slot game reels. The performance is good enough so far. Each tilingSprite contains 20 textures combined on 144*144 resolution, it masks out the area for 3 sprites. It runs smooth even when the spin speed is on top. I haven't experienced any kind of latency. Considering there are 5 reels, the performance is satisfying. kaan 1 Quote Link to comment Share on other sites More sharing options...
kaan Posted November 11, 2016 Author Share Posted November 11, 2016 Below 4096x4096 I haven't had any issues so far either, I'm too lazy to divide things into 2048x2048 Initially, without perfect .destroy's, some people experienced weird glitches, but now, with everything .destroy'ed perfectly, I'm hoping those issues will be a thing of the past I also got the distant impression that old drivers don't favor large texture's, so I added the high performance RenderTexture routine as an optional feature 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.