fix(scene): Self-illuminated model nodes must not receive shadows
This commit is contained in:
parent
fb2929fb89
commit
f83516cf42
1 changed files with 6 additions and 1 deletions
|
@ -130,10 +130,15 @@ void ModelNodeSceneNode::renderSingle(bool shadowPass) const {
|
|||
locals.bumpmap.gridSize = glm::vec2(bumpmapTexture->features().numX, bumpmapTexture->features().numY);
|
||||
locals.bumpmap.frame = _bumpmapFrame;
|
||||
}
|
||||
bool receivesShadows = _modelSceneNode->model()->classification() == Model::Classification::Other;
|
||||
|
||||
bool receivesShadows =
|
||||
_modelSceneNode->model()->classification() == Model::Classification::Other &&
|
||||
!_modelNode->isSelfIllumEnabled();
|
||||
|
||||
if (receivesShadows) {
|
||||
locals.general.shadowsEnabled = true;
|
||||
}
|
||||
|
||||
shared_ptr<ModelNode::Skin> skin(_modelNode->skin());
|
||||
if (skin) {
|
||||
locals.general.skeletalEnabled = true;
|
||||
|
|
Loading…
Reference in a new issue