forked from LeenkxTeam/LNXSDK
merge upstream
This commit is contained in:
@ -144,7 +144,7 @@ float ConvertEV100ToExposure(float EV100) {
|
||||
return 1/0.8 * exp2(-EV100);
|
||||
}
|
||||
float ComputeEV(float avgLuminance) {
|
||||
const float sqAperture = PPComp1[0].x * PPComp1.x;
|
||||
const float sqAperture = PPComp1.x * PPComp1.x;
|
||||
const float shutterTime = 1.0 / PPComp1.y;
|
||||
const float ISO = PPComp1.z;
|
||||
const float EC = PPComp2.x;
|
||||
|
@ -49,7 +49,7 @@ class Postprocess {
|
||||
0.01, //4: Fisheye Distortion
|
||||
1, //5: DoF AutoFocus §§ If true, it ignores the DoF Distance setting
|
||||
10.0, //6: DoF Distance
|
||||
160.0, //7: DoF Focal Length mm
|
||||
50.0, //7: DoF Focal Length mm
|
||||
128, //8: DoF F-Stop
|
||||
0, //9: Tonemapping Method
|
||||
2.0, //10: Distort
|
||||
|
@ -540,7 +540,7 @@ class LeenkxExporter:
|
||||
o['material_refs'].append(lnx.utils.asset_name(material))
|
||||
|
||||
def export_particle_system_ref(self, psys: bpy.types.ParticleSystem, out_object):
|
||||
if psys.settings.instance_object is None or psys.settings.render_type != 'OBJECT' or not psys.settings.instance_object.lnx_export:
|
||||
if psys.settings.instance_object is None or psys.settings.render_type != 'OBJECT' or not psys.settings.instance_object.lnx_export or not bpy.data.objects[out_object['name']].modifiers[psys.name].show_render:
|
||||
return
|
||||
|
||||
self.particle_system_array[psys.settings] = {"structName": psys.settings.name}
|
||||
@ -910,7 +910,8 @@ class LeenkxExporter:
|
||||
out_object['particle_refs'] = []
|
||||
out_object['render_emitter'] = bobject.show_instancer_for_render
|
||||
for i in range(num_psys):
|
||||
self.export_particle_system_ref(bobject.particle_systems[i], out_object)
|
||||
if bobject.modifiers[bobject.particle_systems[i].name].show_render:
|
||||
self.export_particle_system_ref(bobject.particle_systems[i], out_object)
|
||||
|
||||
aabb = bobject.data.lnx_aabb
|
||||
if aabb[0] == 0 and aabb[1] == 0 and aabb[2] == 0:
|
||||
@ -2280,6 +2281,15 @@ class LeenkxExporter:
|
||||
if len(self.particle_system_array) > 0:
|
||||
self.output['particle_datas'] = []
|
||||
for particleRef in self.particle_system_array.items():
|
||||
padd = False;
|
||||
for obj in self.output['objects']:
|
||||
if 'particle_refs' in obj:
|
||||
for pref in obj['particle_refs']:
|
||||
if pref['particle'] == particleRef[1]["structName"]:
|
||||
if bpy.data.objects[obj['name']].modifiers[pref['name']].show_render == True:
|
||||
padd = True;
|
||||
if not padd:
|
||||
continue;
|
||||
psettings = particleRef[0]
|
||||
|
||||
if psettings is None:
|
||||
|
@ -241,8 +241,8 @@ def build():
|
||||
compo_depth = True
|
||||
|
||||
focus_distance = 0.0
|
||||
if len(bpy.data.cameras) > 0 and bpy.data.cameras[0].dof.use_dof:
|
||||
focus_distance = bpy.data.cameras[0].dof.focus_distance
|
||||
if len(bpy.data.cameras) > 0 and lnx.utils.get_active_scene().camera.data.dof.use_dof:
|
||||
focus_distance = lnx.utils.get_active_scene().camera.data.dof.focus_distance
|
||||
|
||||
if focus_distance > 0.0:
|
||||
wrd.compo_defs += '_CDOF'
|
||||
|
@ -447,7 +447,7 @@ class LnxRPListItem(bpy.types.PropertyGroup):
|
||||
name='Depth Texture', description='Whether materials can read from a depth texture', default='Auto', update=update_depth_texture_state)
|
||||
rp_stereo: BoolProperty(name="VR", description="Stereo rendering", default=False, update=update_renderpath)
|
||||
rp_water: BoolProperty(name="Water", description="Enable water surface pass", default=False, update=update_renderpath)
|
||||
rp_pp: BoolProperty(name="Realtime postprocess", description="Realtime postprocess", default=False, update=update_renderpath)
|
||||
rp_pp: BoolProperty(name="Realtime post process", description="Realtime post process", default=False, update=update_renderpath)
|
||||
lnx_clouds: BoolProperty(name="Clouds", description="Enable clouds pass", default=False, update=assets.invalidate_shader_cache)
|
||||
lnx_ssrs: BoolProperty(name="SSRS", description="Screen-space ray-traced shadows", default=False, update=assets.invalidate_shader_cache)
|
||||
lnx_micro_shadowing: BoolProperty(name="Micro Shadowing", description="Use the shaders' occlusion parameter to compute micro shadowing for the scene's sun lamp. This option is not available for render paths using mobile or solid material models", default=False, update=assets.invalidate_shader_cache)
|
||||
|
@ -806,16 +806,17 @@ const int compoChromaticSamples = {rpdat.lnx_chromatic_aberration_samples};
|
||||
|
||||
focus_distance = 0.0
|
||||
fstop = 0.0
|
||||
if len(bpy.data.cameras) > 0 and bpy.data.cameras[0].dof.use_dof:
|
||||
focus_distance = bpy.data.cameras[0].dof.focus_distance
|
||||
fstop = bpy.data.cameras[0].dof.aperture_fstop
|
||||
if len(bpy.data.cameras) > 0 and lnx.utils.get_active_scene().camera.data.dof.use_dof:
|
||||
focus_distance = lnx.utils.get_active_scene().camera.data.dof.focus_distance
|
||||
fstop = lnx.utils.get_active_scene().camera.data.dof.aperture_fstop
|
||||
lens = lnx.utils.get_active_scene().camera.data.lens
|
||||
|
||||
if focus_distance > 0.0:
|
||||
f.write(
|
||||
"""const float compoDOFDistance = """ + str(round(focus_distance * 100) / 100) + """;
|
||||
const float compoDOFFstop = """ + str(round(fstop * 100) / 100) + """;
|
||||
const float compoDOFLength = 160.0;
|
||||
""") # str(round(bpy.data.cameras[0].lens * 100) / 100)
|
||||
const float compoDOFLength = """ + str(round(lens * 100) / 100) +""";
|
||||
""") #160.0;
|
||||
|
||||
if rpdat.rp_voxels != 'Off':
|
||||
f.write("""const ivec3 voxelgiResolution = ivec3(""" + str(rpdat.rp_voxelgi_resolution) + """, """ + str(rpdat.rp_voxelgi_resolution) + """, """ + str(rpdat.rp_voxelgi_resolution) + """);
|
||||
|
Reference in New Issue
Block a user