Merge pull request #15817 from SamGondelman/cube

BUGZ-734: Possible fix for black shape issue
This commit is contained in:
Sam Gateau 2019-06-21 16:13:36 -07:00 committed by GitHub
commit e0d0124caa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View file

@ -70,7 +70,7 @@ bool ShapeEntityRenderer::needsRenderUpdateFromTypedEntity(const TypedEntityPoin
return true;
}
if (_color != entity->getColor()) {
if (_color != toGlm(entity->getColor())) {
return true;
}
if (_alpha != entity->getAlpha()) {
@ -130,12 +130,12 @@ void ShapeEntityRenderer::doRenderUpdateAsynchronousTyped(const TypedEntityPoint
}
});
glm::u8vec3 color = entity->getColor();
glm::vec3 color = toGlm(entity->getColor());
float alpha = entity->getAlpha();
if (_color != color || _alpha != alpha) {
_color = color;
_alpha = alpha;
_material->setAlbedo(toGlm(_color));
_material->setAlbedo(color);
_material->setOpacity(_alpha);
auto materials = _materials.find("0");

View file

@ -43,7 +43,7 @@ private:
PulsePropertyGroup _pulseProperties;
std::shared_ptr<graphics::Material> _material { std::make_shared<graphics::Material>() };
glm::u8vec3 _color;
glm::vec3 _color { NAN };
float _alpha;
glm::vec3 _position;