mirror of
https://github.com/overte-org/overte.git
synced 2025-04-07 22:33:04 +02:00
Merge pull request #15817 from SamGondelman/cube
BUGZ-734: Possible fix for black shape issue
This commit is contained in:
commit
e0d0124caa
2 changed files with 4 additions and 4 deletions
|
@ -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");
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue