Reduce max bones per mesh to 48;

This commit is contained in:
bjorn 2017-11-25 12:29:40 -08:00
parent f63c3c9261
commit bb90c8d378
3 changed files with 3 additions and 2 deletions

View File

@ -16,7 +16,7 @@ const char* lovrShaderVertexPrefix = ""
#else
"#version 150 \n"
#endif
"#define MAX_BONES 60 \n"
"#define MAX_BONES 48 \n"
"in vec3 lovrPosition; \n"
"in vec3 lovrNormal; \n"
"in vec2 lovrTexCoord; \n"

View File

@ -184,6 +184,7 @@ ModelData* lovrModelDataCreate(Blob* blob) {
struct aiPropertyStore* propertyStore = aiCreatePropertyStore();
aiSetImportPropertyInteger(propertyStore, AI_CONFIG_PP_SBP_REMOVE, aiPrimitiveType_POINT | aiPrimitiveType_LINE);
aiSetImportPropertyInteger(propertyStore, AI_CONFIG_PP_SBBC_MAX_BONES, 48);
unsigned int flags = aiProcessPreset_TargetRealtime_MaxQuality | aiProcess_OptimizeGraph | aiProcess_FlipUVs | aiProcess_SplitByBoneCount;
const struct aiScene* scene = aiImportFileExWithProperties(blob->name, flags, &assimpIO, propertyStore);
aiReleasePropertyStore(propertyStore);

View File

@ -7,7 +7,7 @@
#pragma once
#define MAX_BONES_PER_VERTEX 4
#define MAX_BONES 60
#define MAX_BONES 48
typedef union {
void* data;