-
Notifications
You must be signed in to change notification settings - Fork 904
Draft implementation of v3.12 renderer #3300
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
So, 3D Render is totally excluded from plans on html5 version? |
No, no, no, the current Camera is too poor for 3D render, we have bigger plan for 3D, the current implementation is just for a really fast 2D engine, the underling renderer will have more changes in the future for 3D. |
This is great. |
😂 That's not expected... So what's the platform and browser you tested ? Can you capture a profile in Chrome so that I can see what's consuming so much CPU |
I've inspected profile and found that you are using old code of stencil clipping(before my modification) |
I also found that this version of renderer fixes my issue #3279 . |
It's strange, I haven't touch ClippingNode yet. I will take a look at your PR and compare. So on which platform are you testing ? Desktop ? The benefit of this version is not very clear on desktop, it will show on some extreme cases, like the bunnymark test (15000 for v3.11, 20000+ for the current version). But it's definitely running faster on Android with the reduction of memory. I'll try to find the hot point in this version and try to improve more. |
I test on desktops and iOs devices. Unfortunately, I don't have a lot of android devices. All of them are near the top models, and I have native(coco2d-x) versions of my game. Android browsers are not the main target on this platform. |
@1scaR1 I have checked the source, your changes should have been included in my current branch, what's exactly the old code you mentioned ? |
I my PR (#3250) I've reduced calls of
|
All this stuff should have been deleted, please take a look at my branch: https://github.com/pandamicro/cocos2d-html5/blob/develop/cocos2d/clipping-nodes/CCClippingNodeWebGLRenderCmd.js |
In your branch all is OK now. |
I have completed the new WebGL renderer, it's now passing our test cases, as this PR is nearly impossible to review, I will do the following steps:
And fix bugs reported. Anyone interested in this can also pull the latest commit to see how it's working with your game, and please send any feedbacks in this PR or submit an issue. Known issue: I haven't fully tested Canvas render mode, Tilemap is completed rewrote, not working on Canvas yet. @dabingnn please take a look |
The WebGL renderer have been greatly improved ! Again !
It's still a draft implementation, many bugs still hang in there, but anyone wants to review or discuss about the implementation, feel free to do so.
The general idea was to remove all the cache, complicate logic in v3.11, and use a much cleaner implementation to reduce memory usage and CPU cache miss. And it's working, more faster than v3.11 which have monstrous virtual buffer logic. As a result of memory usage reducing, now the engine is performing much better on Android devices, especially low end ones.
To be noted: Camera is removed because I changed from 44 matrix to 32 affine transform matrix. No more camera in Node and no more camera actions. Hope this won't affect many people