Mentions légales du service
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
libshadertoy
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
HUYNH Danh
libshadertoy
Commits
9aeaf6eb
Commit
9aeaf6eb
authored
7 years ago
by
TAVERNIER Vincent
Browse files
Options
Downloads
Patches
Plain Diff
Add samples for no non-radial correlation
parent
0f36d747
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
CMakeLists.txt
+3
-0
3 additions, 0 deletions
CMakeLists.txt
samples/wn_zoom_noradial.fsh
+50
-0
50 additions, 0 deletions
samples/wn_zoom_noradial.fsh
samples/wn_zoom_noradial.ini
+7
-0
7 additions, 0 deletions
samples/wn_zoom_noradial.ini
with
60 additions
and
0 deletions
CMakeLists.txt
+
3
−
0
View file @
9aeaf6eb
...
...
@@ -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"
)
...
...
This diff is collapsed.
Click to expand it.
samples/wn_zoom_noradial.fsh
0 → 100644
+
50
−
0
View file @
9aeaf6eb
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;
}
}
}
This diff is collapsed.
Click to expand it.
samples/wn_zoom_noradial.ini
0 → 100644
+
7
−
0
View file @
9aeaf6eb
[image]
shader
=
../configs/np_def.fsh;wn_zoom_noradial.fsh
[image.0]
type
=
noise
filter
=
linear
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment