Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 9aeaf6eb authored by TAVERNIER Vincent's avatar TAVERNIER Vincent
Browse files

Add samples for no non-radial correlation

parent 0f36d747
No related branches found
No related tags found
No related merge requests found
......@@ -280,6 +280,9 @@ if (GLCV_FULL_BUILD)
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;-Dhmin=.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;-Dhmin=.5000;-W512" ${WN_DEPS})
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;-Dhmin=.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;-Dhmin=.2500;-W512" ${WN_DEPS})
add_custom_target(stills DEPENDS ${STILLS_OUTPUTS})
if (OLD_RENDER_DIRECTORY)
set(CMD "([ ! -e ${OLD_RENDER_DIRECTORY} ] && ln -fs ${RENDER_DIRECTORY} ${OLD_RENDER_DIRECTORY}) | true")
......
float corr(in vec2 x1, in vec2 x2) {
return (phi(x1, x2)-mu2)/(sqrt(phi(x1, x1)-mu2)*sqrt(phi(x2, x2)-mu2));
}
vec4 nrm(vec4 x, float sr2)
{
float so2 = sigma_f2;
float nc = mu2 - 2.*mu3 + mu4 - sr2 + 3.*mu*sr2 - 3.*mu2*sr2;
float b = -(-2.*mu2 + 3.*mu3 - mu4 + 3.*mu2*sr2 + mu2*sqrt(so2/sr2) - mu3*sqrt(so2/sr2) + sr2*sqrt(so2/sr2) - 3.*mu*sr2*sqrt(so2/sr2)),
c = -(mu - mu3 - 3.*mu*sr2 - mu*sqrt(so2/sr2) + mu3*sqrt(so2/sr2) + 3.*mu*sr2*sqrt(so2/sr2)),
d = -(-mu + mu2 + sr2 + mu*sqrt(so2/sr2) - mu2*sqrt(so2/sr2) - sr2*sqrt(so2/sr2));
return x/nc*(b+x*(c+x*d));
}
float var(in vec2 x) {
return phi(x, x) - mu2;
}
void mainImage(out vec4 O, in vec2 U)
{
// screen-centered coordinates
vec2 uv = (U.xy / iResolution.xy - .5);
O = vec4(0.);
float barLen = 7.;
if (uv.x > 0. && uv.y > 0.) {
if (uv.x < barLen / iResolution.x &&
(uv.y > 0. ? (mod(uv.y * iResolution.y / 2., 10.) < 1.)
: (mod(((-5.+uv.y)*iResolution.y - 4.) / 2., 10.) < 1.)) ||
uv.y > 0. && uv.y < barLen / iResolution.y &&
(mod(uv.x * iResolution.x / 2., 10.) < 1.) ||
uv.y*iResolution.y < -.5*iResolution.y+barLen &&
(mod(uv.x * iResolution.x / 2., 10.) < 1.))
{
O = vec4(0.);
}
else
{
if (uv.y > 0.)
{
O = vec4(corr(vec2(uv.x*iResolution.x, 0.), uv*iResolution.xy));
}
O = 1. - O;
}
}
}
[image]
shader = ../configs/np_def.fsh;wn_zoom_noradial.fsh
[image.0]
type = noise
filter = linear
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment