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
400 builder.withTransparent();400 builder.withTransparent();
401 }401 }
402 }402 }
403
404 if (_fadeState != FADE_COMPLETE) {
405 builder.withTransparent();
406 }
407 }403 }
408 return builder.build();404 return builder.build();
409}405}
@@ -537,9 +533,9 @@ float ModelMeshPartPayload::computeFadePercent() const { · 127 unmodified lines
537 return 0.0f;533 return 0.0f;
538 }534 }
539 float fadeAlpha = 1.0f;535 float fadeAlpha = 1.0f;
540 const float INV_FADE_PERIOD = 1.0f / (float)(3 * USECS_PER_SECOND);536 const double INV_FADE_PERIOD = 1.0 / (double)(10 * USECS_PER_SECOND);
541 float fraction = (float)(usecTimestampNow() - _fadeStartTime) * INV_FADE_PERIOD;537 double fraction = (double)(usecTimestampNow() - _fadeStartTime) * INV_FADE_PERIOD;
542 if (fraction < 1.0f) {538 if (fraction < 1.0) {
543 fadeAlpha = Interpolate::simpleNonLinearBlend(fraction);539 fadeAlpha = Interpolate::simpleNonLinearBlend(fraction);
544 }540 }
545 if (fadeAlpha >= 1.0f) {541 if (fadeAlpha >= 1.0f) {
@@ -549,9 +545,9 @@ float ModelMeshPartPayload::computeFadePercent() const { · 3 unmodified lines
549 if (model) {545 if (model) {
550 model->setRenderItemsNeedUpdate();546 model->setRenderItemsNeedUpdate();
551 }547 }
552 return 1.0f;548 fadeAlpha = 1.0f;
553 }549 }
554 return Interpolate::simpleNonLinearBlend(fadeAlpha);550 return fadeAlpha;
555}551}
556 552
557void ModelMeshPartPayload::bindFade(gpu::Batch& batch, const RenderArgs* args) const {553void ModelMeshPartPayload::bindFade(gpu::Batch& batch, const RenderArgs* args) const {