mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 04:18:12 +02:00
more work on materials
This commit is contained in:
parent
186f505b15
commit
826eb709ce
7 changed files with 121 additions and 114 deletions
|
@ -616,24 +616,28 @@ Item::Bound EntityRenderer::getMaterialBound(RenderArgs* args) {
|
||||||
return EntityRenderer::getBound(args);
|
return EntityRenderer::getBound(args);
|
||||||
}
|
}
|
||||||
|
|
||||||
EntityRenderer::MaterialMap::iterator EntityRenderer::getAndUpdateMaterials() {
|
void EntityRenderer::updateShapeKeyBuilderFromMaterials(ShapeKey::Builder& builder) {
|
||||||
std::lock_guard<std::mutex> lock(_materialsLock);
|
MaterialMap::iterator materials;
|
||||||
auto materials = _materials.find("0");
|
|
||||||
if (materials != _materials.end() && materials->second.shouldUpdate()) {
|
|
||||||
RenderPipelines::updateMultiMaterial(materials->second);
|
|
||||||
}
|
|
||||||
|
|
||||||
return materials;
|
|
||||||
}
|
|
||||||
|
|
||||||
void EntityRenderer::updateShapeKeyBuilderFromMaterials(ShapeKey::Builder& builder, MaterialMap::iterator materials) const {
|
|
||||||
{
|
{
|
||||||
std::lock_guard<std::mutex> lock(_materialsLock);
|
std::lock_guard<std::mutex> lock(_materialsLock);
|
||||||
if (materials == _materials.end()) {
|
materials = _materials.find("0");
|
||||||
|
if (materials != _materials.end()) {
|
||||||
|
if (materials->second.shouldUpdate()) {
|
||||||
|
RenderPipelines::updateMultiMaterial(materials->second);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (isTransparent()) {
|
||||||
|
builder.withTranslucent();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (_primitiveMode == PrimitiveMode::LINES) {
|
||||||
|
builder.withWireframe();
|
||||||
|
}
|
||||||
|
|
||||||
builder.withCullFaceMode(materials->second.getCullFaceMode());
|
builder.withCullFaceMode(materials->second.getCullFaceMode());
|
||||||
|
|
||||||
graphics::MaterialKey drawMaterialKey = materials->second.getMaterialKey();
|
graphics::MaterialKey drawMaterialKey = materials->second.getMaterialKey();
|
||||||
|
|
|
@ -131,8 +131,7 @@ protected:
|
||||||
void updateMaterials(bool baseMaterialChanged = false);
|
void updateMaterials(bool baseMaterialChanged = false);
|
||||||
bool materialsTransparent() const;
|
bool materialsTransparent() const;
|
||||||
Item::Bound getMaterialBound(RenderArgs* args);
|
Item::Bound getMaterialBound(RenderArgs* args);
|
||||||
MaterialMap::iterator getAndUpdateMaterials();
|
void updateShapeKeyBuilderFromMaterials(ShapeKey::Builder& builder);
|
||||||
void updateShapeKeyBuilderFromMaterials(ShapeKey::Builder& builder, MaterialMap::iterator materials) const;
|
|
||||||
|
|
||||||
Item::Bound _bound;
|
Item::Bound _bound;
|
||||||
SharedSoundPointer _collisionSound;
|
SharedSoundPointer _collisionSound;
|
||||||
|
|
|
@ -232,19 +232,7 @@ Item::Bound GizmoEntityRenderer::getBound(RenderArgs* args) {
|
||||||
|
|
||||||
ShapeKey GizmoEntityRenderer::getShapeKey() {
|
ShapeKey GizmoEntityRenderer::getShapeKey() {
|
||||||
auto builder = render::ShapeKey::Builder().withoutCullFace().withDepthBias();
|
auto builder = render::ShapeKey::Builder().withoutCullFace().withDepthBias();
|
||||||
|
updateShapeKeyBuilderFromMaterials(builder);
|
||||||
auto mat = getAndUpdateMaterials();
|
|
||||||
|
|
||||||
if (isTransparent()) {
|
|
||||||
builder.withTranslucent();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (_primitiveMode == PrimitiveMode::LINES) {
|
|
||||||
builder.withUnlit().withWireframe();
|
|
||||||
}
|
|
||||||
|
|
||||||
updateShapeKeyBuilderFromMaterials(builder, mat);
|
|
||||||
|
|
||||||
return builder.build();
|
return builder.build();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -287,7 +275,7 @@ void GizmoEntityRenderer::doRender(RenderArgs* args) {
|
||||||
auto procedural = std::static_pointer_cast<graphics::ProceduralMaterial>(materials.top().material);
|
auto procedural = std::static_pointer_cast<graphics::ProceduralMaterial>(materials.top().material);
|
||||||
transparent |= procedural->isFading();
|
transparent |= procedural->isFading();
|
||||||
procedural->prepare(batch, transform.getTranslation(), transform.getScale(), transform.getRotation(), _created, ProceduralProgramKey(transparent));
|
procedural->prepare(batch, transform.getTranslation(), transform.getScale(), transform.getRotation(), _created, ProceduralProgramKey(transparent));
|
||||||
} else {
|
} else if (pipelineType == Pipeline::MATERIAL) {
|
||||||
if (RenderPipelines::bindMaterials(materials, batch, args->_renderMode, args->_enableTexturing)) {
|
if (RenderPipelines::bindMaterials(materials, batch, args->_renderMode, args->_enableTexturing)) {
|
||||||
args->_details._materialSwitches++;
|
args->_details._materialSwitches++;
|
||||||
}
|
}
|
||||||
|
|
|
@ -101,19 +101,7 @@ Item::Bound ImageEntityRenderer::getBound(RenderArgs* args) {
|
||||||
|
|
||||||
ShapeKey ImageEntityRenderer::getShapeKey() {
|
ShapeKey ImageEntityRenderer::getShapeKey() {
|
||||||
auto builder = render::ShapeKey::Builder().withoutCullFace().withDepthBias();
|
auto builder = render::ShapeKey::Builder().withoutCullFace().withDepthBias();
|
||||||
|
updateShapeKeyBuilderFromMaterials(builder);
|
||||||
auto mat = getAndUpdateMaterials();
|
|
||||||
|
|
||||||
if (isTransparent()) {
|
|
||||||
builder.withTranslucent();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (_primitiveMode == PrimitiveMode::LINES) {
|
|
||||||
builder.withWireframe();
|
|
||||||
}
|
|
||||||
|
|
||||||
updateShapeKeyBuilderFromMaterials(builder, mat);
|
|
||||||
|
|
||||||
return builder.build();
|
return builder.build();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -88,19 +88,7 @@ Item::Bound ShapeEntityRenderer::getBound(RenderArgs* args) {
|
||||||
|
|
||||||
ShapeKey ShapeEntityRenderer::getShapeKey() {
|
ShapeKey ShapeEntityRenderer::getShapeKey() {
|
||||||
ShapeKey::Builder builder;
|
ShapeKey::Builder builder;
|
||||||
|
updateShapeKeyBuilderFromMaterials(builder);
|
||||||
auto mat = getAndUpdateMaterials();
|
|
||||||
|
|
||||||
if (isTransparent()) {
|
|
||||||
builder.withTranslucent();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (_primitiveMode == PrimitiveMode::LINES) {
|
|
||||||
builder.withWireframe();
|
|
||||||
}
|
|
||||||
|
|
||||||
updateShapeKeyBuilderFromMaterials(builder, mat);
|
|
||||||
|
|
||||||
return builder.build();
|
return builder.build();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -157,7 +145,7 @@ void ShapeEntityRenderer::doRender(RenderArgs* args) {
|
||||||
outColor.a *= _isFading ? Interpolate::calculateFadeRatio(_fadeStartTime) : 1.0f;
|
outColor.a *= _isFading ? Interpolate::calculateFadeRatio(_fadeStartTime) : 1.0f;
|
||||||
bool forward = _renderLayer != RenderLayer::WORLD || args->_renderMethod == Args::RenderMethod::FORWARD;
|
bool forward = _renderLayer != RenderLayer::WORLD || args->_renderMethod == Args::RenderMethod::FORWARD;
|
||||||
if (outColor.a >= 1.0f) {
|
if (outColor.a >= 1.0f) {
|
||||||
render::ShapePipelinePointer pipeline = geometryCache->getShapePipelinePointer(false, wireframe,
|
render::ShapePipelinePointer pipeline = geometryCache->getShapePipelinePointer(false, wireframe || materials.top().material->isUnlit(),
|
||||||
forward, materials.top().material->getCullFaceMode());
|
forward, materials.top().material->getCullFaceMode());
|
||||||
if (wireframe) {
|
if (wireframe) {
|
||||||
geometryCache->renderWireShapeInstance(args, batch, geometryShape, outColor, pipeline);
|
geometryCache->renderWireShapeInstance(args, batch, geometryShape, outColor, pipeline);
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
#include "GLMHelpers.h"
|
#include "GLMHelpers.h"
|
||||||
|
|
||||||
#include "DeferredLightingEffect.h"
|
#include "DeferredLightingEffect.h"
|
||||||
|
#include "RenderPipelines.h"
|
||||||
|
|
||||||
using namespace render;
|
using namespace render;
|
||||||
using namespace render::entities;
|
using namespace render::entities;
|
||||||
|
@ -35,6 +36,8 @@ TextEntityRenderer::TextEntityRenderer(const EntityItemPointer& entity) :
|
||||||
if (geometryCache) {
|
if (geometryCache) {
|
||||||
_geometryID = geometryCache->allocateID();
|
_geometryID = geometryCache->allocateID();
|
||||||
}
|
}
|
||||||
|
_material->setCullFaceMode(graphics::MaterialKey::CullFaceMode::CULL_NONE);
|
||||||
|
addMaterial(graphics::MaterialLayer(_material, 0), "0");
|
||||||
}
|
}
|
||||||
|
|
||||||
TextEntityRenderer::~TextEntityRenderer() {
|
TextEntityRenderer::~TextEntityRenderer() {
|
||||||
|
@ -44,41 +47,8 @@ TextEntityRenderer::~TextEntityRenderer() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool TextEntityRenderer::isTransparent() const {
|
bool TextEntityRenderer::needsRenderUpdate() const {
|
||||||
return Parent::isTransparent() || _backgroundAlpha < 1.0f || _pulseProperties.getAlphaMode() != PulseMode::NONE;
|
return needsRenderUpdateFromMaterials() || Parent::needsRenderUpdate();
|
||||||
}
|
|
||||||
|
|
||||||
bool TextEntityRenderer::isTextTransparent() const {
|
|
||||||
return resultWithReadLock<bool>([&] {
|
|
||||||
return Parent::isTransparent() || _textAlpha < 1.0f || _pulseProperties.getAlphaMode() != PulseMode::NONE;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
ItemKey TextEntityRenderer::getKey() {
|
|
||||||
return ItemKey::Builder(Parent::getKey()).withMetaCullGroup();
|
|
||||||
}
|
|
||||||
|
|
||||||
ShapeKey TextEntityRenderer::getShapeKey() {
|
|
||||||
auto builder = render::ShapeKey::Builder().withoutCullFace();
|
|
||||||
if (isTransparent()) {
|
|
||||||
builder.withTranslucent();
|
|
||||||
}
|
|
||||||
if (_unlit) {
|
|
||||||
builder.withUnlit();
|
|
||||||
}
|
|
||||||
if (_primitiveMode == PrimitiveMode::LINES) {
|
|
||||||
builder.withWireframe();
|
|
||||||
}
|
|
||||||
return builder.build();
|
|
||||||
}
|
|
||||||
|
|
||||||
uint32_t TextEntityRenderer::metaFetchMetaSubItems(ItemIDs& subItems) const {
|
|
||||||
auto parentSubs = Parent::metaFetchMetaSubItems(subItems);
|
|
||||||
if (Item::isValidID(_textRenderID)) {
|
|
||||||
subItems.emplace_back(_textRenderID);
|
|
||||||
return parentSubs + 1;
|
|
||||||
}
|
|
||||||
return parentSubs;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void TextEntityRenderer::doRenderUpdateSynchronousTyped(const ScenePointer& scene, Transaction& transaction, const TypedEntityPointer& entity) {
|
void TextEntityRenderer::doRenderUpdateSynchronousTyped(const ScenePointer& scene, Transaction& transaction, const TypedEntityPointer& entity) {
|
||||||
|
@ -98,57 +68,121 @@ void TextEntityRenderer::doRenderUpdateAsynchronousTyped(const TypedEntityPointe
|
||||||
_lineHeight = entity->getLineHeight();
|
_lineHeight = entity->getLineHeight();
|
||||||
_textColor = toGlm(entity->getTextColor());
|
_textColor = toGlm(entity->getTextColor());
|
||||||
_textAlpha = entity->getTextAlpha();
|
_textAlpha = entity->getTextAlpha();
|
||||||
_backgroundColor = toGlm(entity->getBackgroundColor());
|
|
||||||
_backgroundAlpha = entity->getBackgroundAlpha();
|
|
||||||
_leftMargin = entity->getLeftMargin();
|
_leftMargin = entity->getLeftMargin();
|
||||||
_rightMargin = entity->getRightMargin();
|
_rightMargin = entity->getRightMargin();
|
||||||
_topMargin = entity->getTopMargin();
|
_topMargin = entity->getTopMargin();
|
||||||
_bottomMargin = entity->getBottomMargin();
|
_bottomMargin = entity->getBottomMargin();
|
||||||
_unlit = entity->getUnlit();
|
|
||||||
_font = entity->getFont();
|
_font = entity->getFont();
|
||||||
_effect = entity->getTextEffect();
|
_effect = entity->getTextEffect();
|
||||||
_effectColor = toGlm(entity->getTextEffectColor());
|
_effectColor = toGlm(entity->getTextEffectColor());
|
||||||
_effectThickness = entity->getTextEffectThickness();
|
_effectThickness = entity->getTextEffectThickness();
|
||||||
|
|
||||||
|
bool materialChanged = false;
|
||||||
|
glm::vec3 color = toGlm(entity->getBackgroundColor());
|
||||||
|
if (_backgroundColor != color) {
|
||||||
|
_backgroundColor = color;
|
||||||
|
_material->setAlbedo(color);
|
||||||
|
materialChanged = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
float alpha = entity->getBackgroundAlpha();
|
||||||
|
if (_backgroundAlpha != alpha) {
|
||||||
|
_backgroundAlpha = alpha;
|
||||||
|
_material->setOpacity(alpha);
|
||||||
|
materialChanged = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
auto unlit = entity->getUnlit();
|
||||||
|
if (_unlit != unlit) {
|
||||||
|
_unlit = unlit;
|
||||||
|
_material->setUnlit(_unlit);
|
||||||
|
materialChanged = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
updateMaterials(materialChanged);
|
||||||
|
|
||||||
updateTextRenderItem();
|
updateTextRenderItem();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool TextEntityRenderer::isTransparent() const {
|
||||||
|
bool backgroundTransparent = _backgroundAlpha < 1.0f || _pulseProperties.getAlphaMode() != PulseMode::NONE;
|
||||||
|
return backgroundTransparent || Parent::isTransparent() || materialsTransparent();
|
||||||
|
}
|
||||||
|
|
||||||
|
bool TextEntityRenderer::isTextTransparent() const {
|
||||||
|
return Parent::isTransparent() || _textAlpha < 1.0f || _pulseProperties.getAlphaMode() != PulseMode::NONE;
|
||||||
|
}
|
||||||
|
|
||||||
|
Item::Bound TextEntityRenderer::getBound(RenderArgs* args) {
|
||||||
|
return Parent::getMaterialBound(args);
|
||||||
|
}
|
||||||
|
|
||||||
|
ItemKey TextEntityRenderer::getKey() {
|
||||||
|
return ItemKey::Builder(Parent::getKey()).withMetaCullGroup();
|
||||||
|
}
|
||||||
|
|
||||||
|
ShapeKey TextEntityRenderer::getShapeKey() {
|
||||||
|
auto builder = render::ShapeKey::Builder();
|
||||||
|
updateShapeKeyBuilderFromMaterials(builder);
|
||||||
|
return builder.build();
|
||||||
|
}
|
||||||
|
|
||||||
|
uint32_t TextEntityRenderer::metaFetchMetaSubItems(ItemIDs& subItems) const {
|
||||||
|
auto parentSubs = Parent::metaFetchMetaSubItems(subItems);
|
||||||
|
if (Item::isValidID(_textRenderID)) {
|
||||||
|
subItems.emplace_back(_textRenderID);
|
||||||
|
return parentSubs + 1;
|
||||||
|
}
|
||||||
|
return parentSubs;
|
||||||
|
}
|
||||||
|
|
||||||
void TextEntityRenderer::doRender(RenderArgs* args) {
|
void TextEntityRenderer::doRender(RenderArgs* args) {
|
||||||
PerformanceTimer perfTimer("RenderableTextEntityItem::render");
|
PerformanceTimer perfTimer("RenderableTextEntityItem::render");
|
||||||
Q_ASSERT(args->_batch);
|
Q_ASSERT(args->_batch);
|
||||||
gpu::Batch& batch = *args->_batch;
|
|
||||||
|
|
||||||
glm::vec4 backgroundColor;
|
graphics::MultiMaterial materials;
|
||||||
Transform transform;
|
{
|
||||||
withReadLock([&] {
|
std::lock_guard<std::mutex> lock(_materialsLock);
|
||||||
transform = _renderTransform;
|
materials = _materials["0"];
|
||||||
|
}
|
||||||
|
|
||||||
float fadeRatio = _isFading ? Interpolate::calculateFadeRatio(_fadeStartTime) : 1.0f;
|
auto& schema = materials.getSchemaBuffer().get<graphics::MultiMaterial::Schema>();
|
||||||
backgroundColor = glm::vec4(_backgroundColor, fadeRatio * _backgroundAlpha);
|
glm::vec4 backgroundColor = glm::vec4(ColorUtils::tosRGBVec3(schema._albedo), schema._opacity);
|
||||||
});
|
|
||||||
backgroundColor = EntityRenderer::calculatePulseColor(backgroundColor, _pulseProperties, _created);
|
backgroundColor = EntityRenderer::calculatePulseColor(backgroundColor, _pulseProperties, _created);
|
||||||
|
|
||||||
if (backgroundColor.a <= 0.0f) {
|
if (backgroundColor.a <= 0.0f) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
gpu::Batch& batch = *args->_batch;
|
||||||
|
|
||||||
|
bool transparent;
|
||||||
|
Transform transform;
|
||||||
|
withReadLock([&] {
|
||||||
|
transparent = isTransparent();
|
||||||
|
transform = _renderTransform;
|
||||||
|
});
|
||||||
|
|
||||||
transform.setRotation(BillboardModeHelpers::getBillboardRotation(transform.getTranslation(), transform.getRotation(), _billboardMode,
|
transform.setRotation(BillboardModeHelpers::getBillboardRotation(transform.getTranslation(), transform.getRotation(), _billboardMode,
|
||||||
args->_renderMode == RenderArgs::RenderMode::SHADOW_RENDER_MODE ? BillboardModeHelpers::getPrimaryViewFrustumPosition() : args->getViewFrustum().getPosition()));
|
args->_renderMode == RenderArgs::RenderMode::SHADOW_RENDER_MODE ? BillboardModeHelpers::getPrimaryViewFrustumPosition() : args->getViewFrustum().getPosition()));
|
||||||
batch.setModelTransform(transform);
|
batch.setModelTransform(transform);
|
||||||
|
|
||||||
auto geometryCache = DependencyManager::get<GeometryCache>();
|
Pipeline pipelineType = getPipelineType(materials);
|
||||||
// FIXME: we want to use instanced rendering here, but if textAlpha < 1 and backgroundAlpha < 1, the transparency sorting will be wrong
|
if (pipelineType == Pipeline::PROCEDURAL) {
|
||||||
//render::ShapePipelinePointer pipeline = geometryCache->getShapePipelinePointer(backgroundColor.a < 1.0f, _unlit,
|
auto procedural = std::static_pointer_cast<graphics::ProceduralMaterial>(materials.top().material);
|
||||||
// _renderLayer != RenderLayer::WORLD || args->_renderMethod == Args::RenderMethod::FORWARD);
|
transparent |= procedural->isFading();
|
||||||
//if (render::ShapeKey(args->_globalShapeKey).isWireframe() || _primitiveMode == PrimitiveMode::LINES) {
|
procedural->prepare(batch, transform.getTranslation(), transform.getScale(), transform.getRotation(), _created, ProceduralProgramKey(transparent));
|
||||||
// geometryCache->renderWireShapeInstance(args, batch, GeometryCache::Quad, backgroundColor, pipeline);
|
} else if (pipelineType == Pipeline::MATERIAL) {
|
||||||
//} else {
|
if (RenderPipelines::bindMaterials(materials, batch, args->_renderMode, args->_enableTexturing)) {
|
||||||
// geometryCache->renderSolidShapeInstance(args, batch, GeometryCache::Quad, backgroundColor, pipeline);
|
args->_details._materialSwitches++;
|
||||||
//}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
auto geometryCache = DependencyManager::get<GeometryCache>();
|
||||||
geometryCache->renderQuad(batch, glm::vec2(-0.5), glm::vec2(0.5), backgroundColor, _geometryID);
|
geometryCache->renderQuad(batch, glm::vec2(-0.5), glm::vec2(0.5), backgroundColor, _geometryID);
|
||||||
|
|
||||||
const int TRIANBLES_PER_QUAD = 2;
|
const int TRIANGLES_PER_QUAD = 2;
|
||||||
args->_details._trianglesRendered += TRIANBLES_PER_QUAD;
|
args->_details._trianglesRendered += TRIANGLES_PER_QUAD;
|
||||||
}
|
}
|
||||||
|
|
||||||
QSizeF TextEntityRenderer::textSize(const QString& text) const {
|
QSizeF TextEntityRenderer::textSize(const QString& text) const {
|
||||||
|
|
|
@ -14,6 +14,8 @@
|
||||||
|
|
||||||
#include "RenderableEntityItem.h"
|
#include "RenderableEntityItem.h"
|
||||||
|
|
||||||
|
#include <procedural/Procedural.h>
|
||||||
|
|
||||||
class TextEntityItem;
|
class TextEntityItem;
|
||||||
class TextRenderer3D;
|
class TextRenderer3D;
|
||||||
|
|
||||||
|
@ -33,6 +35,7 @@ public:
|
||||||
protected:
|
protected:
|
||||||
bool isTransparent() const override;
|
bool isTransparent() const override;
|
||||||
bool isTextTransparent() const;
|
bool isTextTransparent() const;
|
||||||
|
Item::Bound getBound(RenderArgs* args) override;
|
||||||
ShapeKey getShapeKey() override;
|
ShapeKey getShapeKey() override;
|
||||||
ItemKey getKey() override;
|
ItemKey getKey() override;
|
||||||
virtual uint32_t metaFetchMetaSubItems(ItemIDs& subItems) const override;
|
virtual uint32_t metaFetchMetaSubItems(ItemIDs& subItems) const override;
|
||||||
|
@ -41,6 +44,7 @@ protected:
|
||||||
void onRemoveFromSceneTyped(const TypedEntityPointer& entity) override;
|
void onRemoveFromSceneTyped(const TypedEntityPointer& entity) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
virtual bool needsRenderUpdate() const;
|
||||||
virtual void doRenderUpdateSynchronousTyped(const ScenePointer& scene, Transaction& transaction, const TypedEntityPointer& entity) override;
|
virtual void doRenderUpdateSynchronousTyped(const ScenePointer& scene, Transaction& transaction, const TypedEntityPointer& entity) override;
|
||||||
virtual void doRenderUpdateAsynchronousTyped(const TypedEntityPointer& entity) override;
|
virtual void doRenderUpdateAsynchronousTyped(const TypedEntityPointer& entity) override;
|
||||||
virtual void doRender(RenderArgs* args) override;
|
virtual void doRender(RenderArgs* args) override;
|
||||||
|
@ -53,10 +57,12 @@ private:
|
||||||
float _lineHeight;
|
float _lineHeight;
|
||||||
glm::vec3 _textColor;
|
glm::vec3 _textColor;
|
||||||
float _textAlpha;
|
float _textAlpha;
|
||||||
glm::vec3 _backgroundColor;
|
|
||||||
float _backgroundAlpha;
|
|
||||||
bool _unlit;
|
bool _unlit;
|
||||||
|
|
||||||
|
std::shared_ptr<graphics::ProceduralMaterial> _material { std::make_shared<graphics::ProceduralMaterial>() };
|
||||||
|
glm::vec3 _backgroundColor { NAN };
|
||||||
|
float _backgroundAlpha { NAN };
|
||||||
|
|
||||||
float _leftMargin;
|
float _leftMargin;
|
||||||
float _rightMargin;
|
float _rightMargin;
|
||||||
float _topMargin;
|
float _topMargin;
|
||||||
|
|
Loading…
Reference in a new issue