From 532d5f8b69e35d437abf7141ff82cf763a102127 Mon Sep 17 00:00:00 2001 From: stele Date: Sun, 12 Jul 2020 16:22:17 +0200 Subject: [PATCH 1/3] Logging of disabled python module. --- PyInt.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/PyInt.cpp b/PyInt.cpp index 705f28be..51a9fe7e 100644 --- a/PyInt.cpp +++ b/PyInt.cpp @@ -198,8 +198,10 @@ auto python_taskqueue::init() -> bool { // release the lock, save the state for future use m_mainthread = PyEval_SaveThread(); - - WriteLog( "Python Interpreter: setup complete" ); + if( Global.python_enabled == true ) + WriteLog( "Python Interpreter: setup complete" ); + else + WriteLog( "Python module disabled" ); // init workers for( auto &worker : m_workers ) { From c4945d3f3239d2857fa0693634d66dca37eeea14 Mon Sep 17 00:00:00 2001 From: stele Date: Thu, 16 Jul 2020 18:05:37 +0200 Subject: [PATCH 2/3] Fixed "param_glossiness" missing from final gloss formula in materials utilising gloss maps. --- shaders/mat_default_specgloss.frag | 2 +- shaders/mat_normalmap_specgloss.frag | 2 +- shaders/mat_parallax_specgloss.frag | 2 +- shaders/mat_reflmap_specgloss.frag | 2 +- shaders/mat_shadowlessnormalmap_specgloss.frag | 2 +- shaders/mat_sunlessnormalmap_specgloss.frag | 2 +- shaders/mat_water_specgloss.frag | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/shaders/mat_default_specgloss.frag b/shaders/mat_default_specgloss.frag index 6cc35a6e..a72f04d5 100644 --- a/shaders/mat_default_specgloss.frag +++ b/shaders/mat_default_specgloss.frag @@ -42,7 +42,7 @@ void main() vec3 fragnormal = normalize(f_normal); float reflectivity = param[1].z; float specularity = texture(specgloss, f_coord).r; - glossiness = texture(specgloss, f_coord).g * 8; + glossiness = texture(specgloss, f_coord).g * abs(param[1].w); metalic = (texture(specgloss, f_coord).b > 0.5) ? true : false; fragcolor = apply_lights(fragcolor, fragnormal, tex_color.rgb, reflectivity, specularity, shadow_tone); diff --git a/shaders/mat_normalmap_specgloss.frag b/shaders/mat_normalmap_specgloss.frag index e3d6eb55..08059c28 100644 --- a/shaders/mat_normalmap_specgloss.frag +++ b/shaders/mat_normalmap_specgloss.frag @@ -52,7 +52,7 @@ void main() vec3 fragnormal = normalize(f_tbn * normalize(normal.xyz)); float reflectivity = param[1].z * texture(normalmap, f_coord).a; float specularity = texture(specgloss, f_coord).r; - glossiness = texture(specgloss, f_coord).g * 8; + glossiness = texture(specgloss, f_coord).g * abs(param[1].w); metalic = (texture(specgloss, f_coord).b > 0.5) ? true : false; fragcolor = apply_lights(fragcolor, fragnormal, tex_color.rgb, reflectivity, specularity, shadow_tone); diff --git a/shaders/mat_parallax_specgloss.frag b/shaders/mat_parallax_specgloss.frag index d9ac41bd..74e9e78c 100644 --- a/shaders/mat_parallax_specgloss.frag +++ b/shaders/mat_parallax_specgloss.frag @@ -60,7 +60,7 @@ void main() vec3 fragnormal = normalize(f_tbn * normalize(normal.xyz)); float reflectivity = param[1].z * texture(normalmap, f_coord_p).a; float specularity = texture(specgloss, f_coord).r; - glossiness = texture(specgloss, f_coord).g * 8; + glossiness = texture(specgloss, f_coord).g * abs(param[1].w); metalic = (texture(specgloss, f_coord).b > 0.5) ? true : false; fragcolor = apply_lights(fragcolor, fragnormal, tex_color.rgb, reflectivity, specularity, shadow_tone); diff --git a/shaders/mat_reflmap_specgloss.frag b/shaders/mat_reflmap_specgloss.frag index a95db18d..60f99add 100644 --- a/shaders/mat_reflmap_specgloss.frag +++ b/shaders/mat_reflmap_specgloss.frag @@ -46,7 +46,7 @@ void main() vec3 fragnormal = normalize(f_normal); float reflectivity = param[1].z * texture(reflmap, f_coord).a; float specularity = texture(specgloss, f_coord).r; - glossiness = texture(specgloss, f_coord).g * 8; + glossiness = texture(specgloss, f_coord).g * abs(param[1].w); metalic = (texture(specgloss, f_coord).b > 0.5) ? true : false; fragcolor = apply_lights(fragcolor, fragnormal, tex_color.rgb, reflectivity, specularity, shadow_tone); diff --git a/shaders/mat_shadowlessnormalmap_specgloss.frag b/shaders/mat_shadowlessnormalmap_specgloss.frag index 1c30b58e..ac0775b4 100644 --- a/shaders/mat_shadowlessnormalmap_specgloss.frag +++ b/shaders/mat_shadowlessnormalmap_specgloss.frag @@ -52,7 +52,7 @@ void main() vec3 fragnormal = normalize(f_tbn * normalize(normal.xyz)); float reflectivity = param[1].z * texture(normalmap, f_coord).a; float specularity = texture(specgloss, f_coord).r; - glossiness = texture(specgloss, f_coord).g * 8; + glossiness = texture(specgloss, f_coord).g * abs(param[1].w); metalic = (texture(specgloss, f_coord).b > 0.5) ? true : false; fragcolor = apply_lights(fragcolor, fragnormal, tex_color.rgb, reflectivity, specularity, 1.0); diff --git a/shaders/mat_sunlessnormalmap_specgloss.frag b/shaders/mat_sunlessnormalmap_specgloss.frag index 44d87c63..f3b6af1b 100644 --- a/shaders/mat_sunlessnormalmap_specgloss.frag +++ b/shaders/mat_sunlessnormalmap_specgloss.frag @@ -95,7 +95,7 @@ void main() vec3 fragnormal = normalize(f_tbn * normalize(normal.xyz)); float reflectivity = param[1].z * texture(normalmap, f_coord).a; float specularity = texture(specgloss, f_coord).r; - glossiness = texture(specgloss, f_coord).g * 8; + glossiness = texture(specgloss, f_coord).g * abs(param[1].w); metalic = (texture(specgloss, f_coord).b > 0.5) ? true : false; fragcolor = apply_lights_sunless(fragcolor, fragnormal, tex_color.rgb, reflectivity, specularity, shadow_tone); diff --git a/shaders/mat_water_specgloss.frag b/shaders/mat_water_specgloss.frag index a6d0dbb6..3dc3adcd 100644 --- a/shaders/mat_water_specgloss.frag +++ b/shaders/mat_water_specgloss.frag @@ -63,7 +63,7 @@ void main() vec3 fragnormal = normalize(f_tbn * normalize(normal.xyz)); float reflectivity = param[1].z * texture(normalmap, texture_coords ).a; float specularity = texture(specgloss, f_coord).r; - glossiness = texture(specgloss, f_coord).g * 8; + glossiness = texture(specgloss, f_coord).g * abs(param[1].w); metalic = (texture(specgloss, f_coord).b > 0.5) ? true : false; fragcolor = apply_lights(fragcolor, fragnormal, tex_color.rgb, reflectivity, specularity, shadow_tone); From 5211e082395743803a6c0a5bc76127292e8a9f74 Mon Sep 17 00:00:00 2001 From: stele Date: Thu, 16 Jul 2020 18:14:34 +0200 Subject: [PATCH 3/3] Revert "Logging of disabled python module." This reverts commit 532d5f8b69e35d437abf7141ff82cf763a102127. --- PyInt.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/PyInt.cpp b/PyInt.cpp index 51a9fe7e..705f28be 100644 --- a/PyInt.cpp +++ b/PyInt.cpp @@ -198,10 +198,8 @@ auto python_taskqueue::init() -> bool { // release the lock, save the state for future use m_mainthread = PyEval_SaveThread(); - if( Global.python_enabled == true ) - WriteLog( "Python Interpreter: setup complete" ); - else - WriteLog( "Python module disabled" ); + + WriteLog( "Python Interpreter: setup complete" ); // init workers for( auto &worker : m_workers ) {