forked from LeenkxTeam/LNXSDK
Patch_2
This commit is contained in:
@ -154,6 +154,17 @@ project.addSources('Sources');
|
||||
assets.add_khafile_def('lnx_oimo')
|
||||
if not os.path.exists('Libraries/oimo'):
|
||||
khafile.write(add_leenkx_library(sdk_path + '/lib/', 'oimo', rel_path=do_relpath_sdk))
|
||||
elif wrd.lnx_physics_engine == 'Jolt':
|
||||
assets.add_khafile_def('lnx_jolt')
|
||||
if not os.path.exists('Libraries/haxejolt'):
|
||||
khafile.write(add_leenkx_library(sdk_path + '/lib/', 'haxejolt', rel_path=do_relpath_sdk))
|
||||
if state.target.startswith('krom') or state.target == 'html5' or state.target == 'node':
|
||||
joltjs_path = sdk_path + '/lib/haxejolt/jolt/jolt.wasm.js'
|
||||
joltjs_path = joltjs_path.replace('\\', '/').replace('//', '/')
|
||||
khafile.write(add_assets(joltjs_path, rel_path=do_relpath_sdk))
|
||||
joltjs_wasm_path = sdk_path + '/lib/haxejolt/jolt/jolt.wasm.wasm'
|
||||
joltjs_wasm_path = joltjs_wasm_path.replace('\\', '/').replace('//', '/')
|
||||
khafile.write(add_assets(joltjs_wasm_path, rel_path=do_relpath_sdk))
|
||||
|
||||
if export_navigation:
|
||||
assets.add_khafile_def('lnx_navigation')
|
||||
@ -209,6 +220,8 @@ project.addSources('Sources');
|
||||
|
||||
if wrd.lnx_render_viewport:
|
||||
assets.add_khafile_def('lnx_render_viewport')
|
||||
if state.is_viewport:
|
||||
assets.add_khafile_def('lnx_viewport')
|
||||
import_traits = list(set(import_traits))
|
||||
for i in range(0, len(import_traits)):
|
||||
khafile.write("project.addParameter('" + import_traits[i] + "');\n")
|
||||
@ -447,9 +460,12 @@ def write_config(resx, resy):
|
||||
'window_msaa': int(rpdat.lnx_samples_per_pixel),
|
||||
'window_scale': 1.0,
|
||||
'rp_supersample': float(rpdat.rp_supersampling),
|
||||
'rp_fsr1': rpdat.rp_fsr1 if rpdat.rp_fsr1 != 'Off' else False,
|
||||
'rp_fsr1_sharpness': rpdat.rp_fsr1_sharpness if rpdat.rp_fsr1 == 'Custom' else 0.25,
|
||||
'rp_shadowmap_cube': rp_shadowmap_cube,
|
||||
'rp_shadowmap_cascade': rp_shadowmap_cascade,
|
||||
'rp_ssgi': rpdat.rp_ssgi != 'Off',
|
||||
'rp_ssao': rpdat.rp_ssao,
|
||||
'rp_ssgi': rpdat.rp_ssgi,
|
||||
'rp_ssr': rpdat.rp_ssr != 'Off',
|
||||
'rp_ss_refraction': rpdat.rp_ss_refraction != 'Off',
|
||||
'rp_bloom': rpdat.rp_bloom != 'Off',
|
||||
@ -672,18 +688,20 @@ const float waterReflect = """ + str(round(rpdat.lnx_water_reflect * 100) / 100)
|
||||
f'const float ditherStrengthValue = {rpdat.lnx_dithering_strength};\n'
|
||||
)
|
||||
|
||||
if rpdat.rp_ssgi == 'SSAO' or rpdat.rp_ssgi == 'SSGI' or rpdat.rp_ssgi == 'RTAO' or rpdat.rp_volumetriclight:
|
||||
if rpdat.rp_ssao or rpdat.rp_volumetriclight:
|
||||
f.write(
|
||||
"""const float ssaoRadius = """ + str(round(rpdat.lnx_ssgi_radius * 100) / 100) + """;
|
||||
const float ssaoStrength = """ + str(round(rpdat.lnx_ssgi_strength * 100) / 100) + """;
|
||||
const float ssaoScale = """ + ("2.0" if rpdat.lnx_ssgi_half_res else "20.0") + """;
|
||||
"""const float ssaoRadius = """ + str(round(rpdat.lnx_ssao_radius * 100) / 100) + """;
|
||||
const float ssaoStrength = """ + str(round(rpdat.lnx_ssao_strength * 100) / 100) + """;
|
||||
const float ssaoScale = """ + ("2.0" if rpdat.lnx_ssao_half_res else "20.0") + """;
|
||||
const int ssaoSamples = """ + str(rpdat.lnx_ssao_samples) + """;
|
||||
""")
|
||||
|
||||
if rpdat.rp_ssgi == 'RTGI' or rpdat.rp_ssgi == 'RTAO' or rpdat.rp_ssgi == 'SSGI' :
|
||||
if rpdat.rp_ssgi:
|
||||
f.write(
|
||||
"""const int ssgiSamples = """ + str(rpdat.lnx_ssgi_samples) + """;
|
||||
const float ssgiRayStep = 0.005 * """ + str(round(rpdat.lnx_ssgi_step * 100) / 100) + """;
|
||||
const float ssgiStrength = """ + str(round(rpdat.lnx_ssgi_strength * 100) / 100) + """;
|
||||
const float ssgiRadius = """ + str(round(rpdat.lnx_ssgi_radius * 100) / 100) + """;
|
||||
""")
|
||||
|
||||
if rpdat.rp_bloom:
|
||||
@ -836,7 +854,7 @@ const float voxelgiDiff = """ + str(round(rpdat.lnx_voxelgi_diff * 100) / 100) +
|
||||
const float voxelgiRefl = """ + str(round(rpdat.lnx_voxelgi_spec * 100) / 100) + """;
|
||||
const float voxelgiRefr = """ + str(round(rpdat.lnx_voxelgi_refr * 100) / 100) + """;
|
||||
""")
|
||||
if rpdat.rp_sss:
|
||||
if rpdat.rp_sss or '_SSS' in wrd.world_defs:
|
||||
f.write(f"const float sssWidth = {rpdat.lnx_sss_width / 10.0};\n")
|
||||
|
||||
# Skinning
|
||||
|
||||
Reference in New Issue
Block a user