mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-03 08:03:50 +00:00
fix(render): replace torch and lantern glow cards with sprites
This commit is contained in:
parent
d7a0a9f675
commit
e0d7cba330
1 changed files with 4 additions and 3 deletions
|
|
@ -1168,6 +1168,7 @@ bool M2Renderer::loadModel(const pipeline::M2Model& model, uint32_t modelId) {
|
||||||
gpuModel.isLanternLike =
|
gpuModel.isLanternLike =
|
||||||
(lowerName.find("lantern") != std::string::npos) ||
|
(lowerName.find("lantern") != std::string::npos) ||
|
||||||
(lowerName.find("lamp") != std::string::npos) ||
|
(lowerName.find("lamp") != std::string::npos) ||
|
||||||
|
(lowerName.find("torch") != std::string::npos) ||
|
||||||
(lowerName.find("light") != std::string::npos);
|
(lowerName.find("light") != std::string::npos);
|
||||||
gpuModel.isKoboldFlame =
|
gpuModel.isKoboldFlame =
|
||||||
(lowerName.find("kobold") != std::string::npos) &&
|
(lowerName.find("kobold") != std::string::npos) &&
|
||||||
|
|
@ -1544,6 +1545,7 @@ bool M2Renderer::loadModel(const pipeline::M2Model& model, uint32_t modelId) {
|
||||||
const bool modelLanternFamily =
|
const bool modelLanternFamily =
|
||||||
(lowerName.find("lantern") != std::string::npos) ||
|
(lowerName.find("lantern") != std::string::npos) ||
|
||||||
(lowerName.find("lamp") != std::string::npos) ||
|
(lowerName.find("lamp") != std::string::npos) ||
|
||||||
|
(lowerName.find("torch") != std::string::npos) ||
|
||||||
(lowerName.find("light") != std::string::npos);
|
(lowerName.find("light") != std::string::npos);
|
||||||
bgpu.lanternGlowHint =
|
bgpu.lanternGlowHint =
|
||||||
exactLanternGlowTexture ||
|
exactLanternGlowTexture ||
|
||||||
|
|
@ -2654,8 +2656,7 @@ void M2Renderer::render(VkCommandBuffer cmd, VkDescriptorSet perFrameSet, const
|
||||||
(batch.blendMode >= 3) ||
|
(batch.blendMode >= 3) ||
|
||||||
batch.colorKeyBlack ||
|
batch.colorKeyBlack ||
|
||||||
((batch.materialFlags & 0x01) != 0);
|
((batch.materialFlags & 0x01) != 0);
|
||||||
if ((batch.glowCardLike && lanternLikeModel) ||
|
if (cardLikeSkipMesh || (batch.glowCardLike && lanternLikeModel)) {
|
||||||
(cardLikeSkipMesh && !lanternLikeModel)) {
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -2860,7 +2861,7 @@ void M2Renderer::render(VkCommandBuffer cmd, VkDescriptorSet perFrameSet, const
|
||||||
(batch.colorKeyBlack && batchUnlit && batch.blendMode >= 1));
|
(batch.colorKeyBlack && batchUnlit && batch.blendMode >= 1));
|
||||||
if (shouldUseGlowSprite) {
|
if (shouldUseGlowSprite) {
|
||||||
const bool cardLikeSkipMesh = (batch.blendMode >= 3) || batch.colorKeyBlack || batchUnlit;
|
const bool cardLikeSkipMesh = (batch.blendMode >= 3) || batch.colorKeyBlack || batchUnlit;
|
||||||
if ((batch.glowCardLike && model.isLanternLike) || (cardLikeSkipMesh && !model.isLanternLike))
|
if (cardLikeSkipMesh || (batch.glowCardLike && model.isLanternLike))
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue