mirror of
https://github.com/cocos/cocos4.git
synced 2026-11-21 08:02:39 +08:00
UI layer change (#3201)
This commit is contained in:
@@ -39,20 +39,13 @@ void UIPhase::render(Camera *camera, gfx::RenderPass *renderPass){
|
||||
auto cmdBuff = pipeline->getCommandBuffers()[0];
|
||||
|
||||
auto batches = camera->getScene()->getUIBatches();
|
||||
const auto vis = camera->visibility & static_cast<uint>(LayerList::UI_2D);
|
||||
const int batchCount = batches[0];
|
||||
// Notice: The batches[0] is batchCount
|
||||
for (int i = 1; i <= batchCount; ++i) {
|
||||
const auto batch = GET_UI_BATCH(batches[i]);
|
||||
bool visible = false;
|
||||
if (vis) {
|
||||
if (camera->visibility == batch->visFlags) {
|
||||
visible = true;
|
||||
}
|
||||
} else {
|
||||
if (camera->visibility & batch->visFlags) {
|
||||
visible = true;
|
||||
}
|
||||
if (camera->visibility & batch->visFlags) {
|
||||
visible = true;
|
||||
}
|
||||
|
||||
if (!visible) continue;
|
||||
|
||||
Reference in New Issue
Block a user