diff --git a/CMakeLists.txt b/CMakeLists.txt
index f99b98c6cd8a305d5a7ebffb7f7aa2bde0861004..263d891771518f1f86dfa36944d8512f1a98ce0e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -3,6 +3,7 @@ cmake_minimum_required(VERSION 2.8)
 set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/modules")
 include(cotire)
 include(CMakeDependentOption)
+include(floatexpr)
 
 project(GLcv)
 
@@ -487,97 +488,58 @@ if (GLCV_FULL_BUILD)
 	render_still(wn-raw-16-cc png_gray png ${SAMPLES_DIR}/wn_raw.ini 1 "-Dphi=phi_linear;-Dai_fun=ai_fun_def;-Dpos_fun=pos_fun_def;-Dh=.1250;-W512;-DNORM_METHOD=2" ${WN_DEPS})
 	render_still(wn-raw-1 png_gray png ${SAMPLES_DIR}/wn_raw.ini 1 "-Dphi=phi_linear;-Dai_fun=ai_fun_def;-Dpos_fun=pos_fun_def;-Dh=2.;-W512" ${WN_DEPS})
 
-	render_still(wn-contrast-def png_gray png ${SAMPLES_DIR}/wn_raw.ini 5 "-Dphi=phi_linear;-Dai_fun=ai_fun_exp;-Dpos_fun=pos_fun_rnd;-Dh=.1250;-W512;-DNORM_METHOD=0" ${WN_DEPS})
-	render_still(wn-contrast-lin png_gray png ${SAMPLES_DIR}/wn_raw.ini 5 "-Dphi=phi_linear;-Dai_fun=ai_fun_exp;-Dpos_fun=pos_fun_rnd;-Dh=.1250;-W512;-DNORM_METHOD=1" ${WN_DEPS})
-	render_still(wn-contrast-pol png_gray png ${SAMPLES_DIR}/wn_raw.ini 5 "-Dphi=phi_linear;-Dai_fun=ai_fun_exp;-Dpos_fun=pos_fun_rnd;-Dh=.1250;-W512;-DNORM_METHOD=2" ${WN_DEPS})
-	render_still(wn-contrast-sig png_gray png ${SAMPLES_DIR}/wn_raw.ini 5 "-Dphi=phi_linear;-Dai_fun=ai_fun_exp;-Dpos_fun=pos_fun_rnd;-Dh=.1250;-W512;-DNORM_METHOD=3" ${WN_DEPS})
-
 	render_still(wn-kernel-def png_gray png ${SAMPLES_DIR}/wn_zoom.ini 12 "-DWN_ZOOMKERNEL=1;-Dphi=phi_nearest;-Dai_fun=ai_fun_exp;-Dh=.2500;-W256" ${WN_DEPS})
 	render_still(wn-kernel-lin png_gray png ${SAMPLES_DIR}/wn_zoom.ini 12 "-DWN_ZOOMKERNEL=1;-Dphi=phi_linear;-Dai_fun=ai_fun_exp;-Dh=.2500;-W256" ${WN_DEPS})
 
