minor culling tweaks

main
Dominik Madarász 2024-08-24 14:23:06 +02:00
parent d3cbd939c7
commit 92b61c9996
8 changed files with 27 additions and 4 deletions

View File

@ -386009,6 +386009,12 @@ bool model_is_visible(model_t m, int mesh, mat44 model_mat) {
box.min = transform344(model_mat, box.min);
box.max = transform344(model_mat, box.max);
#if 0
// ddraw_sphere(s.c, s.r);
ddraw_aabb(box.min, box.max);
ddraw_position(s.c, 3.0f);
#endif
if (!frustum_test_aabb(m.frustum_state, box)) {
return false;
}

View File

@ -4353,6 +4353,12 @@ bool model_is_visible(model_t m, int mesh, mat44 model_mat) {
box.min = transform344(model_mat, box.min);
box.max = transform344(model_mat, box.max);
#if 0
// ddraw_sphere(s.c, s.r);
ddraw_aabb(box.min, box.max);
ddraw_position(s.c, 3.0f);
#endif
if (!frustum_test_aabb(m.frustum_state, box)) {
return false;
}

View File

@ -21152,6 +21152,12 @@ bool model_is_visible(model_t m, int mesh, mat44 model_mat) {
box.min = transform344(model_mat, box.min);
box.max = transform344(model_mat, box.max);
#if 0
// ddraw_sphere(s.c, s.r);
ddraw_aabb(box.min, box.max);
ddraw_position(s.c, 3.0f);
#endif
if (!frustum_test_aabb(m.frustum_state, box)) {
return false;
}

Binary file not shown.

Binary file not shown.

View File

@ -1409,13 +1409,13 @@ flags |= (doflipUV ? aiProcess_FlipUVs : 0);
#else
int flags = 0
| aiProcessPreset_TargetRealtime_MaxQuality
| aiProcess_JoinIdenticalVertices
// | aiProcess_JoinIdenticalVertices
| aiProcess_GenSmoothNormals
| aiProcess_GenUVCoords
| aiProcess_TransformUVCoords
| aiProcess_LimitBoneWeights // #defined as AI_LMW_MAX_WEIGHTS 4
| aiProcess_ImproveCacheLocality
//| aiProcess_RemoveRedundantMaterials
// | aiProcess_ImproveCacheLocality
| aiProcess_RemoveRedundantMaterials
| aiProcess_OptimizeMeshes // aiProcess_SplitLargeMeshes
| (doflipUV ? aiProcess_FlipUVs : 0)
| aiProcess_OptimizeGraph
@ -1425,6 +1425,11 @@ flags |= (doflipUV ? aiProcess_FlipUVs : 0);
| aiProcess_GlobalScale // AI_CONFIG_GLOBAL_SCALE_FACTOR_KEY
;
// flags &= ~aiProcess_OptimizeMeshes;
// flags &= ~aiProcess_RemoveRedundantMaterials;
// flags &= ~aiProcess_ImproveCacheLocality;
// flags &= ~aiProcess_JoinIdenticalVertices;
// | aiProcess_CalcTangentSpace
// | aiProcess_Triangulate
// | aiProcess_SortByPType

Binary file not shown.

Binary file not shown.