forked from LeenkxTeam/LNXSDK
merge upstream
This commit is contained in:
@ -11,6 +11,8 @@ vec3 uncharted2Tonemap(const vec3 x) {
|
|||||||
vec3 tonemapUncharted2(const vec3 color) {
|
vec3 tonemapUncharted2(const vec3 color) {
|
||||||
const float W = 11.2;
|
const float W = 11.2;
|
||||||
const float exposureBias = 2.0;
|
const float exposureBias = 2.0;
|
||||||
|
// TODO - Find out why black world value of 0.0,0.0,0.0 turns to white pixels
|
||||||
|
if (dot(color, color) < 0.001) return vec3(0.001);
|
||||||
vec3 curr = uncharted2Tonemap(exposureBias * color);
|
vec3 curr = uncharted2Tonemap(exposureBias * color);
|
||||||
vec3 whiteScale = 1.0 / uncharted2Tonemap(vec3(W));
|
vec3 whiteScale = 1.0 / uncharted2Tonemap(vec3(W));
|
||||||
return curr * whiteScale;
|
return curr * whiteScale;
|
||||||
|
@ -768,13 +768,13 @@ const vec3 compoLetterboxColor = vec3(""" + str(round(rpdat.lnx_letterbox_color[
|
|||||||
if rpdat.lnx_sharpen:
|
if rpdat.lnx_sharpen:
|
||||||
f.write(
|
f.write(
|
||||||
"""const float compoSharpenStrength = """ + str(round(rpdat.lnx_sharpen_strength * 100) / 100) + """;
|
"""const float compoSharpenStrength = """ + str(round(rpdat.lnx_sharpen_strength * 100) / 100) + """;
|
||||||
|
const float compoSharpenSize = """ + str(round(rpdat.lnx_sharpen_size * 100) / 100) + """;
|
||||||
|
const vec3 compoSharpenColor = vec3(""" + str(round(rpdat.lnx_sharpen_color[0] * 100) / 100) + """, """ + str(round(rpdat.lnx_sharpen_color[1] * 100) / 100) + """, """ + str(round(rpdat.lnx_sharpen_color[2] * 100) / 100) + """);
|
||||||
""")
|
""")
|
||||||
|
|
||||||
if lnx.utils.get_active_scene().view_settings.exposure != 0.0:
|
if lnx.utils.get_active_scene().view_settings.exposure != 0.0:
|
||||||
f.write(
|
f.write(
|
||||||
"""const float compoExposureStrength = """ + str(round(lnx.utils.get_active_scene().view_settings.exposure * 100) / 100) + """;
|
"""const float compoExposureStrength = """ + str(round(lnx.utils.get_active_scene().view_settings.exposure * 100) / 100) + """;
|
||||||
const float compoSharpenSize = """ + str(round(rpdat.lnx_sharpen_size * 100) / 100) + """;
|
|
||||||
const vec3 compoSharpenColor = vec3(""" + str(round(rpdat.lnx_sharpen_color[0] * 100) / 100) + """, """ + str(round(rpdat.lnx_sharpen_color[1] * 100) / 100) + """, """ + str(round(rpdat.lnx_sharpen_color[2] * 100) / 100) + """);
|
|
||||||
""")
|
""")
|
||||||
|
|
||||||
if rpdat.lnx_fog:
|
if rpdat.lnx_fog:
|
||||||
|
Reference in New Issue
Block a user