Object Occlusion Culling

This commit is contained in:
2026-10-15 02:41:03 -07:00
parent 3273054766
commit 612a3d0a09
33 changed files with 3629 additions and 84 deletions

View File

@ -249,6 +249,9 @@ let project = new Project('""" + lnx.utils.safesrc(wrd.lnx_project_name + '-' +
if not os.path.exists(os.path.join('Libraries', 'lib/hscript')):
khafile.write(add_leenkx_library(sdk_path, 'lib/hscript', rel_path=do_relpath_sdk))
khafile.write("project.addDefine('" + 'hscript' + "');\n")
if lnx.utils.get_rp().lnx_radix:
if not os.path.exists(os.path.join('Libraries', 'lib/radix')):
khafile.write(add_leenkx_library(sdk_path, 'lib/radix', rel_path=do_relpath_sdk))
# Project libraries
if os.path.exists('Libraries'):
@ -522,6 +525,9 @@ let project = new Project('""" + lnx.utils.safesrc(wrd.lnx_project_name + '-' +
if rpdat.rp_draw_order == 'Index':
assets.add_khafile_def('lnx_draworder_index')
if rpdat.lnx_radix:
assets.add_khafile_def('lnx_radix')
if lnx.utils.get_viewport_controls() == 'azerty':
assets.add_khafile_def('lnx_azerty')
@ -721,6 +727,11 @@ class Main {
f.write("\n" + content_indent + "iron.object.LightObject.cascadeSplitFactor = " + str(rpdat.lnx_shadowmap_split) + ";")
if rpdat.lnx_shadowmap_bounds != 1.0:
f.write("\n" + content_indent + "iron.object.LightObject.cascadeBounds = " + str(rpdat.lnx_shadowmap_bounds) + ";")
if rpdat.lnx_occlusion_culling:
depth_eps = max(10.0 ** -int(rpdat.lnx_occlusion_depth_eps), 1e-6)
f.write("\n" + content_indent + "iron.culling.CullSystem.boxShrink = " + str(rpdat.lnx_occlusion_box_shrink / 100) + ";")
f.write("\n" + content_indent + "iron.culling.CullSystem.depthEps = " + str(depth_eps) + ";")
asset_references = list(set(assets.assets))