Fix orthogonal camera auto LOD calculation
- Do not take orthogonal camera's distance into account when calculating LOD. - Only take into account screen size taken up.
This commit is contained in:
parent
2f57a11ed9
commit
b0202c3a7d
2 changed files with 8 additions and 0 deletions
|
@ -1081,6 +1081,10 @@ void RenderForwardClustered::_fill_render_list(RenderListType p_render_list, con
|
|||
distance = -distance_max;
|
||||
}
|
||||
|
||||
if (p_render_data->cam_ortogonal) {
|
||||
distance = 1.0;
|
||||
}
|
||||
|
||||
uint32_t indices;
|
||||
surf->sort.lod_index = storage->mesh_surface_get_lod(surf->surface, inst->lod_model_scale * inst->lod_bias, distance * p_render_data->lod_distance_multiplier, p_render_data->screen_mesh_lod_threshold, &indices);
|
||||
if (p_render_data->render_info) {
|
||||
|
|
|
@ -1429,6 +1429,10 @@ void RenderForwardMobile::_fill_render_list(RenderListType p_render_list, const
|
|||
distance = -distance_max;
|
||||
}
|
||||
|
||||
if (p_render_data->cam_ortogonal) {
|
||||
distance = 1.0;
|
||||
}
|
||||
|
||||
uint32_t indices;
|
||||
surf->lod_index = storage->mesh_surface_get_lod(surf->surface, inst->lod_model_scale * inst->lod_bias, distance * p_render_data->lod_distance_multiplier, p_render_data->screen_mesh_lod_threshold, &indices);
|
||||
if (p_render_data->render_info) {
|
||||
|
|
Loading…
Reference in a new issue