-	render_still(wn-def-def-24 png_gray png ${SAMPLES_DIR}/wn_zoom.ini 5 "-Dphi=phi_linear;-Dai_fun=ai_fun_def;-Dpos_fun=pos_fun_def;-Dh=.0833;-W512" ${WN_DEPS})
-	render_still(wn-def-def-16 png_gray png ${SAMPLES_DIR}/wn_zoom.ini 5 "-Dphi=phi_linear;-Dai_fun=ai_fun_def;-Dpos_fun=pos_fun_def;-Dh=.1250;-W512" ${WN_DEPS})
-	render_still(wn-def-def-08 png_gray png ${SAMPLES_DIR}/wn_zoom.ini 5 "-Dphi=phi_linear;-Dai_fun=ai_fun_def;-Dpos_fun=pos_fun_def;-Dh=.2500;-W512" ${WN_DEPS})
-	render_still(wn-def-def-04 png_gray png ${SAMPLES_DIR}/wn_zoom.ini 5 "-Dphi=phi_linear;-Dai_fun=ai_fun_def;-Dpos_fun=pos_fun_def;-Dh=.5000;-W512" ${WN_DEPS})
-	render_still(wn-exp-def-24 png_gray png ${SAMPLES_DIR}/wn_zoom.ini 5 "-Dphi=phi_linear;-Dai_fun=ai_fun_exp;-Dpos_fun=pos_fun_def;-Dh=.0833;-W512" ${WN_DEPS})
-	render_still(wn-exp-def-16 png_gray png ${SAMPLES_DIR}/wn_zoom.ini 5 "-Dphi=phi_linear;-Dai_fun=ai_fun_exp;-Dpos_fun=pos_fun_def;-Dh=.1250;-W512" ${WN_DEPS})
-	render_still(wn-exp-def-08 png_gray png ${SAMPLES_DIR}/wn_zoom.ini 5 "-Dphi=phi_linear;-Dai_fun=ai_fun_exp;-Dpos_fun=pos_fun_def;-Dh=.2500;-W512" ${WN_DEPS})
-	render_still(wn-exp-def-04 png_gray png ${SAMPLES_DIR}/wn_zoom.ini 5 "-Dphi=phi_linear;-Dai_fun=ai_fun_exp;-Dpos_fun=pos_fun_def;-Dh=.5000;-W512" ${WN_DEPS})
-	render_still(wn-exp-lin-24 png_gray png ${SAMPLES_DIR}/wn_zoom.ini 5 "-Dphi=phi_linear;-Dai_fun=ai_fun_exp;-Dpos_fun=pos_fun_lin;-Dh=.0833;-W512" ${WN_DEPS})
-	render_still(wn-exp-lin-16 png_gray png ${SAMPLES_DIR}/wn_zoom.ini 5 "-Dphi=phi_linear;-Dai_fun=ai_fun_exp;-Dpos_fun=pos_fun_lin;-Dh=.1250;-W512" ${WN_DEPS})
-	render_still(wn-exp-lin-08 png_gray png ${SAMPLES_DIR}/wn_zoom.ini 5 "-Dphi=phi_linear;-Dai_fun=ai_fun_exp;-Dpos_fun=pos_fun_lin;-Dh=.2500;-W512" ${WN_DEPS})
-	render_still(wn-exp-lin-04 png_gray png ${SAMPLES_DIR}/wn_zoom.ini 5 "-Dphi=phi_linear;-Dai_fun=ai_fun_exp;-Dpos_fun=pos_fun_lin;-Dh=.5000;-W512" ${WN_DEPS})
-	render_still(wn-exp-rnd-24 png_gray png ${SAMPLES_DIR}/wn_zoom.ini 5 "-Dphi=phi_linear;-Dai_fun=ai_fun_exp;-Dpos_fun=pos_fun_rnd;-Dh=.0833;-W512" ${WN_DEPS})
-	render_still(wn-exp-rnd-16 png_gray png ${SAMPLES_DIR}/wn_zoom.ini 5 "-Dphi=phi_linear;-Dai_fun=ai_fun_exp;-Dpos_fun=pos_fun_rnd;-Dh=.1250;-W512" ${WN_DEPS})
-	render_still(wn-exp-rnd-08 png_gray png ${SAMPLES_DIR}/wn_zoom.ini 5 "-Dphi=phi_linear;-Dai_fun=ai_fun_exp;-Dpos_fun=pos_fun_rnd;-Dh=.2500;-W512" ${WN_DEPS})
-	render_still(wn-exp-rnd-04 png_gray png ${SAMPLES_DIR}/wn_zoom.ini 5 "-Dphi=phi_linear;-Dai_fun=ai_fun_exp;-Dpos_fun=pos_fun_rnd;-Dh=.5000;-W512" ${WN_DEPS})
-
 	render_still(wn-impl-stats png_gray png ${SAMPLES_DIR}/wn_zoom.ini 5 "-Dphi=phi_linear;-Dai_fun=ai_fun_exp;-Dpos_fun=pos_fun_def;-Dh=.2500;-W512;-DNORIGHTPLOT" ${WN_DEPS})
 
-	render_still_cv(spectrum wn-def-def-24-spe-005 png_gray png ${SAMPLES_DIR}/wn_raw.ini 5 "-Dphi=phi_linear;-Dai_fun=ai_fun_def;-Dpos_fun=pos_fun_def;-Dh=.0833;-W512;--postprocess=../configs/pp_fftscale.fsh;--mouse.y=0.065" ${WN_DEPS})
-	render_still_cv(spectrum wn-def-def-24-spe-045 png_gray png ${SAMPLES_DIR}/wn_raw.ini 45 "-Dphi=phi_linear;-Dai_fun=ai_fun_def;-Dpos_fun=pos_fun_def;-Dh=.0833;-W512;--postprocess=../configs/pp_fftscale.fsh;--mouse.y=0.065" ${WN_DEPS})
-	render_still_cv(spectrum wn-def-def-24-spe-085 png_gray png ${SAMPLES_DIR}/wn_raw.ini 85 "-Dphi=phi_linear;-Dai_fun=ai_fun_def;-Dpos_fun=pos_fun_def;-Dh=.0833;-W512;--postprocess=../configs/pp_fftscale.fsh;--mouse.y=0.065" ${WN_DEPS})
-	render_still_cv(spectrum wn-def-def-24-spe-125 png_gray png ${SAMPLES_DIR}/wn_raw.ini 125 "-Dphi=phi_linear;-Dai_fun=ai_fun_def;-Dpos_fun=pos_fun_def;-Dh=.0833;-W512;--postprocess=../configs/pp_fftscale.fsh;--mouse.y=0.065" ${WN_DEPS})
-	render_still_cv(spectrum wn-def-def-16-spe-005 png_gray png ${SAMPLES_DIR}/wn_raw.ini 5 "-Dphi=phi_linear;-Dai_fun=ai_fun_def;-Dpos_fun=pos_fun_def;-Dh=.1250;-W512;--postprocess=../configs/pp_fftscale.fsh;--mouse.y=0.05" ${WN_DEPS})
-	render_still_cv(spectrum wn-def-def-16-spe-045 png_gray png ${SAMPLES_DIR}/wn_raw.ini 45 "-Dphi=phi_linear;-Dai_fun=ai_fun_def;-Dpos_fun=pos_fun_def;-Dh=.1250;-W512;--postprocess=../configs/pp_fftscale.fsh;--mouse.y=0.05" ${WN_DEPS})
-	render_still_cv(spectrum wn-def-def-16-spe-085 png_gray png ${SAMPLES_DIR}/wn_raw.ini 85 "-Dphi=phi_linear;-Dai_fun=ai_fun_def;-Dpos_fun=pos_fun_def;-Dh=.1250;-W512;--postprocess=../configs/pp_fftscale.fsh;--mouse.y=0.05" ${WN_DEPS})
-	render_still_cv(spectrum wn-def-def-16-spe-125 png_gray png ${SAMPLES_DIR}/wn_raw.ini 125 "-Dphi=phi_linear;-Dai_fun=ai_fun_def;-Dpos_fun=pos_fun_def;-Dh=.1250;-W512;--postprocess=../configs/pp_fftscale.fsh;--mouse.y=0.05" ${WN_DEPS})
-	render_still_cv(spectrum wn-def-def-08-spe-005 png_gray png ${SAMPLES_DIR}/wn_raw.ini 5 "-Dphi=phi_linear;-Dai_fun=ai_fun_def;-Dpos_fun=pos_fun_def;-Dh=.2500;-W512;--postprocess=../configs/pp_fftscale.fsh;--mouse.y=0.035" ${WN_DEPS})
-	render_still_cv(spectrum wn-def-def-08-spe-045 png_gray png ${SAMPLES_DIR}/wn_raw.ini 45 "-Dphi=phi_linear;-Dai_fun=ai_fun_def;-Dpos_fun=pos_fun_def;-Dh=.2500;-W512;--postprocess=../configs/pp_fftscale.fsh;--mouse.y=0.035" ${WN_DEPS})
-	render_still_cv(spectrum wn-def-def-08-spe-085 png_gray png ${SAMPLES_DIR}/wn_raw.ini 85 "-Dphi=phi_linear;-Dai_fun=ai_fun_def;-Dpos_fun=pos_fun_def;-Dh=.2500;-W512;--postprocess=../configs/pp_fftscale.fsh;--mouse.y=0.035" ${WN_DEPS})
-	render_still_cv(spectrum wn-def-def-08-spe-125 png_gray png ${SAMPLES_DIR}/wn_raw.ini 125 "-Dphi=phi_linear;-Dai_fun=ai_fun_def;-Dpos_fun=pos_fun_def;-Dh=.2500;-W512;--postprocess=../configs/pp_fftscale.fsh;--mouse.y=0.035" ${WN_DEPS})
-	render_still_cv(spectrum wn-def-def-04-spe-005 png_gray png ${SAMPLES_DIR}/wn_raw.ini 5 "-Dphi=phi_linear;-Dai_fun=ai_fun_def;-Dpos_fun=pos_fun_def;-Dh=.5000;-W512;--postprocess=../configs/pp_fftscale.fsh;--mouse.y=0.02" ${WN_DEPS})
-	render_still_cv(spectrum wn-def-def-04-spe-045 png_gray png ${SAMPLES_DIR}/wn_raw.ini 45 "-Dphi=phi_linear;-Dai_fun=ai_fun_def;-Dpos_fun=pos_fun_def;-Dh=.5000;-W512;--postprocess=../configs/pp_fftscale.fsh;--mouse.y=0.02" ${WN_DEPS})
-	render_still_cv(spectrum wn-def-def-04-spe-085 png_gray png ${SAMPLES_DIR}/wn_raw.ini 85 "-Dphi=phi_linear;-Dai_fun=ai_fun_def;-Dpos_fun=pos_fun_def;-Dh=.5000;-W512;--postprocess=../configs/pp_fftscale.fsh;--mouse.y=0.02" ${WN_DEPS})
-	render_still_cv(spectrum wn-def-def-04-spe-125 png_gray png ${SAMPLES_DIR}/wn_raw.ini 125 "-Dphi=phi_linear;-Dai_fun=ai_fun_def;-Dpos_fun=pos_fun_def;-Dh=.5000;-W512;--postprocess=../configs/pp_fftscale.fsh;--mouse.y=0.02" ${WN_DEPS})
-	render_still_cv(spectrum wn-exp-def-24-spe-005 png_gray png ${SAMPLES_DIR}/wn_raw.ini 5 "-Dphi=phi_linear;-Dai_fun=ai_fun_exp;-Dpos_fun=pos_fun_def;-Dh=.0833;-W512;--postprocess=../configs/pp_fftscale.fsh;--mouse.y=0.065" ${WN_DEPS})
-	render_still_cv(spectrum wn-exp-def-24-spe-045 png_gray png ${SAMPLES_DIR}/wn_raw.ini 45 "-Dphi=phi_linear;-Dai_fun=ai_fun_exp;-Dpos_fun=pos_fun_def;-Dh=.0833;-W512;--postprocess=../configs/pp_fftscale.fsh;--mouse.y=0.065" ${WN_DEPS})
-	render_still_cv(spectrum wn-exp-def-24-spe-085 png_gray png ${SAMPLES_DIR}/wn_raw.ini 85 "-Dphi=phi_linear;-Dai_fun=ai_fun_exp;-Dpos_fun=pos_fun_def;-Dh=.0833;-W512;--postprocess=../configs/pp_fftscale.fsh;--mouse.y=0.065" ${WN_DEPS})
-	render_still_cv(spectrum wn-exp-def-24-spe-125 png_gray png ${SAMPLES_DIR}/wn_raw.ini 125 "-Dphi=phi_linear;-Dai_fun=ai_fun_exp;-Dpos_fun=pos_fun_def;-Dh=.0833;-W512;--postprocess=../configs/pp_fftscale.fsh;--mouse.y=0.065" ${WN_DEPS})
-	render_still_cv(spectrum wn-exp-def-16-spe-005 png_gray png ${SAMPLES_DIR}/wn_raw.ini 5 "-Dphi=phi_linear;-Dai_fun=ai_fun_exp;-Dpos_fun=pos_fun_def;-Dh=.1250;-W512;--postprocess=../configs/pp_fftscale.fsh;--mouse.y=0.05" ${WN_DEPS})
-	render_still_cv(spectrum wn-exp-def-16-spe-045 png_gray png ${SAMPLES_DIR}/wn_raw.ini 45 "-Dphi=phi_linear;-Dai_fun=ai_fun_exp;-Dpos_fun=pos_fun_def;-Dh=.1250;-W512;--postprocess=../configs/pp_fftscale.fsh;--mouse.y=0.05" ${WN_DEPS})
-	render_still_cv(spectrum wn-exp-def-16-spe-085 png_gray png ${SAMPLES_DIR}/wn_raw.ini 85 "-Dphi=phi_linear;-Dai_fun=ai_fun_exp;-Dpos_fun=pos_fun_def;-Dh=.1250;-W512;--postprocess=../configs/pp_fftscale.fsh;--mouse.y=0.05" ${WN_DEPS})
-	render_still_cv(spectrum wn-exp-def-16-spe-125 png_gray png ${SAMPLES_DIR}/wn_raw.ini 125 "-Dphi=phi_linear;-Dai_fun=ai_fun_exp;-Dpos_fun=pos_fun_def;-Dh=.1250;-W512;--postprocess=../configs/pp_fftscale.fsh;--mouse.y=0.05" ${WN_DEPS})
-	render_still_cv(spectrum wn-exp-def-08-spe-005 png_gray png ${SAMPLES_DIR}/wn_raw.ini 5 "-Dphi=phi_linear;-Dai_fun=ai_fun_exp;-Dpos_fun=pos_fun_def;-Dh=.2500;-W512;--postprocess=../configs/pp_fftscale.fsh;--mouse.y=0.035" ${WN_DEPS})
-	render_still_cv(spectrum wn-exp-def-08-spe-045 png_gray png ${SAMPLES_DIR}/wn_raw.ini 45 "-Dphi=phi_linear;-Dai_fun=ai_fun_exp;-Dpos_fun=pos_fun_def;-Dh=.2500;-W512;--postprocess=../configs/pp_fftscale.fsh;--mouse.y=0.035" ${WN_DEPS})
-	render_still_cv(spectrum wn-exp-def-08-spe-085 png_gray png ${SAMPLES_DIR}/wn_raw.ini 85 "-Dphi=phi_linear;-Dai_fun=ai_fun_exp;-Dpos_fun=pos_fun_def;-Dh=.2500;-W512;--postprocess=../configs/pp_fftscale.fsh;--mouse.y=0.035" ${WN_DEPS})
-	render_still_cv(spectrum wn-exp-def-08-spe-125 png_gray png ${SAMPLES_DIR}/wn_raw.ini 125 "-Dphi=phi_linear;-Dai_fun=ai_fun_exp;-Dpos_fun=pos_fun_def;-Dh=.2500;-W512;--postprocess=../configs/pp_fftscale.fsh;--mouse.y=0.035" ${WN_DEPS})
-	render_still_cv(spectrum wn-exp-def-04-spe-005 png_gray png ${SAMPLES_DIR}/wn_raw.ini 5 "-Dphi=phi_linear;-Dai_fun=ai_fun_exp;-Dpos_fun=pos_fun_def;-Dh=.5000;-W512;--postprocess=../configs/pp_fftscale.fsh;--mouse.y=0.02" ${WN_DEPS})
-	render_still_cv(spectrum wn-exp-def-04-spe-045 png_gray png ${SAMPLES_DIR}/wn_raw.ini 45 "-Dphi=phi_linear;-Dai_fun=ai_fun_exp;-Dpos_fun=pos_fun_def;-Dh=.5000;-W512;--postprocess=../configs/pp_fftscale.fsh;--mouse.y=0.02" ${WN_DEPS})
-	render_still_cv(spectrum wn-exp-def-04-spe-085 png_gray png ${SAMPLES_DIR}/wn_raw.ini 85 "-Dphi=phi_linear;-Dai_fun=ai_fun_exp;-Dpos_fun=pos_fun_def;-Dh=.5000;-W512;--postprocess=../configs/pp_fftscale.fsh;--mouse.y=0.02" ${WN_DEPS})
-	render_still_cv(spectrum wn-exp-def-04-spe-125 png_gray png ${SAMPLES_DIR}/wn_raw.ini 125 "-Dphi=phi_linear;-Dai_fun=ai_fun_exp;-Dpos_fun=pos_fun_def;-Dh=.5000;-W512;--postprocess=../configs/pp_fftscale.fsh;--mouse.y=0.02" ${WN_DEPS})
-	render_still_cv(spectrum wn-exp-lin-24-spe-005 png_gray png ${SAMPLES_DIR}/wn_raw.ini 5 "-Dphi=phi_linear;-Dai_fun=ai_fun_exp;-Dpos_fun=pos_fun_lin;-Dh=.0833;-W512;--postprocess=../configs/pp_fftscale.fsh;--mouse.y=0.065" ${WN_DEPS})
-	render_still_cv(spectrum wn-exp-lin-24-spe-045 png_gray png ${SAMPLES_DIR}/wn_raw.ini 45 "-Dphi=phi_linear;-Dai_fun=ai_fun_exp;-Dpos_fun=pos_fun_lin;-Dh=.0833;-W512;--postprocess=../configs/pp_fftscale.fsh;--mouse.y=0.065" ${WN_DEPS})
-	render_still_cv(spectrum wn-exp-lin-24-spe-085 png_gray png ${SAMPLES_DIR}/wn_raw.ini 85 "-Dphi=phi_linear;-Dai_fun=ai_fun_exp;-Dpos_fun=pos_fun_lin;-Dh=.0833;-W512;--postprocess=../configs/pp_fftscale.fsh;--mouse.y=0.065" ${WN_DEPS})
-	render_still_cv(spectrum wn-exp-lin-24-spe-125 png_gray png ${SAMPLES_DIR}/wn_raw.ini 125 "-Dphi=phi_linear;-Dai_fun=ai_fun_exp;-Dpos_fun=pos_fun_lin;-Dh=.0833;-W512;--postprocess=../configs/pp_fftscale.fsh;--mouse.y=0.065" ${WN_DEPS})
-	render_still_cv(spectrum wn-exp-lin-16-spe-005 png_gray png ${SAMPLES_DIR}/wn_raw.ini 5 "-Dphi=phi_linear;-Dai_fun=ai_fun_exp;-Dpos_fun=pos_fun_lin;-Dh=.1250;-W512;--postprocess=../configs/pp_fftscale.fsh;--mouse.y=0.05" ${WN_DEPS})
-	render_still_cv(spectrum wn-exp-lin-16-spe-045 png_gray png ${SAMPLES_DIR}/wn_raw.ini 45 "-Dphi=phi_linear;-Dai_fun=ai_fun_exp;-Dpos_fun=pos_fun_lin;-Dh=.1250;-W512;--postprocess=../configs/pp_fftscale.fsh;--mouse.y=0.05" ${WN_DEPS})
-	render_still_cv(spectrum wn-exp-lin-16-spe-085 png_gray png ${SAMPLES_DIR}/wn_raw.ini 85 "-Dphi=phi_linear;-Dai_fun=ai_fun_exp;-Dpos_fun=pos_fun_lin;-Dh=.1250;-W512;--postprocess=../configs/pp_fftscale.fsh;--mouse.y=0.05" ${WN_DEPS})
-	render_still_cv(spectrum wn-exp-lin-16-spe-125 png_gray png ${SAMPLES_DIR}/wn_raw.ini 125 "-Dphi=phi_linear;-Dai_fun=ai_fun_exp;-Dpos_fun=pos_fun_lin;-Dh=.1250;-W512;--postprocess=../configs/pp_fftscale.fsh;--mouse.y=0.05" ${WN_DEPS})
-	render_still_cv(spectrum wn-exp-lin-08-spe-005 png_gray png ${SAMPLES_DIR}/wn_raw.ini 5 "-Dphi=phi_linear;-Dai_fun=ai_fun_exp;-Dpos_fun=pos_fun_lin;-Dh=.2500;-W512;--postprocess=../configs/pp_fftscale.fsh;--mouse.y=0.035" ${WN_DEPS})
-	render_still_cv(spectrum wn-exp-lin-08-spe-045 png_gray png ${SAMPLES_DIR}/wn_raw.ini 45 "-Dphi=phi_linear;-Dai_fun=ai_fun_exp;-Dpos_fun=pos_fun_lin;-Dh=.2500;-W512;--postprocess=../configs/pp_fftscale.fsh;--mouse.y=0.035" ${WN_DEPS})
-	render_still_cv(spectrum wn-exp-lin-08-spe-085 png_gray png ${SAMPLES_DIR}/wn_raw.ini 85 "-Dphi=phi_linear;-Dai_fun=ai_fun_exp;-Dpos_fun=pos_fun_lin;-Dh=.2500;-W512;--postprocess=../configs/pp_fftscale.fsh;--mouse.y=0.035" ${WN_DEPS})
-	render_still_cv(spectrum wn-exp-lin-08-spe-125 png_gray png ${SAMPLES_DIR}/wn_raw.ini 125 "-Dphi=phi_linear;-Dai_fun=ai_fun_exp;-Dpos_fun=pos_fun_lin;-Dh=.2500;-W512;--postprocess=../configs/pp_fftscale.fsh;--mouse.y=0.035" ${WN_DEPS})
-	render_still_cv(spectrum wn-exp-lin-04-spe-005 png_gray png ${SAMPLES_DIR}/wn_raw.ini 5 "-Dphi=phi_linear;-Dai_fun=ai_fun_exp;-Dpos_fun=pos_fun_lin;-Dh=.5000;-W512;--postprocess=../configs/pp_fftscale.fsh;--mouse.y=0.02" ${WN_DEPS})
-	render_still_cv(spectrum wn-exp-lin-04-spe-045 png_gray png ${SAMPLES_DIR}/wn_raw.ini 45 "-Dphi=phi_linear;-Dai_fun=ai_fun_exp;-Dpos_fun=pos_fun_lin;-Dh=.5000;-W512;--postprocess=../configs/pp_fftscale.fsh;--mouse.y=0.02" ${WN_DEPS})
-	render_still_cv(spectrum wn-exp-lin-04-spe-085 png_gray png ${SAMPLES_DIR}/wn_raw.ini 85 "-Dphi=phi_linear;-Dai_fun=ai_fun_exp;-Dpos_fun=pos_fun_lin;-Dh=.5000;-W512;--postprocess=../configs/pp_fftscale.fsh;--mouse.y=0.02" ${WN_DEPS})
-	render_still_cv(spectrum wn-exp-lin-04-spe-125 png_gray png ${SAMPLES_DIR}/wn_raw.ini 125 "-Dphi=phi_linear;-Dai_fun=ai_fun_exp;-Dpos_fun=pos_fun_lin;-Dh=.5000;-W512;--postprocess=../configs/pp_fftscale.fsh;--mouse.y=0.02" ${WN_DEPS})
-	render_still_cv(spectrum wn-exp-rnd-24-spe-005 png_gray png ${SAMPLES_DIR}/wn_raw.ini 5 "-Dphi=phi_linear;-Dai_fun=ai_fun_exp;-Dpos_fun=pos_fun_rnd;-Dh=.0833;-W512;--postprocess=../configs/pp_fftscale.fsh;--mouse.y=0.065" ${WN_DEPS})
-	render_still_cv(spectrum wn-exp-rnd-24-spe-045 png_gray png ${SAMPLES_DIR}/wn_raw.ini 45 "-Dphi=phi_linear;-Dai_fun=ai_fun_exp;-Dpos_fun=pos_fun_rnd;-Dh=.0833;-W512;--postprocess=../configs/pp_fftscale.fsh;--mouse.y=0.065" ${WN_DEPS})
-	render_still_cv(spectrum wn-exp-rnd-24-spe-085 png_gray png ${SAMPLES_DIR}/wn_raw.ini 85 "-Dphi=phi_linear;-Dai_fun=ai_fun_exp;-Dpos_fun=pos_fun_rnd;-Dh=.0833;-W512;--postprocess=../configs/pp_fftscale.fsh;--mouse.y=0.065" ${WN_DEPS})
-	render_still_cv(spectrum wn-exp-rnd-24-spe-125 png_gray png ${SAMPLES_DIR}/wn_raw.ini 125 "-Dphi=phi_linear;-Dai_fun=ai_fun_exp;-Dpos_fun=pos_fun_rnd;-Dh=.0833;-W512;--postprocess=../configs/pp_fftscale.fsh;--mouse.y=0.065" ${WN_DEPS})
-	render_still_cv(spectrum wn-exp-rnd-16-spe-005 png_gray png ${SAMPLES_DIR}/wn_raw.ini 5 "-Dphi=phi_linear;-Dai_fun=ai_fun_exp;-Dpos_fun=pos_fun_rnd;-Dh=.1250;-W512;--postprocess=../configs/pp_fftscale.fsh;--mouse.y=0.05" ${WN_DEPS})
-	render_still_cv(spectrum wn-exp-rnd-16-spe-045 png_gray png ${SAMPLES_DIR}/wn_raw.ini 45 "-Dphi=phi_linear;-Dai_fun=ai_fun_exp;-Dpos_fun=pos_fun_rnd;-Dh=.1250;-W512;--postprocess=../configs/pp_fftscale.fsh;--mouse.y=0.05" ${WN_DEPS})
-	render_still_cv(spectrum wn-exp-rnd-16-spe-085 png_gray png ${SAMPLES_DIR}/wn_raw.ini 85 "-Dphi=phi_linear;-Dai_fun=ai_fun_exp;-Dpos_fun=pos_fun_rnd;-Dh=.1250;-W512;--postprocess=../configs/pp_fftscale.fsh;--mouse.y=0.05" ${WN_DEPS})
-	render_still_cv(spectrum wn-exp-rnd-16-spe-125 png_gray png ${SAMPLES_DIR}/wn_raw.ini 125 "-Dphi=phi_linear;-Dai_fun=ai_fun_exp;-Dpos_fun=pos_fun_rnd;-Dh=.1250;-W512;--postprocess=../configs/pp_fftscale.fsh;--mouse.y=0.05" ${WN_DEPS})
-	render_still_cv(spectrum wn-exp-rnd-08-spe-005 png_gray png ${SAMPLES_DIR}/wn_raw.ini 5 "-Dphi=phi_linear;-Dai_fun=ai_fun_exp;-Dpos_fun=pos_fun_rnd;-Dh=.2500;-W512;--postprocess=../configs/pp_fftscale.fsh;--mouse.y=0.035" ${WN_DEPS})
-	render_still_cv(spectrum wn-exp-rnd-08-spe-045 png_gray png ${SAMPLES_DIR}/wn_raw.ini 45 "-Dphi=phi_linear;-Dai_fun=ai_fun_exp;-Dpos_fun=pos_fun_rnd;-Dh=.2500;-W512;--postprocess=../configs/pp_fftscale.fsh;--mouse.y=0.035" ${WN_DEPS})
-	render_still_cv(spectrum wn-exp-rnd-08-spe-085 png_gray png ${SAMPLES_DIR}/wn_raw.ini 85 "-Dphi=phi_linear;-Dai_fun=ai_fun_exp;-Dpos_fun=pos_fun_rnd;-Dh=.2500;-W512;--postprocess=../configs/pp_fftscale.fsh;--mouse.y=0.035" ${WN_DEPS})
-	render_still_cv(spectrum wn-exp-rnd-08-spe-125 png_gray png ${SAMPLES_DIR}/wn_raw.ini 125 "-Dphi=phi_linear;-Dai_fun=ai_fun_exp;-Dpos_fun=pos_fun_rnd;-Dh=.2500;-W512;--postprocess=../configs/pp_fftscale.fsh;--mouse.y=0.035" ${WN_DEPS})
-	render_still_cv(spectrum wn-exp-rnd-04-spe-005 png_gray png ${SAMPLES_DIR}/wn_raw.ini 5 "-Dphi=phi_linear;-Dai_fun=ai_fun_exp;-Dpos_fun=pos_fun_rnd;-Dh=.5000;-W512;--postprocess=../configs/pp_fftscale.fsh;--mouse.y=0.02" ${WN_DEPS})
-	render_still_cv(spectrum wn-exp-rnd-04-spe-045 png_gray png ${SAMPLES_DIR}/wn_raw.ini 45 "-Dphi=phi_linear;-Dai_fun=ai_fun_exp;-Dpos_fun=pos_fun_rnd;-Dh=.5000;-W512;--postprocess=../configs/pp_fftscale.fsh;--mouse.y=0.02" ${WN_DEPS})
-	render_still_cv(spectrum wn-exp-rnd-04-spe-085 png_gray png ${SAMPLES_DIR}/wn_raw.ini 85 "-Dphi=phi_linear;-Dai_fun=ai_fun_exp;-Dpos_fun=pos_fun_rnd;-Dh=.5000;-W512;--postprocess=../configs/pp_fftscale.fsh;--mouse.y=0.02" ${WN_DEPS})
-	render_still_cv(spectrum wn-exp-rnd-04-spe-125 png_gray png ${SAMPLES_DIR}/wn_raw.ini 125 "-Dphi=phi_linear;-Dai_fun=ai_fun_exp;-Dpos_fun=pos_fun_rnd;-Dh=.5000;-W512;--postprocess=../configs/pp_fftscale.fsh;--mouse.y=0.02" ${WN_DEPS})
+	set(LAYERS_NLAYERS "24;16;08;04")
+	set(LAYERS_FFTSCALE "0.065;0.050;0.035;0.020")
+	set(AI_FUNS def exp)
+	set(POS_FUNS def lin exp)
+	set(NFRAMES 005 045 085 125)
+	set(CONTRAST_FUNS def lin pol sig)
+
+	list(LENGTH CONTRAST_FUNS CONTRAST_FUNS_RANGE)
+	math(EXPR CONTRAST_FUNS_RANGE ${CONTRAST_FUNS_RANGE}-1)
+
+	list(LENGTH LAYERS_NLAYERS LAYERS_RANGE)
+	math(EXPR LAYERS_RANGE ${LAYERS_RANGE}-1)
+
+	foreach(AI_FUN ${AI_FUNS})
+		foreach(POS_FUN ${POS_FUNS})
+			foreach(NLAYERS ${LAYERS_NLAYERS})
+				floatexpr("2.0 / ${NLAYERS}" HLAYERS)
+
+				render_still(wn-${AI_FUN}-${POS_FUN}-${NLAYERS} png_gray png ${SAMPLES_DIR}/wn_zoom.ini 5 "-Dphi=phi_linear;-Dai_fun=ai_fun_${AI_FUN};-Dpos_fun=pos_fun_${POS_FUN};-Dh=${HLAYERS};-W512" ${WN_DEPS})
+			endforeach()
+		endforeach()
+	endforeach()
+
+
+	foreach(NORM_METHOD RANGE ${CONTRAST_FUNS_RANGE})
+		list(GET CONTRAST_FUNS ${NORM_METHOD} CONTRAST_FUN)
+
+		render_still(wn-contrast-${CONTRAST_FUN} png_gray png
+					 ${SAMPLES_DIR}/wn_raw.ini 5 "-Dphi=phi_linear;-Dai_fun=ai_fun_exp;-Dpos_fun=pos_fun_rnd;-Dh=.1250;-W512;-DNORM_METHOD=${NORM_METHOD}"
+					 ${WN_DEPS})
+	endforeach()
+
+	foreach(AI_FUN ${AI_FUNS})
+		foreach(POS_FUN ${POS_FUNS})
+			foreach(LAYERS_I RANGE ${LAYERS_RANGE})
+				list(GET LAYERS_NLAYERS ${LAYERS_I} NLAYERS)
+				list(GET LAYERS_FFTSCALE ${LAYERS_I} FFTSCALE)
+
+				foreach(NFRAME ${NFRAMES})
+					floatexpr("2.0 / ${NLAYERS}" HLAYERS)
+					render_still_cv(spectrum wn-${AI_FUN}-${POS_FUN}-${NLAYERS}-spe-${NFRAME}
+									png_gray png ${SAMPLES_DIR}/wn_raw.ini ${NFRAME}
+									"-Dphi=phi_linear;-Dai_fun=ai_fun_${AI_FUN};-Dpos_fun=pos_fun_${POS_FUN};-Dh=${HLAYERS};-W512;--postprocess=../configs/pp_fftscale.fsh;--mouse.y=${FFTSCALE}" ${WN_DEPS})
+				endforeach()
+			endforeach()
+		endforeach()
+	endforeach()
 
 	render_still(wn-exp-def-16-noradial png_gray png ${SAMPLES_DIR}/wn_zoom_noradial.ini 5 "-Dphi=phi_linear;-Dai_fun=ai_fun_exp;-Dpos_fun=pos_fun_def;-Dh=.1250;-W512" ${WN_DEPS})
 	render_still(wn-exp-def-08-noradial png_gray png ${SAMPLES_DIR}/wn_zoom_noradial.ini 5 "-Dphi=phi_linear;-Dai_fun=ai_fun_exp;-Dpos_fun=pos_fun_def;-Dh=.2500;-W512" ${WN_DEPS})
