mirror of
https://github.com/cocos/cocos4.git
synced 2026-11-19 14:52:40 +08:00
fix(scene): LOD screen usage distance truncated to int (native platform) (#343)
* Changed the GeometryRenderer and DebugRenderer from using intrusive calls to registering callbacks (custom pipeline). * Changed the GeometryRenderer and DebugRenderer from using intrusive calls to registering callbacks. (old pipeline) * CI error: Function parameter names cannot be omitted. * Move the devil string to macro * fix(mesh): hoose index format by max index value in createMesh * perf(pipeline): reduce render queue sort to two packed key compares (native platform). * fix CI error caused by native/cocos/base/Utils.h * fix(scene): LOD screen usage distance truncated to int (native platform)
This commit is contained in:
@@ -60,7 +60,7 @@ float LODGroup::getScreenUsagePercentage(const Camera *camera) const {
|
||||
return 0;
|
||||
}
|
||||
|
||||
auto distance = 0;
|
||||
float distance = 0.0F;
|
||||
if (camera->getProjectionType() == CameraProjection::PERSPECTIVE) {
|
||||
Vec3 tmp{_localBoundaryCenter};
|
||||
tmp.transformMat4(_node->getWorldMatrix());
|
||||
|
||||
Reference in New Issue
Block a user