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-12-06 21:48:17 +0400
committerThomas Dinges <blender@dingto.org>2013-12-06 21:48:17 +0400
commitc94d907367d2e6203f2bce787f8eaf5b1002cacd (patch)
treeb5a85425fa1d5442af7d65eb3b89b6719a1151cd /release/scripts/templates_osl
parentc167d7b79a9f72c4ff24ee0f650e0dfb5fcdb79c (diff)
Cycles / OSL Templates: Add Simplex and Gabor noise templates and remove ones which are available as regular nodes.
Diffstat (limited to 'release/scripts/templates_osl')
-rw-r--r--release/scripts/templates_osl/gabor_noise.osl17
-rw-r--r--release/scripts/templates_osl/noise.osl21
-rw-r--r--release/scripts/templates_osl/temperature_to_rgb.osl9
-rw-r--r--release/scripts/templates_osl/wavelength_to_rgb.osl9
-rw-r--r--release/scripts/templates_osl/wireframe.osl11
5 files changed, 32 insertions, 35 deletions
diff --git a/release/scripts/templates_osl/gabor_noise.osl b/release/scripts/templates_osl/gabor_noise.osl
new file mode 100644
index 00000000000..1f5910685d2
--- /dev/null
+++ b/release/scripts/templates_osl/gabor_noise.osl
@@ -0,0 +1,17 @@
+
+shader gabor_noise(
+ point Point = P,
+ vector Direction = vector(1, 0, 0),
+ int Anisotropic = 0,
+ float Bandwidth = 1.0,
+ float Impulses = 16,
+ output float Gabor = 0.8)
+{
+ Gabor = noise("gabor", Point,
+ "direction", Direction,
+ "anisotropic", Anisotropic,
+ "do_filter", 1, // Set to 0 to disable filtering/anti-aliasing
+ "bandwidth", Bandwidth,
+ "impulses", Impulses);
+}
+
diff --git a/release/scripts/templates_osl/noise.osl b/release/scripts/templates_osl/noise.osl
index 05cc31687c0..a4ffbbc1ee7 100644
--- a/release/scripts/templates_osl/noise.osl
+++ b/release/scripts/templates_osl/noise.osl
@@ -4,15 +4,24 @@ shader noise(
point Point = P,
output float Cell = 0.0,
output color Perlin = 0.8,
- output color UPerlin = 0.8)
+ output color UPerlin = 0.8,
+ output color Simplex = 0.8,
+ output color USimplex = 0.8)
{
/* Cell Noise */
Cell = noise("cell", Point);
+
+ /* Perlin 4D Noise */
+ Perlin = noise("perlin", Point, Time);
+
+ /* UPerlin 4D Noise */
+ UPerlin = noise("uperlin", Point, Time);
+
+ /* Simplex 4D Noise */
+ Simplex = noise("simplex", Point, Time);
+
+ /* USimplex 4D Noise */
+ USimplex = noise("usimplex", Point, Time);
- /* Perlin 4D Noise*/
- Perlin = noise("perlin", Point, Time);
-
- /* UPerlin 4D Noise*/
- UPerlin = noise("uperlin", Point, Time);
}
diff --git a/release/scripts/templates_osl/temperature_to_rgb.osl b/release/scripts/templates_osl/temperature_to_rgb.osl
deleted file mode 100644
index 6b91416c609..00000000000
--- a/release/scripts/templates_osl/temperature_to_rgb.osl
+++ /dev/null
@@ -1,9 +0,0 @@
-
-shader temperature_to_rgb(
- float Kelvin = 1200.0,
- output color Color = 0.8)
-{
- /* Kelvin to RGB */
- Color = blackbody(Kelvin);
-}
-
diff --git a/release/scripts/templates_osl/wavelength_to_rgb.osl b/release/scripts/templates_osl/wavelength_to_rgb.osl
deleted file mode 100644
index 2a605be101d..00000000000
--- a/release/scripts/templates_osl/wavelength_to_rgb.osl
+++ /dev/null
@@ -1,9 +0,0 @@
-
-shader wavelength_to_rgb(
- float Wavelength = 500.0,
- output color Color = 0.8)
-{
- /* Wavelength to RGB */
- Color = wavelength_color(Wavelength);
-}
-
diff --git a/release/scripts/templates_osl/wireframe.osl b/release/scripts/templates_osl/wireframe.osl
deleted file mode 100644
index 00e4506e73c..00000000000
--- a/release/scripts/templates_osl/wireframe.osl
+++ /dev/null
@@ -1,11 +0,0 @@
-
-#include "oslutil.h"
-
-shader wireframe(
- float Line_Width = 2.0,
- int Raster = 1,
- output float Wire = 0.0)
-{
- Wire = wireframe("triangles", Line_Width, Raster);
-}
-