summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKenneth Graunke <kenneth@whitecape.org>2010-06-09 14:06:56 -0700
committerKenneth Graunke <kenneth@whitecape.org>2010-06-09 14:07:35 -0700
commitc476ba8fe26c499d4cdbc686e45ffe548fe65cd8 (patch)
tree676dd9efc0c14d0dba8b8ce750667cbc004ff88b
parent855fcb22c1536a2c2b03c88bffa60eb7cc40ff0a (diff)
Add a completely bogus implementation of the noise[1234] builtins.
idr suggested this. Eventually we will need a real one.
-rw-r--r--builtin_function.cpp80
-rw-r--r--builtins/110/noise_fake76
2 files changed, 156 insertions, 0 deletions
diff --git a/builtin_function.cpp b/builtin_function.cpp
index 083fd314c7..bc0409035a 100644
--- a/builtin_function.cpp
+++ b/builtin_function.cpp
@@ -1419,6 +1419,85 @@ static const char *builtins_110_mod = {
"))\n"
};
+static const char *builtins_110_noise_fake = {
+ "((function noise1\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in) float x))\n"
+ " ((return (constant float (0)))))\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in) vec2 x))\n"
+ " ((return (constant float (0)))))\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in) vec3 x))\n"
+ " ((return (constant float (0)))))\n"
+ " (signature float\n"
+ " (parameters\n"
+ " (declare (in) vec4 x))\n"
+ " ((return (constant float (0)))))\n"
+ " )\n"
+ "\n"
+ " (function noise2\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in) float x))\n"
+ " ((return (constant vec2 (0 0)))))\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in) vec2 x))\n"
+ " ((return (constant vec2 (0 0)))))\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in) vec3 x))\n"
+ " ((return (constant vec2 (0 0)))))\n"
+ " (signature vec2\n"
+ " (parameters\n"
+ " (declare (in) vec4 x))\n"
+ " ((return (constant vec2 (0 0)))))\n"
+ " )\n"
+ "\n"
+ " (function noise3\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in) float x))\n"
+ " ((return (constant vec3 (0 0 0)))))\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in) vec2 x))\n"
+ " ((return (constant vec3 (0 0 0)))))\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in) vec3 x))\n"
+ " ((return (constant vec3 (0 0 0)))))\n"
+ " (signature vec3\n"
+ " (parameters\n"
+ " (declare (in) vec4 x))\n"
+ " ((return (constant vec3 (0 0 0)))))\n"
+ " )\n"
+ "\n"
+ " (function noise4\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in) float x))\n"
+ " ((return (constant vec4 (0 0 0 0)))))\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in) vec2 x))\n"
+ " ((return (constant vec4 (0 0 0 0)))))\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in) vec3 x))\n"
+ " ((return (constant vec4 (0 0 0 0)))))\n"
+ " (signature vec4\n"
+ " (parameters\n"
+ " (declare (in) vec4 x))\n"
+ " ((return (constant vec4 (0 0 0 0)))))\n"
+ " )\n"
+ ")\n"
+};
+
static const char *builtins_110_normalize = {
"((function normalize\n"
" (signature float\n"
@@ -2293,6 +2372,7 @@ static const char *functions_for_110 [] = {
builtins_110_min,
builtins_110_mix,
builtins_110_mod,
+ builtins_110_noise_fake,
builtins_110_normalize,
builtins_110_not,
builtins_110_notEqual,
diff --git a/builtins/110/noise_fake b/builtins/110/noise_fake
new file mode 100644
index 0000000000..bcfb17b04b
--- /dev/null
+++ b/builtins/110/noise_fake
@@ -0,0 +1,76 @@
+((function noise1
+ (signature float
+ (parameters
+ (declare (in) float x))
+ ((return (constant float (0)))))
+ (signature float
+ (parameters
+ (declare (in) vec2 x))
+ ((return (constant float (0)))))
+ (signature float
+ (parameters
+ (declare (in) vec3 x))
+ ((return (constant float (0)))))
+ (signature float
+ (parameters
+ (declare (in) vec4 x))
+ ((return (constant float (0)))))
+ )
+
+ (function noise2
+ (signature vec2
+ (parameters
+ (declare (in) float x))
+ ((return (constant vec2 (0 0)))))
+ (signature vec2
+ (parameters
+ (declare (in) vec2 x))
+ ((return (constant vec2 (0 0)))))
+ (signature vec2
+ (parameters
+ (declare (in) vec3 x))
+ ((return (constant vec2 (0 0)))))
+ (signature vec2
+ (parameters
+ (declare (in) vec4 x))
+ ((return (constant vec2 (0 0)))))
+ )
+
+ (function noise3
+ (signature vec3
+ (parameters
+ (declare (in) float x))
+ ((return (constant vec3 (0 0 0)))))
+ (signature vec3
+ (parameters
+ (declare (in) vec2 x))
+ ((return (constant vec3 (0 0 0)))))
+ (signature vec3
+ (parameters
+ (declare (in) vec3 x))
+ ((return (constant vec3 (0 0 0)))))
+ (signature vec3
+ (parameters
+ (declare (in) vec4 x))
+ ((return (constant vec3 (0 0 0)))))
+ )
+
+ (function noise4
+ (signature vec4
+ (parameters
+ (declare (in) float x))
+ ((return (constant vec4 (0 0 0 0)))))
+ (signature vec4
+ (parameters
+ (declare (in) vec2 x))
+ ((return (constant vec4 (0 0 0 0)))))
+ (signature vec4
+ (parameters
+ (declare (in) vec3 x))
+ ((return (constant vec4 (0 0 0 0)))))
+ (signature vec4
+ (parameters
+ (declare (in) vec4 x))
+ ((return (constant vec4 (0 0 0 0)))))
+ )
+)