forked from LeenkxTeam/LNXSDK
Update
This commit is contained in:
@ -133,6 +133,7 @@ def build(material: Material, mat_users: Dict[Material, List[Object]], mat_lnxus
|
||||
shader_data_path = lnx.utils.get_fp_build() + '/compiled/Shaders/' + shader_data_name + '.lnx'
|
||||
assets.add_shader_data(shader_data_path)
|
||||
|
||||
# Store SSS state in the return tuple so it's preserved per-material
|
||||
needs_sss_result = mat_state.needs_sss
|
||||
return rpasses, mat_state.data, shader_data_name, bind_constants, bind_textures, needs_sss_result
|
||||
|
||||
@ -172,10 +173,9 @@ def write_shader(rel_path: str, shader: Shader, ext: str, rpass: str, matname: s
|
||||
shader_path = lnx.utils.get_fp() + '/' + rel_path + '/' + shader_file
|
||||
assets.add_shader(shader_path)
|
||||
if not os.path.isfile(shader_path) or not keep_cache:
|
||||
with open(shader_path, 'w') as f:
|
||||
f.write(shader.get())
|
||||
written = lnx.utils.write_if_changed(shader_path, shader.get())
|
||||
|
||||
if shader.noprocessing:
|
||||
if written and shader.noprocessing:
|
||||
cwd = os.getcwd()
|
||||
os.chdir(lnx.utils.get_fp() + '/' + rel_path)
|
||||
hlslbin_path = lnx.utils.get_sdk_path() + '/lib/leenkx_tools/hlslbin/hlslbin.exe'
|
||||
|
||||
Reference in New Issue
Block a user