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.min = transform344(model_mat, box.min);
box.max = transform344(model_mat, box.max); 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)) { if (!frustum_test_aabb(m.frustum_state, box)) {
return false; 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.min = transform344(model_mat, box.min);
box.max = transform344(model_mat, box.max); 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)) { if (!frustum_test_aabb(m.frustum_state, box)) {
return false; 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.min = transform344(model_mat, box.min);
box.max = transform344(model_mat, box.max); 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)) { if (!frustum_test_aabb(m.frustum_state, box)) {
return false; return false;
} }

Binary file not shown.

Binary file not shown.

View File

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

Binary file not shown.

Binary file not shown.