mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-16 12:20:12 +02:00
Adjust offset when skipping parts that don't match the translucency setting.
Closes #2001.
This commit is contained in:
parent
f4b47ea443
commit
76142c92f2
1 changed files with 2 additions and 2 deletions
|
@ -915,11 +915,11 @@ void Model::renderMeshes(float alpha, bool translucent) {
|
|||
qint64 offset = 0;
|
||||
for (int j = 0; j < networkMesh.parts.size(); j++) {
|
||||
const NetworkMeshPart& networkPart = networkMesh.parts.at(j);
|
||||
const FBXMeshPart& part = mesh.parts.at(j);
|
||||
if (networkPart.isTranslucent() != translucent) {
|
||||
offset += (part.quadIndices.size() + part.triangleIndices.size()) * sizeof(int);
|
||||
continue;
|
||||
}
|
||||
const FBXMeshPart& part = mesh.parts.at(j);
|
||||
|
||||
// apply material properties
|
||||
glm::vec4 diffuse = glm::vec4(part.diffuseColor, alpha);
|
||||
glm::vec4 specular = glm::vec4(part.specularColor, alpha);
|
||||
|
|
Loading…
Reference in a new issue