History

Added new shaders

Olivier Prat committed 9 years ago

Commit 08fcd6c1 parent cbcf9eb25 files · +1030 −44Browse files

Showing the changes to libraries/render-utils/src/MeshPartPayload.cpp (1 of 25 files). Show all

Unified · Split

libraries/render-utils/src/MeshPartPayload.cpp+5−9
@@ -400,10 +400,6 @@ ItemKey ModelMeshPartPayload::getKey() const { · 399 unmodified lines
400400 builder.withTransparent();
401401 }
402402 }
403−
404− if (_fadeState != FADE_COMPLETE) {
405− builder.withTransparent();
406− }
407403 }
408404 return builder.build();
409405 }
@@ -537,9 +533,9 @@ float ModelMeshPartPayload::computeFadePercent() const { · 127 unmodified lines
537533 return 0.0f;
538534 }
539535 float fadeAlpha = 1.0f;
540− const float INV_FADE_PERIOD = 1.0f / (float)(3 * USECS_PER_SECOND);
541− float fraction = (float)(usecTimestampNow() - _fadeStartTime) * INV_FADE_PERIOD;
542− if (fraction < 1.0f) {
536+ const double INV_FADE_PERIOD = 1.0 / (double)(10 * USECS_PER_SECOND);
537+ double fraction = (double)(usecTimestampNow() - _fadeStartTime) * INV_FADE_PERIOD;
538+ if (fraction < 1.0) {
543539 fadeAlpha = Interpolate::simpleNonLinearBlend(fraction);
544540 }
545541 if (fadeAlpha >= 1.0f) {
@@ -549,9 +545,9 @@ float ModelMeshPartPayload::computeFadePercent() const { · 3 unmodified lines
549545 if (model) {
550546 model->setRenderItemsNeedUpdate();
551547 }
552− return 1.0f;
548+ fadeAlpha = 1.0f;
553549 }
554− return Interpolate::simpleNonLinearBlend(fadeAlpha);
550+ return fadeAlpha;
555551 }
556552
557553 void ModelMeshPartPayload::bindFade(gpu::Batch& batch, const RenderArgs* args) const {