mirror of
https://github.com/lubosz/overte.git
synced 2025-04-24 09:23:17 +02:00
fix shapes always drawing as transparents
This commit is contained in:
parent
41b804a5dd
commit
2f358f3380
2 changed files with 17 additions and 1 deletions
|
@ -336,6 +336,11 @@ bool EntityRenderer::needsRenderUpdate() const {
|
|||
if (_needsRenderUpdate) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (isFading()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (_prevIsTransparent != isTransparent()) {
|
||||
return true;
|
||||
}
|
||||
|
@ -380,6 +385,10 @@ void EntityRenderer::updateModelTransformAndBound() {
|
|||
void EntityRenderer::doRenderUpdateSynchronous(const ScenePointer& scene, Transaction& transaction, const EntityItemPointer& entity) {
|
||||
DETAILED_PROFILE_RANGE(simulation_physics, __FUNCTION__);
|
||||
withWriteLock([&] {
|
||||
if (isFading()) {
|
||||
emit requestRenderUpdate();
|
||||
}
|
||||
|
||||
auto transparent = isTransparent();
|
||||
if (_prevIsTransparent && !transparent) {
|
||||
_isFading = false;
|
||||
|
|
|
@ -216,7 +216,14 @@ ShapeKey ShapeEntityRenderer::getShapeKey() {
|
|||
|
||||
return builder.build();
|
||||
} else {
|
||||
return Parent::getShapeKey();
|
||||
ShapeKey::Builder builder;
|
||||
if (_procedural.isReady()) {
|
||||
builder.withOwnPipeline();
|
||||
}
|
||||
if (isTransparent()) {
|
||||
builder.withTranslucent();
|
||||
}
|
||||
return builder.build();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue