Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Dinges <blender@dingto.org>2013-08-10 04:52:57 +0400
committerThomas Dinges <blender@dingto.org>2013-08-10 04:52:57 +0400
commit30f279be26b70dc389f8300e8f5fb95d69c4b723 (patch)
tree9b8ed6324d3df11b3a22af05c66aaf660ebf5bbf /intern/cycles/kernel/shaders
parent743a7a4a4b2b6999b911704b6367962fc365474a (diff)
Code cleanup / Cycles:
* Remove code for the unused Wave texture variations. We have quite some unused code in the texture area, I guess it doesn't harm to clean a bit up here. We can always get the code back from SVN if we need something.
Diffstat (limited to 'intern/cycles/kernel/shaders')
-rw-r--r--intern/cycles/kernel/shaders/node_texture.h25
-rw-r--r--intern/cycles/kernel/shaders/node_wave_texture.osl2
2 files changed, 1 insertions, 26 deletions
diff --git a/intern/cycles/kernel/shaders/node_texture.h b/intern/cycles/kernel/shaders/node_texture.h
index 645be23c6a5..e7801c0aba2 100644
--- a/intern/cycles/kernel/shaders/node_texture.h
+++ b/intern/cycles/kernel/shaders/node_texture.h
@@ -198,31 +198,6 @@ float noise_basis_hard(point p, string basis, int hard)
return (hard) ? fabs(2.0 * t - 1.0) : t;
}
-/* Waves */
-
-float noise_wave(string wave, float a)
-{
- if (wave == "Sine") {
- return 0.5 + 0.5 * sin(a);
- }
- if (wave == "Saw") {
- float b = 2 * M_PI;
- int n = (int)(a / b);
- a -= n * b;
- if (a < 0) a += b;
-
- return a / b;
- }
- if (wave == "Tri") {
- float b = 2 * M_PI;
- float rmax = 1.0;
-
- return rmax - 2.0 * fabs(floor((a * (1.0 / b)) + 0.5) - (a * (1.0 / b)));
- }
-
- return 0.0;
-}
-
/* Turbulence */
float noise_turbulence(point p, string basis, float details, int hard)
diff --git a/intern/cycles/kernel/shaders/node_wave_texture.osl b/intern/cycles/kernel/shaders/node_wave_texture.osl
index 12b837bc448..93d45ded9c3 100644
--- a/intern/cycles/kernel/shaders/node_wave_texture.osl
+++ b/intern/cycles/kernel/shaders/node_wave_texture.osl
@@ -39,7 +39,7 @@ float wave(point p, float scale, string type, float detail, float distortion, fl
if (distortion != 0.0) {
n = n + (distortion * noise_turbulence(p * dscale, "Perlin", detail, 0));
}
- return noise_wave("Sine", n);
+ return 0.5 + 0.5 * sin(n);
}
shader node_wave_texture(