@@ -610,16 +572,15 @@ if (GLCV_FULL_BUILD)
 	render_still_take_cv(optical_flow tt-def-opt png png ${SAMPLES_DIR}/tt.ini 0 26 "-DFIXMODE=0;--postprocess=../configs/pp_optical_flow.fsh" ${TT_DEPS})
 	render_still_take_cv(optical_flow tt-fix-opt png png ${SAMPLES_DIR}/tt.ini 0 26 "-DFIXMODE=1;--postprocess=../configs/pp_optical_flow.fsh" ${TT_DEPS})
 
-	render_still_take_cv(optical_flow wn-def-def-08-opt png png ${SAMPLES_DIR}/wn_raw.ini 0 5 "-Dphi=phi_linear;-Dai_fun=ai_fun_def;-Dpos_fun=pos_fun_def;-Dh=.2500;-W512;--postprocess=../configs/pp_optical_flow.fsh" ${WN_DEPS})
-	render_still_take_cv(optical_flow wn-exp-def-08-opt png png ${SAMPLES_DIR}/wn_raw.ini 0 5 "-Dphi=phi_linear;-Dai_fun=ai_fun_exp;-Dpos_fun=pos_fun_def;-Dh=.2500;-W512;--postprocess=../configs/pp_optical_flow.fsh" ${WN_DEPS})
-	render_still_take_cv(optical_flow wn-exp-lin-08-opt png png ${SAMPLES_DIR}/wn_raw.ini 0 5 "-Dphi=phi_linear;-Dai_fun=ai_fun_exp;-Dpos_fun=pos_fun_lin;-Dh=.2500;-W512;--postprocess=../configs/pp_optical_flow.fsh" ${WN_DEPS})
-	render_still_take_cv(optical_flow wn-exp-rnd-08-opt png png ${SAMPLES_DIR}/wn_raw.ini 0 5 "-Dphi=phi_linear;-Dai_fun=ai_fun_exp;-Dpos_fun=pos_fun_rnd;-Dh=.2500;-W512;--postprocess=../configs/pp_optical_flow.fsh" ${WN_DEPS})
+	foreach(AI_FUN ${AI_FUNS})
+		foreach(POS_FUN ${POS_FUNS})
+			render_still_take_cv(optical_flow wn-${AI_FUN}-${POS_FUN}-08-opt png png ${SAMPLES_DIR}/wn_raw.ini 0 5 "-Dphi=phi_linear;-Dai_fun=ai_fun_${AI_FUN};-Dpos_fun=pos_fun_${POS_FUN};-Dh=.2500;-W512;--postprocess=../configs/pp_optical_flow.fsh" ${WN_DEPS})
+		endforeach()
+	endforeach()
 
-	render_still(procmarble-step0 png png ${SAMPLES_DIR}/procmarble.ini 1 "-DTEXSTEP=0;-W512" ${SAMPLES_DIR}/procmarble.fsh)
-	render_still(procmarble-step1 png png ${SAMPLES_DIR}/procmarble.ini 1 "-DTEXSTEP=1;-W512" ${SAMPLES_DIR}/procmarble.fsh)
-	render_still(procmarble-step2 png png ${SAMPLES_DIR}/procmarble.ini 1 "-DTEXSTEP=2;-W512" ${SAMPLES_DIR}/procmarble.fsh)
-	render_still(procmarble-step3 png png ${SAMPLES_DIR}/procmarble.ini 1 "-DTEXSTEP=3;-W512" ${SAMPLES_DIR}/procmarble.fsh)
-	render_still(procmarble-step4 png png ${SAMPLES_DIR}/procmarble.ini 1 "-DTEXSTEP=4;-W512" ${SAMPLES_DIR}/procmarble.fsh)
+	foreach(STEP RANGE 4)
+		render_still(procmarble-step${STEP} png png ${SAMPLES_DIR}/procmarble.ini 1 "-DTEXSTEP=${STEP};-W512" ${SAMPLES_DIR}/procmarble.fsh)
+	endforeach()
 
 	render_still(noisecorrelation-dist050 png png ${SAMPLES_DIR}/noisetile.ini 1 "-DTILESIZE=50.;--width=600;--height=101" ${SAMPLES_DIR}/noisetile.fsh)
 	render_still(noisecorrelation-dist100 png png ${SAMPLES_DIR}/noisetile.ini 1 "-DTILESIZE=100.;--width=600;--height=101" ${SAMPLES_DIR}/noisetile.fsh)
diff --git a/modules/floatexpr.cmake b/modules/floatexpr.cmake
new file mode 100644
index 0000000000000000000000000000000000000000..317e214ec40b1141ec75373a580684c8c8f81555
--- /dev/null
+++ b/modules/floatexpr.cmake
@@ -0,0 +1,5 @@
+# https://stackoverflow.com/a/43664211
+function(floatexpr expr output)
+	execute_process(COMMAND awk "BEGIN {print ${expr}}" OUTPUT_VARIABLE __output)
+	set(${output} ${__output} PARENT_SCOPE)
+endfunction()