mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-07-22 17:03:18 +02:00
Merge pull request #13743 from SamGondelman/transparent
Fix primitives always drawing as transparents
This commit is contained in:
commit
00c5b6f5f4
2 changed files with 17 additions and 1 deletions
|
@ -336,6 +336,11 @@ bool EntityRenderer::needsRenderUpdate() const {
|
||||||
if (_needsRenderUpdate) {
|
if (_needsRenderUpdate) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (isFading()) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
if (_prevIsTransparent != isTransparent()) {
|
if (_prevIsTransparent != isTransparent()) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -380,6 +385,10 @@ void EntityRenderer::updateModelTransformAndBound() {
|
||||||
void EntityRenderer::doRenderUpdateSynchronous(const ScenePointer& scene, Transaction& transaction, const EntityItemPointer& entity) {
|
void EntityRenderer::doRenderUpdateSynchronous(const ScenePointer& scene, Transaction& transaction, const EntityItemPointer& entity) {
|
||||||
DETAILED_PROFILE_RANGE(simulation_physics, __FUNCTION__);
|
DETAILED_PROFILE_RANGE(simulation_physics, __FUNCTION__);
|
||||||
withWriteLock([&] {
|
withWriteLock([&] {
|
||||||
|
if (isFading()) {
|
||||||
|
emit requestRenderUpdate();
|
||||||
|
}
|
||||||
|
|
||||||
auto transparent = isTransparent();
|
auto transparent = isTransparent();
|
||||||
if (_prevIsTransparent && !transparent) {
|
if (_prevIsTransparent && !transparent) {
|
||||||
_isFading = false;
|
_isFading = false;
|
||||||
|
|
|
@ -211,7 +211,14 @@ ShapeKey ShapeEntityRenderer::getShapeKey() {
|
||||||
|
|
||||||
return builder.build();
|
return builder.build();
|
||||||
} else {
|
} 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