stupid, shadows still broken

This commit is contained in:
HifiExperiments 2019-11-26 22:28:06 -08:00 committed by Kasen IO
parent 1736252f0d
commit 6156495345
2 changed files with 5 additions and 3 deletions

View file

@ -1060,7 +1060,7 @@ void ModelEntityRenderer::setKey(bool didVisualGeometryRequestSucceed) {
if (!_cullWithParent && _model && _model->isGroupCulled()) {
builder.withMetaCullGroup();
} else if (_cullWithParent) {
builder.withoutSubMetaCulled();
builder.withSubMetaCulled();
}
if (didVisualGeometryRequestSucceed) {

View file

@ -965,9 +965,11 @@ void Model::setCullWithParent(bool cullWithParent) {
_cullWithParent = cullWithParent;
render::Transaction transaction;
foreach(auto item, _modelMeshRenderItemsMap.keys()) {
transaction.updateItem<ModelMeshPartPayload>(item, [cullWithParent](ModelMeshPartPayload& data) {
auto renderItemsKey = _renderItemKeyGlobalFlags;
for(auto item : _modelMeshRenderItemIDs) {
transaction.updateItem<ModelMeshPartPayload>(item, [cullWithParent, renderItemsKey](ModelMeshPartPayload& data) {
data.setCullWithParent(cullWithParent);
data.updateKey(renderItemsKey);
});
}
AbstractViewStateInterface::instance()->getMain3DScene()->enqueueTransaction(transaction);