mirror of
https://github.com/cocos/cocos4.git
synced 2026-12-02 08:42:43 +08:00
fix bug
This commit is contained in:
@@ -64,24 +64,25 @@ export class RenderQueue {
|
||||
|
||||
for (let i = 0; i < model.subModelNum; ++i) {
|
||||
const subModel = model.getSubModel(i);
|
||||
for (const pso of subModel.psos) {
|
||||
for (let p = 0; p < subModel.psos.length; ++p) {
|
||||
|
||||
const pso = subModel.psos[p];
|
||||
const isTransparent = pso.blendState.targets[0].blend;
|
||||
|
||||
// TODO: model priority
|
||||
|
||||
if (!isTransparent) {
|
||||
const hash = (0 << 30) | i;
|
||||
const hash = (0 << 30) | p;
|
||||
|
||||
this.opaques.push({
|
||||
hash, depth, shaderId: pso.shader.id,
|
||||
subModel, cmdBuff: subModel.commandBuffers[i]});
|
||||
subModel, cmdBuff: subModel.commandBuffers[p]});
|
||||
} else {
|
||||
const hash = (1 << 30) | i;
|
||||
const hash = (1 << 30) | p;
|
||||
|
||||
this.transparents.push({
|
||||
hash, depth, shaderId: pso.shader.id,
|
||||
subModel, cmdBuff: subModel.commandBuffers[i]});
|
||||
subModel, cmdBuff: subModel.commandBuffers[p]});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user