forked from LeenkxTeam/LNXSDK
merge upstream
This commit is contained in:
@ -217,8 +217,12 @@ def build():
|
||||
if rpdat.rp_compositornodes:
|
||||
assets.add_khafile_def('rp_compositornodes')
|
||||
compo_depth = False
|
||||
# wrd.compo_defs += ''
|
||||
if rpdat.lnx_tonemap != 'Off':
|
||||
wrd.compo_defs = '_CTone' + rpdat.lnx_tonemap
|
||||
wrd.compo_defs += '_CTone' + rpdat.lnx_tonemap
|
||||
if rpdat.lnx_dithering != 'Off':
|
||||
wrd.compo_defs += '_CDithering' + rpdat.lnx_dithering
|
||||
wrd.compo_defs += '_CDitheringStrength'
|
||||
if rpdat.rp_antialiasing == 'FXAA':
|
||||
wrd.compo_defs += '_CFXAA'
|
||||
if rpdat.lnx_letterbox:
|
||||
|
@ -617,6 +617,20 @@ class LnxRPListItem(bpy.types.PropertyGroup):
|
||||
('AgXSimple', 'AgX', 'AgX Implementation')],
|
||||
# ('AgXFull', 'AgX (Full)', 'AgX Full Implementation')],
|
||||
name='Tonemap', description='Tonemapping operator', default='Filmic', update=assets.invalidate_shader_cache)
|
||||
lnx_dithering: EnumProperty(
|
||||
items=[('Off', 'Off', 'Off'),
|
||||
('BlueNoise', 'Blue Noise', 'Blue Noise'),
|
||||
('WhiteNoise', 'White Noise', 'White Noise'),
|
||||
('OrderedBayer4x4', 'Ordered Bayer 4x4', 'Ordered Bayer 4x4'),
|
||||
('OrderedBayer8x8', 'Ordered Bayer 8x8', 'Ordered Bayer 8x8')],
|
||||
name='Dithering', description='Dithering operator', default='Off')
|
||||
lnx_dithering_strength: FloatProperty(
|
||||
name="Dither Strength",
|
||||
description="Strength of the dithering effect (applied as offset / 255.0)",
|
||||
default=1.0,
|
||||
min=0.0,
|
||||
max=1000.0
|
||||
)
|
||||
lnx_fisheye: BoolProperty(name="Fish Eye", default=False, update=assets.invalidate_shader_cache)
|
||||
lnx_vignette: BoolProperty(name="Vignette", default=False, update=assets.invalidate_shader_cache)
|
||||
lnx_vignette_strength: FloatProperty(name="Strength", default=0.7, update=assets.invalidate_shader_cache)
|
||||
|
@ -1974,6 +1974,11 @@ class LNX_PT_RenderPathCompositorPanel(bpy.types.Panel):
|
||||
|
||||
layout.enabled = rpdat.rp_compositornodes
|
||||
layout.prop(rpdat, 'lnx_tonemap')
|
||||
layout.prop(rpdat, 'lnx_dithering')
|
||||
if rpdat.lnx_dithering != 'Off':
|
||||
row = layout.row(align=True)
|
||||
row.prop(rpdat, 'lnx_dithering_strength')
|
||||
|
||||
layout.separator()
|
||||
|
||||
col = layout.column()
|
||||
|
@ -660,6 +660,12 @@ const float waterDensity = """ + str(round(rpdat.lnx_water_density * 100) / 100)
|
||||
const float waterRefract = """ + str(round(rpdat.lnx_water_refract * 100) / 100) + """;
|
||||
const float waterReflect = """ + str(round(rpdat.lnx_water_reflect * 100) / 100) + """;
|
||||
""")
|
||||
|
||||
if '_CDitheringStrength' in defs:
|
||||
f.write(
|
||||
f'const float ditherStrengthValue = {rpdat.lnx_dithering_strength};\n'
|
||||
)
|
||||
|
||||
if rpdat.rp_ssgi == 'SSAO' or rpdat.rp_ssgi == 'RTAO' or rpdat.rp_volumetriclight:
|
||||
f.write(
|
||||
"""const float ssaoRadius = """ + str(round(rpdat.lnx_ssgi_radius * 100) / 100) + """;
|
||||
|
Reference in New Issue
Block a user