FIxing the web entity rendering

This commit is contained in:
samcake 2016-07-14 15:49:49 -07:00
parent ffc12f93f0
commit 776bcb6655
3 changed files with 10 additions and 3 deletions

View file

@ -70,8 +70,8 @@ void packDeferredFragmentUnlit(vec3 normal, float alpha, vec3 color) {
}
_fragColor0 = vec4(color, packUnlit());
_fragColor1 = vec4(packNormal(normal), 1.0);
_fragColor2 = vec4(vec3(0.0), 1.0);
_fragColor3 = vec4(color * isUnlitEnabled(), 1.0);
// _fragColor2 = vec4(vec3(0.0), 1.0);
_fragColor3 = vec4(color, 1.0);
}
void packDeferredFragmentTranslucent(vec3 normal, float alpha, vec3 albedo, vec3 fresnel, float roughness) {

View file

@ -40,5 +40,5 @@ void main(void) {
packDeferredFragmentUnlit(
normalize(_normal),
opacity,
albedo);
albedo * isUnlitEnabled());
}

View file

@ -572,6 +572,12 @@ public:
auto children = _config->children();
for (auto& child : children) {
child->setParent(config.get());
QObject::connect(child, SIGNAL(loaded()), config.get(), SLOT(refresh()));
static const char* DIRTY_SIGNAL = "dirty()";
if (child->metaObject()->indexOfSignal(DIRTY_SIGNAL) != -1) {
// Connect dirty->refresh if defined
QObject::connect(child, SIGNAL(dirty()), config.get(), SLOT(refresh()));
}
}
}
_config = config;
@ -588,6 +594,7 @@ public:
void configure(const QObject& configuration) {
for (auto& job : _jobs) {
job.applyConfiguration();
}
}