Open boruok opened 3 days ago
check drawcall number (stays at 2)
It is 3 in my case.
check drawcall number (stays at 2)
It is 3 in my case.
strange, mine shows 9 drawcalls for 4 buttons. Uploaded example project, maybe i'm doing something wrong.
Yep, it is 9 for 4 buttons, but 3 for one button.
So, what's the issue?
Yep, it is 9 for 4 buttons, but 3 for one button.
So, what's the issue?
4 buttons with texture bilinear filter requires 2 drawcalls (and stays the same) 4 buttons with texture nearest filter requires 9 drawcalls (can increase, depends how many button you have)
isn't that the issue? if you have, for example pixelart texture, which require nearest filter.
I just want to know how to reproduce it. You said
you can use any project and run scene:
1. add button to scene
2. switch label cache mode to bitmap (for reducing drawcalls)
3. run scene
4. check drawcall number (stays at 2)
I did as you said, the the draw call is 3, not 2.
4 buttons with texture bilinear filter requires 2 drawcalls (and stays the same)
Where to show 2 drawcalls?
@minggo here EXACT steps:
to reproduce issue:
preview in editor (bilinear filter)
preview in browser (bilinear filter)
preview in editor (nearest filter)
preview in browser(nearest filter)
Ok, i can reproduce the issue now. I think it is because when i changed filter mode, i didn't save the change, then the preview result didn't take effect.
Thanks for your detail information.
It is caused by this PR: https://github.com/cocos/cocos-engine/pull/9780 to fix issue for pixel style games. But i have not idea how to fix it as the batch mechanism works for all UI elements.
Cocos Creator version
3.8.3
System information
Windows 11 Pro
Issue description
Noticed that if Label parent (Button, Sprite) texture filter is set to nearest leads to breaking batching with increased number of drawcalls (depends on how many nodes you have). But drawcalls stays at 2 if texture filter is set to bilinear
Relevant error log output
n/a
Steps to reproduce
you can use any project and run scene:
to reproduce
Minimal reproduction project
NewProject.zip