| 420 | } |
| 421 | |
| 422 | float resol2 = detail2 * Square(scale); |
| 423 | // disable decal LODs |
| 424 | int level = shape->FindSqrtLevel(resol2, true); |
| 425 | |
| 426 | return level; |
| 427 | } |
| 428 | |
| 429 | int Scene::LevelShadowFromDistance2(LODShape* shape, float distance2, float oScale, Vector3Par direction, |
| 430 | Vector3Par viewDirection) |
| 431 | { |
| 432 | distance2 *= 8; |
| 433 | |
| 434 | float scale = GetCamera()->Left(); |
| 435 | float diameter = shape->BoundingSphere() * 2 * oScale; |
| 436 | |
| 437 | float pixelLimit = 0.25; |
| 438 | float detail2 = distance2 * Square(_lodInvWidth); |
| 439 | |
| 440 | if (Square(diameter) < Square(pixelLimit * scale) * detail2) |
| 441 | { |
| 442 | return LOD_INVISIBLE; |
| 443 | } |
| 444 | |
| 445 | if (shape->NLevels() < 2) |
| 446 | { |
| 447 | return 0; |
| 448 | } |
| 449 | float limit = ENGINE_CONFIG.shadowLODLimit; |
| 450 | saturateMax(detail2, Square(diameter * limit)); |
| 451 | float resol2 = detail2 * Square(scale); |
| 452 | // disable decal LODs |
nothing calls this directly
no test coverage detected