Use new symbol table initization for vertex shader.

BUG=
R=alokp@chromium.org

Review URL: https://codereview.appspot.com/10247043

git-svn-id: http://angleproject.googlecode.com/svn/trunk@2426 736b8ea6-26fd-11df-bfd4-992fa37f6226
diff --git a/src/compiler/Compiler.cpp b/src/compiler/Compiler.cpp
index 9d3e407..2ac367c 100644
--- a/src/compiler/Compiler.cpp
+++ b/src/compiler/Compiler.cpp
@@ -69,7 +69,20 @@
         }
     }
 
-    InsertBuiltInFunctionsCommon(resources, &symbolTable);
+
+    switch (type) {
+    case SH_FRAGMENT_SHADER:
+        InsertBuiltInFunctionsCommon(resources, &symbolTable);
+        break;
+
+    case SH_VERTEX_SHADER:
+        InsertBuiltInFunctionsCommon(resources, &symbolTable);
+        InsertBuiltInFunctionsVertex(resources, &symbolTable);
+        break;
+
+    default: assert(false && "Language not supported");
+    }
+
     IdentifyBuiltIns(type, spec, resources, symbolTable);
 
     return true;
diff --git a/src/compiler/Initialize.cpp b/src/compiler/Initialize.cpp
index 9b22d1e..33229a2 100644
--- a/src/compiler/Initialize.cpp
+++ b/src/compiler/Initialize.cpp
@@ -16,31 +16,6 @@
 
 //============================================================================
 //
-// Prototypes for built-in functions seen by vertex shaders only.
-//
-//============================================================================
-static TString BuiltInFunctionsVertex(const ShBuiltInResources& resources)
-{
-    TString s;
-
-    //
-    // Geometric Functions.
-    //
-    //s.append(TString("vec4 ftransform();"));
-
-    //
-    // Texture Functions.
-    //
-    s.append(TString("vec4 texture2DLod(sampler2D sampler, vec2 coord, float lod);"));
-    s.append(TString("vec4 texture2DProjLod(sampler2D sampler, vec3 coord, float lod);"));
-    s.append(TString("vec4 texture2DProjLod(sampler2D sampler, vec4 coord, float lod);"));
-    s.append(TString("vec4 textureCubeLod(samplerCube sampler, vec3 coord, float lod);"));
-
-    return s;
-}
-
-//============================================================================
-//
 // Prototypes for built-in functions seen by fragment shaders only.
 //
 //============================================================================
@@ -164,7 +139,6 @@
 
     case SH_VERTEX_SHADER:
         builtInStrings.push_back(DefaultPrecisionVertex());
-        builtInStrings.push_back(BuiltInFunctionsVertex(resources));
         builtInStrings.push_back(StandardUniforms());
         break;
 
diff --git a/src/compiler/builtin_symbol_table.cpp b/src/compiler/builtin_symbol_table.cpp
index f9d27d3..920c824 100644
--- a/src/compiler/builtin_symbol_table.cpp
+++ b/src/compiler/builtin_symbol_table.cpp
@@ -16,6 +16,7 @@
   f->addParameter(param);
   t->insert(*f);
 }
+
 static void builtin2(TSymbolTable* t, TType* rvalue, const char* name, TType* ptype1, const char* pname1, TType* ptype2, const char* pname2)
 {
   TFunction* f = new TFunction(new TString(name), *rvalue);
@@ -37,7 +38,8 @@
   f->addParameter(param3);
   t->insert(*f);
 }
-void InsertBuiltInFunctionsCommon(const ShBuiltInResources& resources, TSymbolTable * t) {
+
+void InsertBuiltInFunctionsCommon(const ShBuiltInResources& resources, TSymbolTable* t) {
     builtin1(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 1, false, false), "radians", new TType(EbtFloat, EbpUndefined, EvqGlobal, 1, false, false), "degrees");
     builtin1(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 2, false, false), "radians", new TType(EbtFloat, EbpUndefined, EvqGlobal, 2, false, false), "degrees");
     builtin1(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 3, false, false), "radians", new TType(EbtFloat, EbpUndefined, EvqGlobal, 3, false, false), "degrees");
@@ -277,3 +279,11 @@
         builtin2(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 4, false, false), "texture2DRectProj", new TType(EbtSampler2DRect, EbpUndefined, EvqGlobal, 1, false, false), "sampler", new TType(EbtFloat, EbpUndefined, EvqGlobal, 4, false, false), "coord");
     }
 }
+
+void InsertBuiltInFunctionsVertex(const ShBuiltInResources& resources, TSymbolTable* t) {
+    builtin3(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 4, false, false), "texture2DLod", new TType(EbtSampler2D, EbpUndefined, EvqGlobal, 1, false, false), "sampler", new TType(EbtFloat, EbpUndefined, EvqGlobal, 2, false, false), "coord", new TType(EbtFloat, EbpUndefined, EvqGlobal, 1, false, false), "lod");
+    builtin3(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 4, false, false), "texture2DProjLod", new TType(EbtSampler2D, EbpUndefined, EvqGlobal, 1, false, false), "sampler", new TType(EbtFloat, EbpUndefined, EvqGlobal, 3, false, false), "coord", new TType(EbtFloat, EbpUndefined, EvqGlobal, 1, false, false), "lod");
+    builtin3(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 4, false, false), "texture2DProjLod", new TType(EbtSampler2D, EbpUndefined, EvqGlobal, 1, false, false), "sampler", new TType(EbtFloat, EbpUndefined, EvqGlobal, 4, false, false), "coord", new TType(EbtFloat, EbpUndefined, EvqGlobal, 1, false, false), "lod");
+    builtin3(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 4, false, false), "textureCubeLod", new TType(EbtSamplerCube, EbpUndefined, EvqGlobal, 1, false, false), "sampler", new TType(EbtFloat, EbpUndefined, EvqGlobal, 3, false, false), "coord", new TType(EbtFloat, EbpUndefined, EvqGlobal, 1, false, false), "lod");
+}
+
diff --git a/src/compiler/builtin_symbol_table.h b/src/compiler/builtin_symbol_table.h
index 44d0d52..8e04b61 100644
--- a/src/compiler/builtin_symbol_table.h
+++ b/src/compiler/builtin_symbol_table.h
@@ -10,6 +10,7 @@
 
 class TSymbolTable;
 
-extern void InsertBuiltInFunctionsCommon(const ShBuiltInResources& resources, TSymbolTable * t);
+extern void InsertBuiltInFunctionsCommon(const ShBuiltInResources& resources, TSymbolTable* t);
+extern void InsertBuiltInFunctionsVertex(const ShBuiltInResources& resources, TSymbolTable* t);
 
 #endif // _BUILTIN_SYMBOL_TABLE_INCLUDED_
diff --git a/src/compiler/builtin_symbols.json b/src/compiler/builtin_symbols.json
index 41c5591..0378c98 100644
--- a/src/compiler/builtin_symbols.json
+++ b/src/compiler/builtin_symbols.json
@@ -22,1755 +22,1795 @@
 },
 
 "common" : [
-{
- "name": "radians",
- "return_type": "float",
- "parameter": [
-  {"type": "float", "name": "degrees"}
- ]
-},
-{
- "name": "radians",
- "return_type": "vec2",
- "parameter": [
-  {"type": "vec2", "name": "degrees"}
- ]
-},
-{
- "name": "radians",
- "return_type": "vec3",
- "parameter": [
-  {"type": "vec3", "name": "degrees"}
- ]
-},
-{
- "name": "radians",
- "return_type": "vec4",
- "parameter": [
-  {"type": "vec4", "name": "degrees"}
- ]
-},
-{
- "name": "degrees",
- "return_type": "float",
- "parameter": [
-  {"type": "float", "name": "radians"}
- ]
-},
-{
- "name": "degrees",
- "return_type": "vec2",
- "parameter": [
-  {"type": "vec2", "name": "radians"}
- ]
-},
-{
- "name": "degrees",
- "return_type": "vec3",
- "parameter": [
-  {"type": "vec3", "name": "radians"}
- ]
-},
-{
- "name": "degrees",
- "return_type": "vec4",
- "parameter": [
-  {"type": "vec4", "name": "radians"}
- ]
-},
-{
- "name": "sin",
- "return_type": "float",
- "parameter": [
-  {"type": "float", "name": "angle"}
- ]
-},
-{
- "name": "sin",
- "return_type": "vec2",
- "parameter": [
-  {"type": "vec2", "name": "angle"}
- ]
-},
-{
- "name": "sin",
- "return_type": "vec3",
- "parameter": [
-  {"type": "vec3", "name": "angle"}
- ]
-},
-{
- "name": "sin",
- "return_type": "vec4",
- "parameter": [
-  {"type": "vec4", "name": "angle"}
- ]
-},
-{
- "name": "cos",
- "return_type": "float",
- "parameter": [
-  {"type": "float", "name": "angle"}
- ]
-},
-{
- "name": "cos",
- "return_type": "vec2",
- "parameter": [
-  {"type": "vec2", "name": "angle"}
- ]
-},
-{
- "name": "cos",
- "return_type": "vec3",
- "parameter": [
-  {"type": "vec3", "name": "angle"}
- ]
-},
-{
- "name": "cos",
- "return_type": "vec4",
- "parameter": [
-  {"type": "vec4", "name": "angle"}
- ]
-},
-{
- "name": "tan",
- "return_type": "float",
- "parameter": [
-  {"type": "float", "name": "angle"}
- ]
-},
-{
- "name": "tan",
- "return_type": "vec2",
- "parameter": [
-  {"type": "vec2", "name": "angle"}
- ]
-},
-{
- "name": "tan",
- "return_type": "vec3",
- "parameter": [
-  {"type": "vec3", "name": "angle"}
- ]
-},
-{
- "name": "tan",
- "return_type": "vec4",
- "parameter": [
-  {"type": "vec4", "name": "angle"}
- ]
-},
-{
- "name": "asin",
- "return_type": "float",
- "parameter": [
-  {"type": "float", "name": "x"}
- ]
-},
-{
- "name": "asin",
- "return_type": "vec2",
- "parameter": [
-  {"type": "vec2", "name": "x"}
- ]
-},
-{
- "name": "asin",
- "return_type": "vec3",
- "parameter": [
-  {"type": "vec3", "name": "x"}
- ]
-},
-{
- "name": "asin",
- "return_type": "vec4",
- "parameter": [
-  {"type": "vec4", "name": "x"}
- ]
-},
-{
- "name": "acos",
- "return_type": "float",
- "parameter": [
-  {"type": "float", "name": "x"}
- ]
-},
-{
- "name": "acos",
- "return_type": "vec2",
- "parameter": [
-  {"type": "vec2", "name": "x"}
- ]
-},
-{
- "name": "acos",
- "return_type": "vec3",
- "parameter": [
-  {"type": "vec3", "name": "x"}
- ]
-},
-{
- "name": "acos",
- "return_type": "vec4",
- "parameter": [
-  {"type": "vec4", "name": "x"}
- ]
-},
-{
- "name": "atan",
- "return_type": "float",
- "parameter": [
-  {"type": "float", "name": "y"},
-  {"type": "float", "name": "x"}
- ]
-},
-{
- "name": "atan",
- "return_type": "vec2",
- "parameter": [
-  {"type": "vec2", "name": "y"},
-  {"type": "vec2", "name": "x"}
- ]
-},
-{
- "name": "atan",
- "return_type": "vec3",
- "parameter": [
-  {"type": "vec3", "name": "y"},
-  {"type": "vec3", "name": "x"}
- ]
-},
-{
- "name": "atan",
- "return_type": "vec4",
- "parameter": [
-  {"type": "vec4", "name": "y"},
-  {"type": "vec4", "name": "x"}
- ]
-},
-{
- "name": "atan",
- "return_type": "float",
- "parameter": [
-  {"type": "float", "name": "y_over_x"}
- ]
-},
-{
- "name": "atan",
- "return_type": "vec2",
- "parameter": [
-  {"type": "vec2", "name": "y_over_x"}
- ]
-},
-{
- "name": "atan",
- "return_type": "vec3",
- "parameter": [
-  {"type": "vec3", "name": "y_over_x"}
- ]
-},
-{
- "name": "atan",
- "return_type": "vec4",
- "parameter": [
-  {"type": "vec4", "name": "y_over_x"}
- ]
-},
-{
- "name": "pow",
- "return_type": "float",
- "parameter": [
-  {"type": "float", "name": "x"},
-  {"type": "float", "name": "y"}
- ]
-},
-{
- "name": "pow",
- "return_type": "vec2",
- "parameter": [
-  {"type": "vec2", "name": "x"},
-  {"type": "vec2", "name": "y"}
- ]
-},
-{
- "name": "pow",
- "return_type": "vec3",
- "parameter": [
-  {"type": "vec3", "name": "x"},
-  {"type": "vec3", "name": "y"}
- ]
-},
-{
- "name": "pow",
- "return_type": "vec4",
- "parameter": [
-  {"type": "vec4", "name": "x"},
-  {"type": "vec4", "name": "y"}
- ]
-},
-{
- "name": "exp",
- "return_type": "float",
- "parameter": [
-  {"type": "float", "name": "x"}
- ]
-},
-{
- "name": "exp",
- "return_type": "vec2",
- "parameter": [
-  {"type": "vec2", "name": "x"}
- ]
-},
-{
- "name": "exp",
- "return_type": "vec3",
- "parameter": [
-  {"type": "vec3", "name": "x"}
- ]
-},
-{
- "name": "exp",
- "return_type": "vec4",
- "parameter": [
-  {"type": "vec4", "name": "x"}
- ]
-},
-{
- "name": "log",
- "return_type": "float",
- "parameter": [
-  {"type": "float", "name": "x"}
- ]
-},
-{
- "name": "log",
- "return_type": "vec2",
- "parameter": [
-  {"type": "vec2", "name": "x"}
- ]
-},
-{
- "name": "log",
- "return_type": "vec3",
- "parameter": [
-  {"type": "vec3", "name": "x"}
- ]
-},
-{
- "name": "log",
- "return_type": "vec4",
- "parameter": [
-  {"type": "vec4", "name": "x"}
- ]
-},
-{
- "name": "exp2",
- "return_type": "float",
- "parameter": [
-  {"type": "float", "name": "x"}
- ]
-},
-{
- "name": "exp2",
- "return_type": "vec2",
- "parameter": [
-  {"type": "vec2", "name": "x"}
- ]
-},
-{
- "name": "exp2",
- "return_type": "vec3",
- "parameter": [
-  {"type": "vec3", "name": "x"}
- ]
-},
-{
- "name": "exp2",
- "return_type": "vec4",
- "parameter": [
-  {"type": "vec4", "name": "x"}
- ]
-},
-{
- "name": "log2",
- "return_type": "float",
- "parameter": [
-  {"type": "float", "name": "x"}
- ]
-},
-{
- "name": "log2",
- "return_type": "vec2",
- "parameter": [
-  {"type": "vec2", "name": "x"}
- ]
-},
-{
- "name": "log2",
- "return_type": "vec3",
- "parameter": [
-  {"type": "vec3", "name": "x"}
- ]
-},
-{
- "name": "log2",
- "return_type": "vec4",
- "parameter": [
-  {"type": "vec4", "name": "x"}
- ]
-},
-{
- "name": "sqrt",
- "return_type": "float",
- "parameter": [
-  {"type": "float", "name": "x"}
- ]
-},
-{
- "name": "sqrt",
- "return_type": "vec2",
- "parameter": [
-  {"type": "vec2", "name": "x"}
- ]
-},
-{
- "name": "sqrt",
- "return_type": "vec3",
- "parameter": [
-  {"type": "vec3", "name": "x"}
- ]
-},
-{
- "name": "sqrt",
- "return_type": "vec4",
- "parameter": [
-  {"type": "vec4", "name": "x"}
- ]
-},
-{
- "name": "inversesqrt",
- "return_type": "float",
- "parameter": [
-  {"type": "float", "name": "x"}
- ]
-},
-{
- "name": "inversesqrt",
- "return_type": "vec2",
- "parameter": [
-  {"type": "vec2", "name": "x"}
- ]
-},
-{
- "name": "inversesqrt",
- "return_type": "vec3",
- "parameter": [
-  {"type": "vec3", "name": "x"}
- ]
-},
-{
- "name": "inversesqrt",
- "return_type": "vec4",
- "parameter": [
-  {"type": "vec4", "name": "x"}
- ]
-},
-{
- "name": "abs",
- "return_type": "float",
- "parameter": [
-  {"type": "float", "name": "x"}
- ]
-},
-{
- "name": "abs",
- "return_type": "vec2",
- "parameter": [
-  {"type": "vec2", "name": "x"}
- ]
-},
-{
- "name": "abs",
- "return_type": "vec3",
- "parameter": [
-  {"type": "vec3", "name": "x"}
- ]
-},
-{
- "name": "abs",
- "return_type": "vec4",
- "parameter": [
-  {"type": "vec4", "name": "x"}
- ]
-},
-{
- "name": "sign",
- "return_type": "float",
- "parameter": [
-  {"type": "float", "name": "x"}
- ]
-},
-{
- "name": "sign",
- "return_type": "vec2",
- "parameter": [
-  {"type": "vec2", "name": "x"}
- ]
-},
-{
- "name": "sign",
- "return_type": "vec3",
- "parameter": [
-  {"type": "vec3", "name": "x"}
- ]
-},
-{
- "name": "sign",
- "return_type": "vec4",
- "parameter": [
-  {"type": "vec4", "name": "x"}
- ]
-},
-{
- "name": "floor",
- "return_type": "float",
- "parameter": [
-  {"type": "float", "name": "x"}
- ]
-},
-{
- "name": "floor",
- "return_type": "vec2",
- "parameter": [
-  {"type": "vec2", "name": "x"}
- ]
-},
-{
- "name": "floor",
- "return_type": "vec3",
- "parameter": [
-  {"type": "vec3", "name": "x"}
- ]
-},
-{
- "name": "floor",
- "return_type": "vec4",
- "parameter": [
-  {"type": "vec4", "name": "x"}
- ]
-},
-{
- "name": "ceil",
- "return_type": "float",
- "parameter": [
-  {"type": "float", "name": "x"}
- ]
-},
-{
- "name": "ceil",
- "return_type": "vec2",
- "parameter": [
-  {"type": "vec2", "name": "x"}
- ]
-},
-{
- "name": "ceil",
- "return_type": "vec3",
- "parameter": [
-  {"type": "vec3", "name": "x"}
- ]
-},
-{
- "name": "ceil",
- "return_type": "vec4",
- "parameter": [
-  {"type": "vec4", "name": "x"}
- ]
-},
-{
- "name": "fract",
- "return_type": "float",
- "parameter": [
-  {"type": "float", "name": "x"}
- ]
-},
-{
- "name": "fract",
- "return_type": "vec2",
- "parameter": [
-  {"type": "vec2", "name": "x"}
- ]
-},
-{
- "name": "fract",
- "return_type": "vec3",
- "parameter": [
-  {"type": "vec3", "name": "x"}
- ]
-},
-{
- "name": "fract",
- "return_type": "vec4",
- "parameter": [
-  {"type": "vec4", "name": "x"}
- ]
-},
-{
- "name": "mod",
- "return_type": "float",
- "parameter": [
-  {"type": "float", "name": "x"},
-  {"type": "float", "name": "y"}
- ]
-},
-{
- "name": "mod",
- "return_type": "vec2",
- "parameter": [
-  {"type": "vec2", "name": "x"},
-  {"type": "float", "name": "y"}
- ]
-},
-{
- "name": "mod",
- "return_type": "vec3",
- "parameter": [
-  {"type": "vec3", "name": "x"},
-  {"type": "float", "name": "y"}
- ]
-},
-{
- "name": "mod",
- "return_type": "vec4",
- "parameter": [
-  {"type": "vec4", "name": "x"},
-  {"type": "float", "name": "y"}
- ]
-},
-{
- "name": "mod",
- "return_type": "vec2",
- "parameter": [
-  {"type": "vec2", "name": "x"},
-  {"type": "vec2", "name": "y"}
- ]
-},
-{
- "name": "mod",
- "return_type": "vec3",
- "parameter": [
-  {"type": "vec3", "name": "x"},
-  {"type": "vec3", "name": "y"}
- ]
-},
-{
- "name": "mod",
- "return_type": "vec4",
- "parameter": [
-  {"type": "vec4", "name": "x"},
-  {"type": "vec4", "name": "y"}
- ]
-},
-{
- "name": "min",
- "return_type": "float",
- "parameter": [
-  {"type": "float", "name": "x"},
-  {"type": "float", "name": "y"}
- ]
-},
-{
- "name": "min",
- "return_type": "vec2",
- "parameter": [
-  {"type": "vec2", "name": "x"},
-  {"type": "float", "name": "y"}
- ]
-},
-{
- "name": "min",
- "return_type": "vec3",
- "parameter": [
-  {"type": "vec3", "name": "x"},
-  {"type": "float", "name": "y"}
- ]
-},
-{
- "name": "min",
- "return_type": "vec4",
- "parameter": [
-  {"type": "vec4", "name": "x"},
-  {"type": "float", "name": "y"}
- ]
-},
-{
- "name": "min",
- "return_type": "vec2",
- "parameter": [
-  {"type": "vec2", "name": "x"},
-  {"type": "vec2", "name": "y"}
- ]
-},
-{
- "name": "min",
- "return_type": "vec3",
- "parameter": [
-  {"type": "vec3", "name": "x"},
-  {"type": "vec3", "name": "y"}
- ]
-},
-{
- "name": "min",
- "return_type": "vec4",
- "parameter": [
-  {"type": "vec4", "name": "x"},
-  {"type": "vec4", "name": "y"}
- ]
-},
-{
- "name": "max",
- "return_type": "float",
- "parameter": [
-  {"type": "float", "name": "x"},
-  {"type": "float", "name": "y"}
- ]
-},
-{
- "name": "max",
- "return_type": "vec2",
- "parameter": [
-  {"type": "vec2", "name": "x"},
-  {"type": "float", "name": "y"}
- ]
-},
-{
- "name": "max",
- "return_type": "vec3",
- "parameter": [
-  {"type": "vec3", "name": "x"},
-  {"type": "float", "name": "y"}
- ]
-},
-{
- "name": "max",
- "return_type": "vec4",
- "parameter": [
-  {"type": "vec4", "name": "x"},
-  {"type": "float", "name": "y"}
- ]
-},
-{
- "name": "max",
- "return_type": "vec2",
- "parameter": [
-  {"type": "vec2", "name": "x"},
-  {"type": "vec2", "name": "y"}
- ]
-},
-{
- "name": "max",
- "return_type": "vec3",
- "parameter": [
-  {"type": "vec3", "name": "x"},
-  {"type": "vec3", "name": "y"}
- ]
-},
-{
- "name": "max",
- "return_type": "vec4",
- "parameter": [
-  {"type": "vec4", "name": "x"},
-  {"type": "vec4", "name": "y"}
- ]
-},
-{
- "name": "clamp",
- "return_type": "float",
- "parameter": [
-  {"type": "float", "name": "x"},
-  {"type": "float", "name": "minVal"},
-  {"type": "float", "name": "maxVal"}
- ]
-},
-{
- "name": "clamp",
- "return_type": "vec2",
- "parameter": [
-  {"type": "vec2", "name": "x"},
-  {"type": "float", "name": "minVal"},
-  {"type": "float", "name": "maxVal"}
- ]
-},
-{
- "name": "clamp",
- "return_type": "vec3",
- "parameter": [
-  {"type": "vec3", "name": "x"},
-  {"type": "float", "name": "minVal"},
-  {"type": "float", "name": "maxVal"}
- ]
-},
-{
- "name": "clamp",
- "return_type": "vec4",
- "parameter": [
-  {"type": "vec4", "name": "x"},
-  {"type": "float", "name": "minVal"},
-  {"type": "float", "name": "maxVal"}
- ]
-},
-{
- "name": "clamp",
- "return_type": "vec2",
- "parameter": [
-  {"type": "vec2", "name": "x"},
-  {"type": "vec2", "name": "minVal"},
-  {"type": "vec2", "name": "maxVal"}
- ]
-},
-{
- "name": "clamp",
- "return_type": "vec3",
- "parameter": [
-  {"type": "vec3", "name": "x"},
-  {"type": "vec3", "name": "minVal"},
-  {"type": "vec3", "name": "maxVal"}
- ]
-},
-{
- "name": "clamp",
- "return_type": "vec4",
- "parameter": [
-  {"type": "vec4", "name": "x"},
-  {"type": "vec4", "name": "minVal"},
-  {"type": "vec4", "name": "maxVal"}
- ]
-},
-{
- "name": "mix",
- "return_type": "float",
- "parameter": [
-  {"type": "float", "name": "x"},
-  {"type": "float", "name": "y"},
-  {"type": "float", "name": "a"}
- ]
-},
-{
- "name": "mix",
- "return_type": "vec2",
- "parameter": [
-  {"type": "vec2", "name": "x"},
-  {"type": "vec2", "name": "y"},
-  {"type": "float", "name": "a"}
- ]
-},
-{
- "name": "mix",
- "return_type": "vec3",
- "parameter": [
-  {"type": "vec3", "name": "x"},
-  {"type": "vec3", "name": "y"},
-  {"type": "float", "name": "a"}
- ]
-},
-{
- "name": "mix",
- "return_type": "vec4",
- "parameter": [
-  {"type": "vec4", "name": "x"},
-  {"type": "vec4", "name": "y"},
-  {"type": "float", "name": "a"}
- ]
-},
-{
- "name": "mix",
- "return_type": "vec2",
- "parameter": [
-  {"type": "vec2", "name": "x"},
-  {"type": "vec2", "name": "y"},
-  {"type": "vec2", "name": "a"}
- ]
-},
-{
- "name": "mix",
- "return_type": "vec3",
- "parameter": [
-  {"type": "vec3", "name": "x"},
-  {"type": "vec3", "name": "y"},
-  {"type": "vec3", "name": "a"}
- ]
-},
-{
- "name": "mix",
- "return_type": "vec4",
- "parameter": [
-  {"type": "vec4", "name": "x"},
-  {"type": "vec4", "name": "y"},
-  {"type": "vec4", "name": "a"}
- ]
-},
-{
- "name": "step",
- "return_type": "float",
- "parameter": [
-  {"type": "float", "name": "edge"},
-  {"type": "float", "name": "x"}
- ]
-},
-{
- "name": "step",
- "return_type": "vec2",
- "parameter": [
-  {"type": "vec2", "name": "edge"},
-  {"type": "vec2", "name": "x"}
- ]
-},
-{
- "name": "step",
- "return_type": "vec3",
- "parameter": [
-  {"type": "vec3", "name": "edge"},
-  {"type": "vec3", "name": "x"}
- ]
-},
-{
- "name": "step",
- "return_type": "vec4",
- "parameter": [
-  {"type": "vec4", "name": "edge"},
-  {"type": "vec4", "name": "x"}
- ]
-},
-{
- "name": "step",
- "return_type": "vec2",
- "parameter": [
-  {"type": "float", "name": "edge"},
-  {"type": "vec2", "name": "x"}
- ]
-},
-{
- "name": "step",
- "return_type": "vec3",
- "parameter": [
-  {"type": "float", "name": "edge"},
-  {"type": "vec3", "name": "x"}
- ]
-},
-{
- "name": "step",
- "return_type": "vec4",
- "parameter": [
-  {"type": "float", "name": "edge"},
-  {"type": "vec4", "name": "x"}
- ]
-},
-{
- "name": "smoothstep",
- "return_type": "float",
- "parameter": [
-  {"type": "float", "name": "edge0"},
-  {"type": "float", "name": "edge1"},
-  {"type": "float", "name": "x"}
- ]
-},
-{
- "name": "smoothstep",
- "return_type": "vec2",
- "parameter": [
-  {"type": "vec2", "name": "edge0"},
-  {"type": "vec2", "name": "edge1"},
-  {"type": "vec2", "name": "x"}
- ]
-},
-{
- "name": "smoothstep",
- "return_type": "vec3",
- "parameter": [
-  {"type": "vec3", "name": "edge0"},
-  {"type": "vec3", "name": "edge1"},
-  {"type": "vec3", "name": "x"}
- ]
-},
-{
- "name": "smoothstep",
- "return_type": "vec4",
- "parameter": [
-  {"type": "vec4", "name": "edge0"},
-  {"type": "vec4", "name": "edge1"},
-  {"type": "vec4", "name": "x"}
- ]
-},
-{
- "name": "smoothstep",
- "return_type": "vec2",
- "parameter": [
-  {"type": "float", "name": "edge0"},
-  {"type": "float", "name": "edge1"},
-  {"type": "vec2", "name": "x"}
- ]
-},
-{
- "name": "smoothstep",
- "return_type": "vec3",
- "parameter": [
-  {"type": "float", "name": "edge0"},
-  {"type": "float", "name": "edge1"},
-  {"type": "vec3", "name": "x"}
- ]
-},
-{
- "name": "smoothstep",
- "return_type": "vec4",
- "parameter": [
-  {"type": "float", "name": "edge0"},
-  {"type": "float", "name": "edge1"},
-  {"type": "vec4", "name": "x"}
- ]
-},
-{
- "name": "length",
- "return_type": "float",
- "parameter": [
-  {"type": "float", "name": "x"}
- ]
-},
-{
- "name": "length",
- "return_type": "float",
- "parameter": [
-  {"type": "vec2", "name": "x"}
- ]
-},
-{
- "name": "length",
- "return_type": "float",
- "parameter": [
-  {"type": "vec3", "name": "x"}
- ]
-},
-{
- "name": "length",
- "return_type": "float",
- "parameter": [
-  {"type": "vec4", "name": "x"}
- ]
-},
-{
- "name": "distance",
- "return_type": "float",
- "parameter": [
-  {"type": "float", "name": "p0"},
-  {"type": "float", "name": "p1"}
- ]
-},
-{
- "name": "distance",
- "return_type": "float",
- "parameter": [
-  {"type": "vec2", "name": "p0"},
-  {"type": "vec2", "name": "p1"}
- ]
-},
-{
- "name": "distance",
- "return_type": "float",
- "parameter": [
-  {"type": "vec3", "name": "p0"},
-  {"type": "vec3", "name": "p1"}
- ]
-},
-{
- "name": "distance",
- "return_type": "float",
- "parameter": [
-  {"type": "vec4", "name": "p0"},
-  {"type": "vec4", "name": "p1"}
- ]
-},
-{
- "name": "dot",
- "return_type": "float",
- "parameter": [
-  {"type": "float", "name": "x"},
-  {"type": "float", "name": "y"}
- ]
-},
-{
- "name": "dot",
- "return_type": "float",
- "parameter": [
-  {"type": "vec2", "name": "x"},
-  {"type": "vec2", "name": "y"}
- ]
-},
-{
- "name": "dot",
- "return_type": "float",
- "parameter": [
-  {"type": "vec3", "name": "x"},
-  {"type": "vec3", "name": "y"}
- ]
-},
-{
- "name": "dot",
- "return_type": "float",
- "parameter": [
-  {"type": "vec4", "name": "x"},
-  {"type": "vec4", "name": "y"}
- ]
-},
-{
- "name": "cross",
- "return_type": "vec3",
- "parameter": [
-  {"type": "vec3", "name": "x"},
-  {"type": "vec3", "name": "y"}
- ]
-},
-{
- "name": "normalize",
- "return_type": "float",
- "parameter": [
-  {"type": "float", "name": "x"}
- ]
-},
-{
- "name": "normalize",
- "return_type": "vec2",
- "parameter": [
-  {"type": "vec2", "name": "x"}
- ]
-},
-{
- "name": "normalize",
- "return_type": "vec3",
- "parameter": [
-  {"type": "vec3", "name": "x"}
- ]
-},
-{
- "name": "normalize",
- "return_type": "vec4",
- "parameter": [
-  {"type": "vec4", "name": "x"}
- ]
-},
-{
- "name": "faceforward",
- "return_type": "float",
- "parameter": [
-  {"type": "float", "name": "N"},
-  {"type": "float", "name": "I"},
-  {"type": "float", "name": "Nref"}
- ]
-},
-{
- "name": "faceforward",
- "return_type": "vec2",
- "parameter": [
-  {"type": "vec2", "name": "N"},
-  {"type": "vec2", "name": "I"},
-  {"type": "vec2", "name": "Nref"}
- ]
-},
-{
- "name": "faceforward",
- "return_type": "vec3",
- "parameter": [
-  {"type": "vec3", "name": "N"},
-  {"type": "vec3", "name": "I"},
-  {"type": "vec3", "name": "Nref"}
- ]
-},
-{
- "name": "faceforward",
- "return_type": "vec4",
- "parameter": [
-  {"type": "vec4", "name": "N"},
-  {"type": "vec4", "name": "I"},
-  {"type": "vec4", "name": "Nref"}
- ]
-},
-{
- "name": "reflect",
- "return_type": "float",
- "parameter": [
-  {"type": "float", "name": "I"},
-  {"type": "float", "name": "N"}
- ]
-},
-{
- "name": "reflect",
- "return_type": "vec2",
- "parameter": [
-  {"type": "vec2", "name": "I"},
-  {"type": "vec2", "name": "N"}
- ]
-},
-{
- "name": "reflect",
- "return_type": "vec3",
- "parameter": [
-  {"type": "vec3", "name": "I"},
-  {"type": "vec3", "name": "N"}
- ]
-},
-{
- "name": "reflect",
- "return_type": "vec4",
- "parameter": [
-  {"type": "vec4", "name": "I"},
-  {"type": "vec4", "name": "N"}
- ]
-},
-{
- "name": "refract",
- "return_type": "float",
- "parameter": [
-  {"type": "float", "name": "I"},
-  {"type": "float", "name": "N"},
-  {"type": "float", "name": "eta"}
- ]
-},
-{
- "name": "refract",
- "return_type": "vec2",
- "parameter": [
-  {"type": "vec2", "name": "I"},
-  {"type": "vec2", "name": "N"},
-  {"type": "float", "name": "eta"}
- ]
-},
-{
- "name": "refract",
- "return_type": "vec3",
- "parameter": [
-  {"type": "vec3", "name": "I"},
-  {"type": "vec3", "name": "N"},
-  {"type": "float", "name": "eta"}
- ]
-},
-{
- "name": "refract",
- "return_type": "vec4",
- "parameter": [
-  {"type": "vec4", "name": "I"},
-  {"type": "vec4", "name": "N"},
-  {"type": "float", "name": "eta"}
- ]
-},
-{
- "name": "matrixCompMult",
- "return_type": "mat2",
- "parameter": [
-  {"type": "mat2", "name": "x"},
-  {"type": "mat2", "name": "y"}
- ]
-},
-{
- "name": "matrixCompMult",
- "return_type": "mat3",
- "parameter": [
-  {"type": "mat3", "name": "x"},
-  {"type": "mat3", "name": "y"}
- ]
-},
-{
- "name": "matrixCompMult",
- "return_type": "mat4",
- "parameter": [
-  {"type": "mat4", "name": "x"},
-  {"type": "mat4", "name": "y"}
- ]
-},
-{
- "name": "lessThan",
- "return_type": "bvec2",
- "parameter": [
-  {"type": "vec2", "name": "x"},
-  {"type": "vec2", "name": "y"}
- ]
-},
-{
- "name": "lessThan",
- "return_type": "bvec3",
- "parameter": [
-  {"type": "vec3", "name": "x"},
-  {"type": "vec3", "name": "y"}
- ]
-},
-{
- "name": "lessThan",
- "return_type": "bvec4",
- "parameter": [
-  {"type": "vec4", "name": "x"},
-  {"type": "vec4", "name": "y"}
- ]
-},
-{
- "name": "lessThan",
- "return_type": "bvec2",
- "parameter": [
-  {"type": "ivec2", "name": "x"},
-  {"type": "ivec2", "name": "y"}
- ]
-},
-{
- "name": "lessThan",
- "return_type": "bvec3",
- "parameter": [
-  {"type": "ivec3", "name": "x"},
-  {"type": "ivec3", "name": "y"}
- ]
-},
-{
- "name": "lessThan",
- "return_type": "bvec4",
- "parameter": [
-  {"type": "ivec4", "name": "x"},
-  {"type": "ivec4", "name": "y"}
- ]
-},
-{
- "name": "lessThanEqual",
- "return_type": "bvec2",
- "parameter": [
-  {"type": "vec2", "name": "x"},
-  {"type": "vec2", "name": "y"}
- ]
-},
-{
- "name": "lessThanEqual",
- "return_type": "bvec3",
- "parameter": [
-  {"type": "vec3", "name": "x"},
-  {"type": "vec3", "name": "y"}
- ]
-},
-{
- "name": "lessThanEqual",
- "return_type": "bvec4",
- "parameter": [
-  {"type": "vec4", "name": "x"},
-  {"type": "vec4", "name": "y"}
- ]
-},
-{
- "name": "lessThanEqual",
- "return_type": "bvec2",
- "parameter": [
-  {"type": "ivec2", "name": "x"},
-  {"type": "ivec2", "name": "y"}
- ]
-},
-{
- "name": "lessThanEqual",
- "return_type": "bvec3",
- "parameter": [
-  {"type": "ivec3", "name": "x"},
-  {"type": "ivec3", "name": "y"}
- ]
-},
-{
- "name": "lessThanEqual",
- "return_type": "bvec4",
- "parameter": [
-  {"type": "ivec4", "name": "x"},
-  {"type": "ivec4", "name": "y"}
- ]
-},
-{
- "name": "greaterThan",
- "return_type": "bvec2",
- "parameter": [
-  {"type": "vec2", "name": "x"},
-  {"type": "vec2", "name": "y"}
- ]
-},
-{
- "name": "greaterThan",
- "return_type": "bvec3",
- "parameter": [
-  {"type": "vec3", "name": "x"},
-  {"type": "vec3", "name": "y"}
- ]
-},
-{
- "name": "greaterThan",
- "return_type": "bvec4",
- "parameter": [
-  {"type": "vec4", "name": "x"},
-  {"type": "vec4", "name": "y"}
- ]
-},
-{
- "name": "greaterThan",
- "return_type": "bvec2",
- "parameter": [
-  {"type": "ivec2", "name": "x"},
-  {"type": "ivec2", "name": "y"}
- ]
-},
-{
- "name": "greaterThan",
- "return_type": "bvec3",
- "parameter": [
-  {"type": "ivec3", "name": "x"},
-  {"type": "ivec3", "name": "y"}
- ]
-},
-{
- "name": "greaterThan",
- "return_type": "bvec4",
- "parameter": [
-  {"type": "ivec4", "name": "x"},
-  {"type": "ivec4", "name": "y"}
- ]
-},
-{
- "name": "greaterThanEqual",
- "return_type": "bvec2",
- "parameter": [
-  {"type": "vec2", "name": "x"},
-  {"type": "vec2", "name": "y"}
- ]
-},
-{
- "name": "greaterThanEqual",
- "return_type": "bvec3",
- "parameter": [
-  {"type": "vec3", "name": "x"},
-  {"type": "vec3", "name": "y"}
- ]
-},
-{
- "name": "greaterThanEqual",
- "return_type": "bvec4",
- "parameter": [
-  {"type": "vec4", "name": "x"},
-  {"type": "vec4", "name": "y"}
- ]
-},
-{
- "name": "greaterThanEqual",
- "return_type": "bvec2",
- "parameter": [
-  {"type": "ivec2", "name": "x"},
-  {"type": "ivec2", "name": "y"}
- ]
-},
-{
- "name": "greaterThanEqual",
- "return_type": "bvec3",
- "parameter": [
-  {"type": "ivec3", "name": "x"},
-  {"type": "ivec3", "name": "y"}
- ]
-},
-{
- "name": "greaterThanEqual",
- "return_type": "bvec4",
- "parameter": [
-  {"type": "ivec4", "name": "x"},
-  {"type": "ivec4", "name": "y"}
- ]
-},
-{
- "name": "equal",
- "return_type": "bvec2",
- "parameter": [
-  {"type": "vec2", "name": "x"},
-  {"type": "vec2", "name": "y"}
- ]
-},
-{
- "name": "equal",
- "return_type": "bvec3",
- "parameter": [
-  {"type": "vec3", "name": "x"},
-  {"type": "vec3", "name": "y"}
- ]
-},
-{
- "name": "equal",
- "return_type": "bvec4",
- "parameter": [
-  {"type": "vec4", "name": "x"},
-  {"type": "vec4", "name": "y"}
- ]
-},
-{
- "name": "equal",
- "return_type": "bvec2",
- "parameter": [
-  {"type": "ivec2", "name": "x"},
-  {"type": "ivec2", "name": "y"}
- ]
-},
-{
- "name": "equal",
- "return_type": "bvec3",
- "parameter": [
-  {"type": "ivec3", "name": "x"},
-  {"type": "ivec3", "name": "y"}
- ]
-},
-{
- "name": "equal",
- "return_type": "bvec4",
- "parameter": [
-  {"type": "ivec4", "name": "x"},
-  {"type": "ivec4", "name": "y"}
- ]
-},
-{
- "name": "equal",
- "return_type": "bvec2",
- "parameter": [
-  {"type": "bvec2", "name": "x"},
-  {"type": "bvec2", "name": "y"}
- ]
-},
-{
- "name": "equal",
- "return_type": "bvec3",
- "parameter": [
-  {"type": "bvec3", "name": "x"},
-  {"type": "bvec3", "name": "y"}
- ]
-},
-{
- "name": "equal",
- "return_type": "bvec4",
- "parameter": [
-  {"type": "bvec4", "name": "x"},
-  {"type": "bvec4", "name": "y"}
- ]
-},
-{
- "name": "notEqual",
- "return_type": "bvec2",
- "parameter": [
-  {"type": "vec2", "name": "x"},
-  {"type": "vec2", "name": "y"}
- ]
-},
-{
- "name": "notEqual",
- "return_type": "bvec3",
- "parameter": [
-  {"type": "vec3", "name": "x"},
-  {"type": "vec3", "name": "y"}
- ]
-},
-{
- "name": "notEqual",
- "return_type": "bvec4",
- "parameter": [
-  {"type": "vec4", "name": "x"},
-  {"type": "vec4", "name": "y"}
- ]
-},
-{
- "name": "notEqual",
- "return_type": "bvec2",
- "parameter": [
-  {"type": "ivec2", "name": "x"},
-  {"type": "ivec2", "name": "y"}
- ]
-},
-{
- "name": "notEqual",
- "return_type": "bvec3",
- "parameter": [
-  {"type": "ivec3", "name": "x"},
-  {"type": "ivec3", "name": "y"}
- ]
-},
-{
- "name": "notEqual",
- "return_type": "bvec4",
- "parameter": [
-  {"type": "ivec4", "name": "x"},
-  {"type": "ivec4", "name": "y"}
- ]
-},
-{
- "name": "notEqual",
- "return_type": "bvec2",
- "parameter": [
-  {"type": "bvec2", "name": "x"},
-  {"type": "bvec2", "name": "y"}
- ]
-},
-{
- "name": "notEqual",
- "return_type": "bvec3",
- "parameter": [
-  {"type": "bvec3", "name": "x"},
-  {"type": "bvec3", "name": "y"}
- ]
-},
-{
- "name": "notEqual",
- "return_type": "bvec4",
- "parameter": [
-  {"type": "bvec4", "name": "x"},
-  {"type": "bvec4", "name": "y"}
- ]
-},
-{
- "name": "any",
- "return_type": "bool",
- "parameter": [
-  {"type": "bvec2", "name": "x"}
- ]
-},
-{
- "name": "any",
- "return_type": "bool",
- "parameter": [
-  {"type": "bvec3", "name": "x"}
- ]
-},
-{
- "name": "any",
- "return_type": "bool",
- "parameter": [
-  {"type": "bvec4", "name": "x"}
- ]
-},
-{
- "name": "all",
- "return_type": "bool",
- "parameter": [
-  {"type": "bvec2", "name": "x"}
- ]
-},
-{
- "name": "all",
- "return_type": "bool",
- "parameter": [
-  {"type": "bvec3", "name": "x"}
- ]
-},
-{
- "name": "all",
- "return_type": "bool",
- "parameter": [
-  {"type": "bvec4", "name": "x"}
- ]
-},
-{
- "name": "not",
- "return_type": "bvec2",
- "parameter": [
-  {"type": "bvec2", "name": "x"}
- ]
-},
-{
- "name": "not",
- "return_type": "bvec3",
- "parameter": [
-  {"type": "bvec3", "name": "x"}
- ]
-},
-{
- "name": "not",
- "return_type": "bvec4",
- "parameter": [
-  {"type": "bvec4", "name": "x"}
- ]
-},
-{
- "name": "texture2D",
- "return_type": "vec4",
- "parameter": [
-  {"type": "sampler2D", "name": "sampler"},
-  {"type": "vec2", "name": "coord"}
- ]
-},
-{
- "name": "texture2DProj",
- "return_type": "vec4",
- "parameter": [
-  {"type": "sampler2D", "name": "sampler"},
-  {"type": "vec3", "name": "coord"}
- ]
-},
-{
- "name": "texture2DProj",
- "return_type": "vec4",
- "parameter": [
-  {"type": "sampler2D", "name": "sampler"},
-  {"type": "vec4", "name": "coord"}
- ]
-},
-{
- "name": "textureCube",
- "return_type": "vec4",
- "parameter": [
-  {"type": "samplerCube", "name": "sampler"},
-  {"type": "vec3", "name": "coord"}
- ]
-},
-{
- "name": "texture2D",
- "return_type": "vec4",
- "parameter": [
-  {"type": "samplerExternalOES", "name": "sampler"},
-  {"type": "vec2", "name": "coord"}
- ],
- "condition":"resources.OES_EGL_image_external"
-},
-{
- "name": "texture2DProj",
- "return_type": "vec4",
- "parameter": [
-  {"type": "samplerExternalOES", "name": "sampler"},
-  {"type": "vec3", "name": "coord"}
- ],
- "condition":"resources.OES_EGL_image_external"
-},
-{
- "name": "texture2DProj",
- "return_type": "vec4",
- "parameter": [
-  {"type": "samplerExternalOES", "name": "sampler"},
-  {"type": "vec4", "name": "coord"}
- ],
- "condition":"resources.OES_EGL_image_external"
-},
-{
- "name": "texture2DRect",
- "return_type": "vec4",
- "parameter": [
-  {"type": "sampler2DRect", "name": "sampler"},
-  {"type": "vec2", "name": "coord"}
- ],
- "condition":"resources.ARB_texture_rectangle"
-},
-{
- "name": "texture2DRectProj",
- "return_type": "vec4",
- "parameter": [
-  {"type": "sampler2DRect", "name": "sampler"},
-  {"type": "vec3", "name": "coord"}
- ],
- "condition":"resources.ARB_texture_rectangle"
-},
-{
- "name": "texture2DRectProj",
- "return_type": "vec4",
- "parameter": [
-  {"type": "sampler2DRect", "name": "sampler"},
-  {"type": "vec4", "name": "coord"}
- ],
- "condition":"resources.ARB_texture_rectangle"
-}
+ {
+  "name": "radians",
+  "return_type": "float",
+  "parameter": [
+   {"type": "float", "name": "degrees"}
+  ]
+ },
+ {
+  "name": "radians",
+  "return_type": "vec2",
+  "parameter": [
+   {"type": "vec2", "name": "degrees"}
+  ]
+ },
+ {
+  "name": "radians",
+  "return_type": "vec3",
+  "parameter": [
+   {"type": "vec3", "name": "degrees"}
+  ]
+ },
+ {
+  "name": "radians",
+  "return_type": "vec4",
+  "parameter": [
+   {"type": "vec4", "name": "degrees"}
+  ]
+ },
+ {
+  "name": "degrees",
+  "return_type": "float",
+  "parameter": [
+   {"type": "float", "name": "radians"}
+  ]
+ },
+ {
+  "name": "degrees",
+  "return_type": "vec2",
+  "parameter": [
+   {"type": "vec2", "name": "radians"}
+  ]
+ },
+ {
+  "name": "degrees",
+  "return_type": "vec3",
+  "parameter": [
+   {"type": "vec3", "name": "radians"}
+  ]
+ },
+ {
+  "name": "degrees",
+  "return_type": "vec4",
+  "parameter": [
+   {"type": "vec4", "name": "radians"}
+  ]
+ },
+ {
+  "name": "sin",
+  "return_type": "float",
+  "parameter": [
+   {"type": "float", "name": "angle"}
+  ]
+ },
+ {
+  "name": "sin",
+  "return_type": "vec2",
+  "parameter": [
+   {"type": "vec2", "name": "angle"}
+  ]
+ },
+ {
+  "name": "sin",
+  "return_type": "vec3",
+  "parameter": [
+   {"type": "vec3", "name": "angle"}
+  ]
+ },
+ {
+  "name": "sin",
+  "return_type": "vec4",
+  "parameter": [
+   {"type": "vec4", "name": "angle"}
+  ]
+ },
+ {
+  "name": "cos",
+  "return_type": "float",
+  "parameter": [
+   {"type": "float", "name": "angle"}
+  ]
+ },
+ {
+  "name": "cos",
+  "return_type": "vec2",
+  "parameter": [
+   {"type": "vec2", "name": "angle"}
+  ]
+ },
+ {
+  "name": "cos",
+  "return_type": "vec3",
+  "parameter": [
+   {"type": "vec3", "name": "angle"}
+  ]
+ },
+ {
+  "name": "cos",
+  "return_type": "vec4",
+  "parameter": [
+   {"type": "vec4", "name": "angle"}
+  ]
+ },
+ {
+  "name": "tan",
+  "return_type": "float",
+  "parameter": [
+   {"type": "float", "name": "angle"}
+  ]
+ },
+ {
+  "name": "tan",
+  "return_type": "vec2",
+  "parameter": [
+   {"type": "vec2", "name": "angle"}
+  ]
+ },
+ {
+  "name": "tan",
+  "return_type": "vec3",
+  "parameter": [
+   {"type": "vec3", "name": "angle"}
+  ]
+ },
+ {
+  "name": "tan",
+  "return_type": "vec4",
+  "parameter": [
+   {"type": "vec4", "name": "angle"}
+  ]
+ },
+ {
+  "name": "asin",
+  "return_type": "float",
+  "parameter": [
+   {"type": "float", "name": "x"}
+  ]
+ },
+ {
+  "name": "asin",
+  "return_type": "vec2",
+  "parameter": [
+   {"type": "vec2", "name": "x"}
+  ]
+ },
+ {
+  "name": "asin",
+  "return_type": "vec3",
+  "parameter": [
+   {"type": "vec3", "name": "x"}
+  ]
+ },
+ {
+  "name": "asin",
+  "return_type": "vec4",
+  "parameter": [
+   {"type": "vec4", "name": "x"}
+  ]
+ },
+ {
+  "name": "acos",
+  "return_type": "float",
+  "parameter": [
+   {"type": "float", "name": "x"}
+  ]
+ },
+ {
+  "name": "acos",
+  "return_type": "vec2",
+  "parameter": [
+   {"type": "vec2", "name": "x"}
+  ]
+ },
+ {
+  "name": "acos",
+  "return_type": "vec3",
+  "parameter": [
+   {"type": "vec3", "name": "x"}
+  ]
+ },
+ {
+  "name": "acos",
+  "return_type": "vec4",
+  "parameter": [
+   {"type": "vec4", "name": "x"}
+  ]
+ },
+ {
+  "name": "atan",
+  "return_type": "float",
+  "parameter": [
+   {"type": "float", "name": "y"},
+   {"type": "float", "name": "x"}
+  ]
+ },
+ {
+  "name": "atan",
+  "return_type": "vec2",
+  "parameter": [
+   {"type": "vec2", "name": "y"},
+   {"type": "vec2", "name": "x"}
+  ]
+ },
+ {
+  "name": "atan",
+  "return_type": "vec3",
+  "parameter": [
+   {"type": "vec3", "name": "y"},
+   {"type": "vec3", "name": "x"}
+  ]
+ },
+ {
+  "name": "atan",
+  "return_type": "vec4",
+  "parameter": [
+   {"type": "vec4", "name": "y"},
+   {"type": "vec4", "name": "x"}
+  ]
+ },
+ {
+  "name": "atan",
+  "return_type": "float",
+  "parameter": [
+   {"type": "float", "name": "y_over_x"}
+  ]
+ },
+ {
+  "name": "atan",
+  "return_type": "vec2",
+  "parameter": [
+   {"type": "vec2", "name": "y_over_x"}
+  ]
+ },
+ {
+  "name": "atan",
+  "return_type": "vec3",
+  "parameter": [
+   {"type": "vec3", "name": "y_over_x"}
+  ]
+ },
+ {
+  "name": "atan",
+  "return_type": "vec4",
+  "parameter": [
+   {"type": "vec4", "name": "y_over_x"}
+  ]
+ },
+ {
+  "name": "pow",
+  "return_type": "float",
+  "parameter": [
+   {"type": "float", "name": "x"},
+   {"type": "float", "name": "y"}
+  ]
+ },
+ {
+  "name": "pow",
+  "return_type": "vec2",
+  "parameter": [
+   {"type": "vec2", "name": "x"},
+   {"type": "vec2", "name": "y"}
+  ]
+ },
+ {
+  "name": "pow",
+  "return_type": "vec3",
+  "parameter": [
+   {"type": "vec3", "name": "x"},
+   {"type": "vec3", "name": "y"}
+  ]
+ },
+ {
+  "name": "pow",
+  "return_type": "vec4",
+  "parameter": [
+   {"type": "vec4", "name": "x"},
+   {"type": "vec4", "name": "y"}
+  ]
+ },
+ {
+  "name": "exp",
+  "return_type": "float",
+  "parameter": [
+   {"type": "float", "name": "x"}
+  ]
+ },
+ {
+  "name": "exp",
+  "return_type": "vec2",
+  "parameter": [
+   {"type": "vec2", "name": "x"}
+  ]
+ },
+ {
+  "name": "exp",
+  "return_type": "vec3",
+  "parameter": [
+   {"type": "vec3", "name": "x"}
+  ]
+ },
+ {
+  "name": "exp",
+  "return_type": "vec4",
+  "parameter": [
+   {"type": "vec4", "name": "x"}
+  ]
+ },
+ {
+  "name": "log",
+  "return_type": "float",
+  "parameter": [
+   {"type": "float", "name": "x"}
+  ]
+ },
+ {
+  "name": "log",
+  "return_type": "vec2",
+  "parameter": [
+   {"type": "vec2", "name": "x"}
+  ]
+ },
+ {
+  "name": "log",
+  "return_type": "vec3",
+  "parameter": [
+   {"type": "vec3", "name": "x"}
+  ]
+ },
+ {
+  "name": "log",
+  "return_type": "vec4",
+  "parameter": [
+   {"type": "vec4", "name": "x"}
+  ]
+ },
+ {
+  "name": "exp2",
+  "return_type": "float",
+  "parameter": [
+   {"type": "float", "name": "x"}
+  ]
+ },
+ {
+  "name": "exp2",
+  "return_type": "vec2",
+  "parameter": [
+   {"type": "vec2", "name": "x"}
+  ]
+ },
+ {
+  "name": "exp2",
+  "return_type": "vec3",
+  "parameter": [
+   {"type": "vec3", "name": "x"}
+  ]
+ },
+ {
+  "name": "exp2",
+  "return_type": "vec4",
+  "parameter": [
+   {"type": "vec4", "name": "x"}
+  ]
+ },
+ {
+  "name": "log2",
+  "return_type": "float",
+  "parameter": [
+   {"type": "float", "name": "x"}
+  ]
+ },
+ {
+  "name": "log2",
+  "return_type": "vec2",
+  "parameter": [
+   {"type": "vec2", "name": "x"}
+  ]
+ },
+ {
+  "name": "log2",
+  "return_type": "vec3",
+  "parameter": [
+   {"type": "vec3", "name": "x"}
+  ]
+ },
+ {
+  "name": "log2",
+  "return_type": "vec4",
+  "parameter": [
+   {"type": "vec4", "name": "x"}
+  ]
+ },
+ {
+  "name": "sqrt",
+  "return_type": "float",
+  "parameter": [
+   {"type": "float", "name": "x"}
+  ]
+ },
+ {
+  "name": "sqrt",
+  "return_type": "vec2",
+  "parameter": [
+   {"type": "vec2", "name": "x"}
+  ]
+ },
+ {
+  "name": "sqrt",
+  "return_type": "vec3",
+  "parameter": [
+   {"type": "vec3", "name": "x"}
+  ]
+ },
+ {
+  "name": "sqrt",
+  "return_type": "vec4",
+  "parameter": [
+   {"type": "vec4", "name": "x"}
+  ]
+ },
+ {
+  "name": "inversesqrt",
+  "return_type": "float",
+  "parameter": [
+   {"type": "float", "name": "x"}
+  ]
+ },
+ {
+  "name": "inversesqrt",
+  "return_type": "vec2",
+  "parameter": [
+   {"type": "vec2", "name": "x"}
+  ]
+ },
+ {
+  "name": "inversesqrt",
+  "return_type": "vec3",
+  "parameter": [
+   {"type": "vec3", "name": "x"}
+  ]
+ },
+ {
+  "name": "inversesqrt",
+  "return_type": "vec4",
+  "parameter": [
+   {"type": "vec4", "name": "x"}
+  ]
+ },
+ {
+  "name": "abs",
+  "return_type": "float",
+  "parameter": [
+   {"type": "float", "name": "x"}
+  ]
+ },
+ {
+  "name": "abs",
+  "return_type": "vec2",
+  "parameter": [
+   {"type": "vec2", "name": "x"}
+  ]
+ },
+ {
+  "name": "abs",
+  "return_type": "vec3",
+  "parameter": [
+   {"type": "vec3", "name": "x"}
+  ]
+ },
+ {
+  "name": "abs",
+  "return_type": "vec4",
+  "parameter": [
+   {"type": "vec4", "name": "x"}
+  ]
+ },
+ {
+  "name": "sign",
+  "return_type": "float",
+  "parameter": [
+   {"type": "float", "name": "x"}
+  ]
+ },
+ {
+  "name": "sign",
+  "return_type": "vec2",
+  "parameter": [
+   {"type": "vec2", "name": "x"}
+  ]
+ },
+ {
+  "name": "sign",
+  "return_type": "vec3",
+  "parameter": [
+   {"type": "vec3", "name": "x"}
+  ]
+ },
+ {
+  "name": "sign",
+  "return_type": "vec4",
+  "parameter": [
+   {"type": "vec4", "name": "x"}
+  ]
+ },
+ {
+  "name": "floor",
+  "return_type": "float",
+  "parameter": [
+   {"type": "float", "name": "x"}
+  ]
+ },
+ {
+  "name": "floor",
+  "return_type": "vec2",
+  "parameter": [
+   {"type": "vec2", "name": "x"}
+  ]
+ },
+ {
+  "name": "floor",
+  "return_type": "vec3",
+  "parameter": [
+   {"type": "vec3", "name": "x"}
+  ]
+ },
+ {
+  "name": "floor",
+  "return_type": "vec4",
+  "parameter": [
+   {"type": "vec4", "name": "x"}
+  ]
+ },
+ {
+  "name": "ceil",
+  "return_type": "float",
+  "parameter": [
+   {"type": "float", "name": "x"}
+  ]
+ },
+ {
+  "name": "ceil",
+  "return_type": "vec2",
+  "parameter": [
+   {"type": "vec2", "name": "x"}
+  ]
+ },
+ {
+  "name": "ceil",
+  "return_type": "vec3",
+  "parameter": [
+   {"type": "vec3", "name": "x"}
+  ]
+ },
+ {
+  "name": "ceil",
+  "return_type": "vec4",
+  "parameter": [
+   {"type": "vec4", "name": "x"}
+  ]
+ },
+ {
+  "name": "fract",
+  "return_type": "float",
+  "parameter": [
+   {"type": "float", "name": "x"}
+  ]
+ },
+ {
+  "name": "fract",
+  "return_type": "vec2",
+  "parameter": [
+   {"type": "vec2", "name": "x"}
+  ]
+ },
+ {
+  "name": "fract",
+  "return_type": "vec3",
+  "parameter": [
+   {"type": "vec3", "name": "x"}
+  ]
+ },
+ {
+  "name": "fract",
+  "return_type": "vec4",
+  "parameter": [
+   {"type": "vec4", "name": "x"}
+  ]
+ },
+ {
+  "name": "mod",
+  "return_type": "float",
+  "parameter": [
+   {"type": "float", "name": "x"},
+   {"type": "float", "name": "y"}
+  ]
+ },
+ {
+  "name": "mod",
+  "return_type": "vec2",
+  "parameter": [
+   {"type": "vec2", "name": "x"},
+   {"type": "float", "name": "y"}
+  ]
+ },
+ {
+  "name": "mod",
+  "return_type": "vec3",
+  "parameter": [
+   {"type": "vec3", "name": "x"},
+   {"type": "float", "name": "y"}
+  ]
+ },
+ {
+  "name": "mod",
+  "return_type": "vec4",
+  "parameter": [
+   {"type": "vec4", "name": "x"},
+   {"type": "float", "name": "y"}
+  ]
+ },
+ {
+  "name": "mod",
+  "return_type": "vec2",
+  "parameter": [
+   {"type": "vec2", "name": "x"},
+   {"type": "vec2", "name": "y"}
+  ]
+ },
+ {
+  "name": "mod",
+  "return_type": "vec3",
+  "parameter": [
+   {"type": "vec3", "name": "x"},
+   {"type": "vec3", "name": "y"}
+  ]
+ },
+ {
+  "name": "mod",
+  "return_type": "vec4",
+  "parameter": [
+   {"type": "vec4", "name": "x"},
+   {"type": "vec4", "name": "y"}
+  ]
+ },
+ {
+  "name": "min",
+  "return_type": "float",
+  "parameter": [
+   {"type": "float", "name": "x"},
+   {"type": "float", "name": "y"}
+  ]
+ },
+ {
+  "name": "min",
+  "return_type": "vec2",
+  "parameter": [
+   {"type": "vec2", "name": "x"},
+   {"type": "float", "name": "y"}
+  ]
+ },
+ {
+  "name": "min",
+  "return_type": "vec3",
+  "parameter": [
+   {"type": "vec3", "name": "x"},
+   {"type": "float", "name": "y"}
+  ]
+ },
+ {
+  "name": "min",
+  "return_type": "vec4",
+  "parameter": [
+   {"type": "vec4", "name": "x"},
+   {"type": "float", "name": "y"}
+  ]
+ },
+ {
+  "name": "min",
+  "return_type": "vec2",
+  "parameter": [
+   {"type": "vec2", "name": "x"},
+   {"type": "vec2", "name": "y"}
+  ]
+ },
+ {
+  "name": "min",
+  "return_type": "vec3",
+  "parameter": [
+   {"type": "vec3", "name": "x"},
+   {"type": "vec3", "name": "y"}
+  ]
+ },
+ {
+  "name": "min",
+  "return_type": "vec4",
+  "parameter": [
+   {"type": "vec4", "name": "x"},
+   {"type": "vec4", "name": "y"}
+  ]
+ },
+ {
+  "name": "max",
+  "return_type": "float",
+  "parameter": [
+   {"type": "float", "name": "x"},
+   {"type": "float", "name": "y"}
+  ]
+ },
+ {
+  "name": "max",
+  "return_type": "vec2",
+  "parameter": [
+   {"type": "vec2", "name": "x"},
+   {"type": "float", "name": "y"}
+  ]
+ },
+ {
+  "name": "max",
+  "return_type": "vec3",
+  "parameter": [
+   {"type": "vec3", "name": "x"},
+   {"type": "float", "name": "y"}
+  ]
+ },
+ {
+  "name": "max",
+  "return_type": "vec4",
+  "parameter": [
+   {"type": "vec4", "name": "x"},
+   {"type": "float", "name": "y"}
+  ]
+ },
+ {
+  "name": "max",
+  "return_type": "vec2",
+  "parameter": [
+   {"type": "vec2", "name": "x"},
+   {"type": "vec2", "name": "y"}
+  ]
+ },
+ {
+  "name": "max",
+  "return_type": "vec3",
+  "parameter": [
+   {"type": "vec3", "name": "x"},
+   {"type": "vec3", "name": "y"}
+  ]
+ },
+ {
+  "name": "max",
+  "return_type": "vec4",
+  "parameter": [
+   {"type": "vec4", "name": "x"},
+   {"type": "vec4", "name": "y"}
+  ]
+ },
+ {
+  "name": "clamp",
+  "return_type": "float",
+  "parameter": [
+   {"type": "float", "name": "x"},
+   {"type": "float", "name": "minVal"},
+   {"type": "float", "name": "maxVal"}
+  ]
+ },
+ {
+  "name": "clamp",
+  "return_type": "vec2",
+  "parameter": [
+   {"type": "vec2", "name": "x"},
+   {"type": "float", "name": "minVal"},
+   {"type": "float", "name": "maxVal"}
+  ]
+ },
+ {
+  "name": "clamp",
+  "return_type": "vec3",
+  "parameter": [
+   {"type": "vec3", "name": "x"},
+   {"type": "float", "name": "minVal"},
+   {"type": "float", "name": "maxVal"}
+  ]
+ },
+ {
+  "name": "clamp",
+  "return_type": "vec4",
+  "parameter": [
+   {"type": "vec4", "name": "x"},
+   {"type": "float", "name": "minVal"},
+   {"type": "float", "name": "maxVal"}
+  ]
+ },
+ {
+  "name": "clamp",
+  "return_type": "vec2",
+  "parameter": [
+   {"type": "vec2", "name": "x"},
+   {"type": "vec2", "name": "minVal"},
+   {"type": "vec2", "name": "maxVal"}
+  ]
+ },
+ {
+  "name": "clamp",
+  "return_type": "vec3",
+  "parameter": [
+   {"type": "vec3", "name": "x"},
+   {"type": "vec3", "name": "minVal"},
+   {"type": "vec3", "name": "maxVal"}
+  ]
+ },
+ {
+  "name": "clamp",
+  "return_type": "vec4",
+  "parameter": [
+   {"type": "vec4", "name": "x"},
+   {"type": "vec4", "name": "minVal"},
+   {"type": "vec4", "name": "maxVal"}
+  ]
+ },
+ {
+  "name": "mix",
+  "return_type": "float",
+  "parameter": [
+   {"type": "float", "name": "x"},
+   {"type": "float", "name": "y"},
+   {"type": "float", "name": "a"}
+  ]
+ },
+ {
+  "name": "mix",
+  "return_type": "vec2",
+  "parameter": [
+   {"type": "vec2", "name": "x"},
+   {"type": "vec2", "name": "y"},
+   {"type": "float", "name": "a"}
+  ]
+ },
+ {
+  "name": "mix",
+  "return_type": "vec3",
+  "parameter": [
+   {"type": "vec3", "name": "x"},
+   {"type": "vec3", "name": "y"},
+   {"type": "float", "name": "a"}
+  ]
+ },
+ {
+  "name": "mix",
+  "return_type": "vec4",
+  "parameter": [
+   {"type": "vec4", "name": "x"},
+   {"type": "vec4", "name": "y"},
+   {"type": "float", "name": "a"}
+  ]
+ },
+ {
+  "name": "mix",
+  "return_type": "vec2",
+  "parameter": [
+   {"type": "vec2", "name": "x"},
+   {"type": "vec2", "name": "y"},
+   {"type": "vec2", "name": "a"}
+  ]
+ },
+ {
+  "name": "mix",
+  "return_type": "vec3",
+  "parameter": [
+   {"type": "vec3", "name": "x"},
+   {"type": "vec3", "name": "y"},
+   {"type": "vec3", "name": "a"}
+  ]
+ },
+ {
+  "name": "mix",
+  "return_type": "vec4",
+  "parameter": [
+   {"type": "vec4", "name": "x"},
+   {"type": "vec4", "name": "y"},
+   {"type": "vec4", "name": "a"}
+  ]
+ },
+ {
+  "name": "step",
+  "return_type": "float",
+  "parameter": [
+   {"type": "float", "name": "edge"},
+   {"type": "float", "name": "x"}
+  ]
+ },
+ {
+  "name": "step",
+  "return_type": "vec2",
+  "parameter": [
+   {"type": "vec2", "name": "edge"},
+   {"type": "vec2", "name": "x"}
+  ]
+ },
+ {
+  "name": "step",
+  "return_type": "vec3",
+  "parameter": [
+   {"type": "vec3", "name": "edge"},
+   {"type": "vec3", "name": "x"}
+  ]
+ },
+ {
+  "name": "step",
+  "return_type": "vec4",
+  "parameter": [
+   {"type": "vec4", "name": "edge"},
+   {"type": "vec4", "name": "x"}
+  ]
+ },
+ {
+  "name": "step",
+  "return_type": "vec2",
+  "parameter": [
+   {"type": "float", "name": "edge"},
+   {"type": "vec2", "name": "x"}
+  ]
+ },
+ {
+  "name": "step",
+  "return_type": "vec3",
+  "parameter": [
+   {"type": "float", "name": "edge"},
+   {"type": "vec3", "name": "x"}
+  ]
+ },
+ {
+  "name": "step",
+  "return_type": "vec4",
+  "parameter": [
+   {"type": "float", "name": "edge"},
+   {"type": "vec4", "name": "x"}
+  ]
+ },
+ {
+  "name": "smoothstep",
+  "return_type": "float",
+  "parameter": [
+   {"type": "float", "name": "edge0"},
+   {"type": "float", "name": "edge1"},
+   {"type": "float", "name": "x"}
+  ]
+ },
+ {
+  "name": "smoothstep",
+  "return_type": "vec2",
+  "parameter": [
+   {"type": "vec2", "name": "edge0"},
+   {"type": "vec2", "name": "edge1"},
+   {"type": "vec2", "name": "x"}
+  ]
+ },
+ {
+  "name": "smoothstep",
+  "return_type": "vec3",
+  "parameter": [
+   {"type": "vec3", "name": "edge0"},
+   {"type": "vec3", "name": "edge1"},
+   {"type": "vec3", "name": "x"}
+  ]
+ },
+ {
+  "name": "smoothstep",
+  "return_type": "vec4",
+  "parameter": [
+   {"type": "vec4", "name": "edge0"},
+   {"type": "vec4", "name": "edge1"},
+   {"type": "vec4", "name": "x"}
+  ]
+ },
+ {
+  "name": "smoothstep",
+  "return_type": "vec2",
+  "parameter": [
+   {"type": "float", "name": "edge0"},
+   {"type": "float", "name": "edge1"},
+   {"type": "vec2", "name": "x"}
+  ]
+ },
+ {
+  "name": "smoothstep",
+  "return_type": "vec3",
+  "parameter": [
+   {"type": "float", "name": "edge0"},
+   {"type": "float", "name": "edge1"},
+   {"type": "vec3", "name": "x"}
+  ]
+ },
+ {
+  "name": "smoothstep",
+  "return_type": "vec4",
+  "parameter": [
+   {"type": "float", "name": "edge0"},
+   {"type": "float", "name": "edge1"},
+   {"type": "vec4", "name": "x"}
+  ]
+ },
+ {
+  "name": "length",
+  "return_type": "float",
+  "parameter": [
+   {"type": "float", "name": "x"}
+  ]
+ },
+ {
+  "name": "length",
+  "return_type": "float",
+  "parameter": [
+   {"type": "vec2", "name": "x"}
+  ]
+ },
+ {
+  "name": "length",
+  "return_type": "float",
+  "parameter": [
+   {"type": "vec3", "name": "x"}
+  ]
+ },
+ {
+  "name": "length",
+  "return_type": "float",
+  "parameter": [
+   {"type": "vec4", "name": "x"}
+  ]
+ },
+ {
+  "name": "distance",
+  "return_type": "float",
+  "parameter": [
+   {"type": "float", "name": "p0"},
+   {"type": "float", "name": "p1"}
+  ]
+ },
+ {
+  "name": "distance",
+  "return_type": "float",
+  "parameter": [
+   {"type": "vec2", "name": "p0"},
+   {"type": "vec2", "name": "p1"}
+  ]
+ },
+ {
+  "name": "distance",
+  "return_type": "float",
+  "parameter": [
+   {"type": "vec3", "name": "p0"},
+   {"type": "vec3", "name": "p1"}
+  ]
+ },
+ {
+  "name": "distance",
+  "return_type": "float",
+  "parameter": [
+   {"type": "vec4", "name": "p0"},
+   {"type": "vec4", "name": "p1"}
+  ]
+ },
+ {
+  "name": "dot",
+  "return_type": "float",
+  "parameter": [
+   {"type": "float", "name": "x"},
+   {"type": "float", "name": "y"}
+  ]
+ },
+ {
+  "name": "dot",
+  "return_type": "float",
+  "parameter": [
+   {"type": "vec2", "name": "x"},
+   {"type": "vec2", "name": "y"}
+  ]
+ },
+ {
+  "name": "dot",
+  "return_type": "float",
+  "parameter": [
+   {"type": "vec3", "name": "x"},
+   {"type": "vec3", "name": "y"}
+  ]
+ },
+ {
+  "name": "dot",
+  "return_type": "float",
+  "parameter": [
+   {"type": "vec4", "name": "x"},
+   {"type": "vec4", "name": "y"}
+  ]
+ },
+ {
+  "name": "cross",
+  "return_type": "vec3",
+  "parameter": [
+   {"type": "vec3", "name": "x"},
+   {"type": "vec3", "name": "y"}
+  ]
+ },
+ {
+  "name": "normalize",
+  "return_type": "float",
+  "parameter": [
+   {"type": "float", "name": "x"}
+  ]
+ },
+ {
+  "name": "normalize",
+  "return_type": "vec2",
+  "parameter": [
+   {"type": "vec2", "name": "x"}
+  ]
+ },
+ {
+  "name": "normalize",
+  "return_type": "vec3",
+  "parameter": [
+   {"type": "vec3", "name": "x"}
+  ]
+ },
+ {
+  "name": "normalize",
+  "return_type": "vec4",
+  "parameter": [
+   {"type": "vec4", "name": "x"}
+  ]
+ },
+ {
+  "name": "faceforward",
+  "return_type": "float",
+  "parameter": [
+   {"type": "float", "name": "N"},
+   {"type": "float", "name": "I"},
+   {"type": "float", "name": "Nref"}
+  ]
+ },
+ {
+  "name": "faceforward",
+  "return_type": "vec2",
+  "parameter": [
+   {"type": "vec2", "name": "N"},
+   {"type": "vec2", "name": "I"},
+   {"type": "vec2", "name": "Nref"}
+  ]
+ },
+ {
+  "name": "faceforward",
+  "return_type": "vec3",
+  "parameter": [
+   {"type": "vec3", "name": "N"},
+   {"type": "vec3", "name": "I"},
+   {"type": "vec3", "name": "Nref"}
+  ]
+ },
+ {
+  "name": "faceforward",
+  "return_type": "vec4",
+  "parameter": [
+   {"type": "vec4", "name": "N"},
+   {"type": "vec4", "name": "I"},
+   {"type": "vec4", "name": "Nref"}
+  ]
+ },
+ {
+  "name": "reflect",
+  "return_type": "float",
+  "parameter": [
+   {"type": "float", "name": "I"},
+   {"type": "float", "name": "N"}
+  ]
+ },
+ {
+  "name": "reflect",
+  "return_type": "vec2",
+  "parameter": [
+   {"type": "vec2", "name": "I"},
+   {"type": "vec2", "name": "N"}
+  ]
+ },
+ {
+  "name": "reflect",
+  "return_type": "vec3",
+  "parameter": [
+   {"type": "vec3", "name": "I"},
+   {"type": "vec3", "name": "N"}
+  ]
+ },
+ {
+  "name": "reflect",
+  "return_type": "vec4",
+  "parameter": [
+   {"type": "vec4", "name": "I"},
+   {"type": "vec4", "name": "N"}
+  ]
+ },
+ {
+  "name": "refract",
+  "return_type": "float",
+  "parameter": [
+   {"type": "float", "name": "I"},
+   {"type": "float", "name": "N"},
+   {"type": "float", "name": "eta"}
+  ]
+ },
+ {
+  "name": "refract",
+  "return_type": "vec2",
+  "parameter": [
+   {"type": "vec2", "name": "I"},
+   {"type": "vec2", "name": "N"},
+   {"type": "float", "name": "eta"}
+  ]
+ },
+ {
+  "name": "refract",
+  "return_type": "vec3",
+  "parameter": [
+   {"type": "vec3", "name": "I"},
+   {"type": "vec3", "name": "N"},
+   {"type": "float", "name": "eta"}
+  ]
+ },
+ {
+  "name": "refract",
+  "return_type": "vec4",
+  "parameter": [
+   {"type": "vec4", "name": "I"},
+   {"type": "vec4", "name": "N"},
+   {"type": "float", "name": "eta"}
+  ]
+ },
+ {
+  "name": "matrixCompMult",
+  "return_type": "mat2",
+  "parameter": [
+   {"type": "mat2", "name": "x"},
+   {"type": "mat2", "name": "y"}
+  ]
+ },
+ {
+  "name": "matrixCompMult",
+  "return_type": "mat3",
+  "parameter": [
+   {"type": "mat3", "name": "x"},
+   {"type": "mat3", "name": "y"}
+  ]
+ },
+ {
+  "name": "matrixCompMult",
+  "return_type": "mat4",
+  "parameter": [
+   {"type": "mat4", "name": "x"},
+   {"type": "mat4", "name": "y"}
+  ]
+ },
+ {
+  "name": "lessThan",
+  "return_type": "bvec2",
+  "parameter": [
+   {"type": "vec2", "name": "x"},
+   {"type": "vec2", "name": "y"}
+  ]
+ },
+ {
+  "name": "lessThan",
+  "return_type": "bvec3",
+  "parameter": [
+   {"type": "vec3", "name": "x"},
+   {"type": "vec3", "name": "y"}
+  ]
+ },
+ {
+  "name": "lessThan",
+  "return_type": "bvec4",
+  "parameter": [
+   {"type": "vec4", "name": "x"},
+   {"type": "vec4", "name": "y"}
+  ]
+ },
+ {
+  "name": "lessThan",
+  "return_type": "bvec2",
+  "parameter": [
+   {"type": "ivec2", "name": "x"},
+   {"type": "ivec2", "name": "y"}
+  ]
+ },
+ {
+  "name": "lessThan",
+  "return_type": "bvec3",
+  "parameter": [
+   {"type": "ivec3", "name": "x"},
+   {"type": "ivec3", "name": "y"}
+  ]
+ },
+ {
+  "name": "lessThan",
+  "return_type": "bvec4",
+  "parameter": [
+   {"type": "ivec4", "name": "x"},
+   {"type": "ivec4", "name": "y"}
+  ]
+ },
+ {
+  "name": "lessThanEqual",
+  "return_type": "bvec2",
+  "parameter": [
+   {"type": "vec2", "name": "x"},
+   {"type": "vec2", "name": "y"}
+  ]
+ },
+ {
+  "name": "lessThanEqual",
+  "return_type": "bvec3",
+  "parameter": [
+   {"type": "vec3", "name": "x"},
+   {"type": "vec3", "name": "y"}
+  ]
+ },
+ {
+  "name": "lessThanEqual",
+  "return_type": "bvec4",
+  "parameter": [
+   {"type": "vec4", "name": "x"},
+   {"type": "vec4", "name": "y"}
+  ]
+ },
+ {
+  "name": "lessThanEqual",
+  "return_type": "bvec2",
+  "parameter": [
+   {"type": "ivec2", "name": "x"},
+   {"type": "ivec2", "name": "y"}
+  ]
+ },
+ {
+  "name": "lessThanEqual",
+  "return_type": "bvec3",
+  "parameter": [
+   {"type": "ivec3", "name": "x"},
+   {"type": "ivec3", "name": "y"}
+  ]
+ },
+ {
+  "name": "lessThanEqual",
+  "return_type": "bvec4",
+  "parameter": [
+   {"type": "ivec4", "name": "x"},
+   {"type": "ivec4", "name": "y"}
+  ]
+ },
+ {
+  "name": "greaterThan",
+  "return_type": "bvec2",
+  "parameter": [
+   {"type": "vec2", "name": "x"},
+   {"type": "vec2", "name": "y"}
+  ]
+ },
+ {
+  "name": "greaterThan",
+  "return_type": "bvec3",
+  "parameter": [
+   {"type": "vec3", "name": "x"},
+   {"type": "vec3", "name": "y"}
+  ]
+ },
+ {
+  "name": "greaterThan",
+  "return_type": "bvec4",
+  "parameter": [
+   {"type": "vec4", "name": "x"},
+   {"type": "vec4", "name": "y"}
+  ]
+ },
+ {
+  "name": "greaterThan",
+  "return_type": "bvec2",
+  "parameter": [
+   {"type": "ivec2", "name": "x"},
+   {"type": "ivec2", "name": "y"}
+  ]
+ },
+ {
+  "name": "greaterThan",
+  "return_type": "bvec3",
+  "parameter": [
+   {"type": "ivec3", "name": "x"},
+   {"type": "ivec3", "name": "y"}
+  ]
+ },
+ {
+  "name": "greaterThan",
+  "return_type": "bvec4",
+  "parameter": [
+   {"type": "ivec4", "name": "x"},
+   {"type": "ivec4", "name": "y"}
+  ]
+ },
+ {
+  "name": "greaterThanEqual",
+  "return_type": "bvec2",
+  "parameter": [
+   {"type": "vec2", "name": "x"},
+   {"type": "vec2", "name": "y"}
+  ]
+ },
+ {
+  "name": "greaterThanEqual",
+  "return_type": "bvec3",
+  "parameter": [
+   {"type": "vec3", "name": "x"},
+   {"type": "vec3", "name": "y"}
+  ]
+ },
+ {
+  "name": "greaterThanEqual",
+  "return_type": "bvec4",
+  "parameter": [
+   {"type": "vec4", "name": "x"},
+   {"type": "vec4", "name": "y"}
+  ]
+ },
+ {
+  "name": "greaterThanEqual",
+  "return_type": "bvec2",
+  "parameter": [
+   {"type": "ivec2", "name": "x"},
+   {"type": "ivec2", "name": "y"}
+  ]
+ },
+ {
+  "name": "greaterThanEqual",
+  "return_type": "bvec3",
+  "parameter": [
+   {"type": "ivec3", "name": "x"},
+   {"type": "ivec3", "name": "y"}
+  ]
+ },
+ {
+  "name": "greaterThanEqual",
+  "return_type": "bvec4",
+  "parameter": [
+   {"type": "ivec4", "name": "x"},
+   {"type": "ivec4", "name": "y"}
+  ]
+ },
+ {
+  "name": "equal",
+  "return_type": "bvec2",
+  "parameter": [
+   {"type": "vec2", "name": "x"},
+   {"type": "vec2", "name": "y"}
+  ]
+ },
+ {
+  "name": "equal",
+  "return_type": "bvec3",
+  "parameter": [
+   {"type": "vec3", "name": "x"},
+   {"type": "vec3", "name": "y"}
+  ]
+ },
+ {
+  "name": "equal",
+  "return_type": "bvec4",
+  "parameter": [
+   {"type": "vec4", "name": "x"},
+   {"type": "vec4", "name": "y"}
+  ]
+ },
+ {
+  "name": "equal",
+  "return_type": "bvec2",
+  "parameter": [
+   {"type": "ivec2", "name": "x"},
+   {"type": "ivec2", "name": "y"}
+  ]
+ },
+ {
+  "name": "equal",
+  "return_type": "bvec3",
+  "parameter": [
+   {"type": "ivec3", "name": "x"},
+   {"type": "ivec3", "name": "y"}
+  ]
+ },
+ {
+  "name": "equal",
+  "return_type": "bvec4",
+  "parameter": [
+   {"type": "ivec4", "name": "x"},
+   {"type": "ivec4", "name": "y"}
+  ]
+ },
+ {
+  "name": "equal",
+  "return_type": "bvec2",
+  "parameter": [
+   {"type": "bvec2", "name": "x"},
+   {"type": "bvec2", "name": "y"}
+  ]
+ },
+ {
+  "name": "equal",
+  "return_type": "bvec3",
+  "parameter": [
+   {"type": "bvec3", "name": "x"},
+   {"type": "bvec3", "name": "y"}
+  ]
+ },
+ {
+  "name": "equal",
+  "return_type": "bvec4",
+  "parameter": [
+   {"type": "bvec4", "name": "x"},
+   {"type": "bvec4", "name": "y"}
+  ]
+ },
+ {
+  "name": "notEqual",
+  "return_type": "bvec2",
+  "parameter": [
+   {"type": "vec2", "name": "x"},
+   {"type": "vec2", "name": "y"}
+  ]
+ },
+ {
+  "name": "notEqual",
+  "return_type": "bvec3",
+  "parameter": [
+   {"type": "vec3", "name": "x"},
+   {"type": "vec3", "name": "y"}
+  ]
+ },
+ {
+  "name": "notEqual",
+  "return_type": "bvec4",
+  "parameter": [
+   {"type": "vec4", "name": "x"},
+   {"type": "vec4", "name": "y"}
+  ]
+ },
+ {
+  "name": "notEqual",
+  "return_type": "bvec2",
+  "parameter": [
+   {"type": "ivec2", "name": "x"},
+   {"type": "ivec2", "name": "y"}
+  ]
+ },
+ {
+  "name": "notEqual",
+  "return_type": "bvec3",
+  "parameter": [
+   {"type": "ivec3", "name": "x"},
+   {"type": "ivec3", "name": "y"}
+  ]
+ },
+ {
+  "name": "notEqual",
+  "return_type": "bvec4",
+  "parameter": [
+   {"type": "ivec4", "name": "x"},
+   {"type": "ivec4", "name": "y"}
+  ]
+ },
+ {
+  "name": "notEqual",
+  "return_type": "bvec2",
+  "parameter": [
+   {"type": "bvec2", "name": "x"},
+   {"type": "bvec2", "name": "y"}
+  ]
+ },
+ {
+  "name": "notEqual",
+  "return_type": "bvec3",
+  "parameter": [
+   {"type": "bvec3", "name": "x"},
+   {"type": "bvec3", "name": "y"}
+  ]
+ },
+ {
+  "name": "notEqual",
+  "return_type": "bvec4",
+  "parameter": [
+   {"type": "bvec4", "name": "x"},
+   {"type": "bvec4", "name": "y"}
+  ]
+ },
+ {
+  "name": "any",
+  "return_type": "bool",
+  "parameter": [
+   {"type": "bvec2", "name": "x"}
+  ]
+ },
+ {
+  "name": "any",
+  "return_type": "bool",
+  "parameter": [
+   {"type": "bvec3", "name": "x"}
+  ]
+ },
+ {
+  "name": "any",
+  "return_type": "bool",
+  "parameter": [
+   {"type": "bvec4", "name": "x"}
+  ]
+ },
+ {
+  "name": "all",
+  "return_type": "bool",
+  "parameter": [
+   {"type": "bvec2", "name": "x"}
+  ]
+ },
+ {
+  "name": "all",
+  "return_type": "bool",
+  "parameter": [
+   {"type": "bvec3", "name": "x"}
+  ]
+ },
+ {
+  "name": "all",
+  "return_type": "bool",
+  "parameter": [
+   {"type": "bvec4", "name": "x"}
+  ]
+ },
+ {
+  "name": "not",
+  "return_type": "bvec2",
+  "parameter": [
+   {"type": "bvec2", "name": "x"}
+  ]
+ },
+ {
+  "name": "not",
+  "return_type": "bvec3",
+  "parameter": [
+   {"type": "bvec3", "name": "x"}
+  ]
+ },
+ {
+  "name": "not",
+  "return_type": "bvec4",
+  "parameter": [
+   {"type": "bvec4", "name": "x"}
+  ]
+ },
+ {
+  "name": "texture2D",
+  "return_type": "vec4",
+  "parameter": [
+   {"type": "sampler2D", "name": "sampler"},
+   {"type": "vec2", "name": "coord"}
+  ]
+ },
+ {
+  "name": "texture2DProj",
+  "return_type": "vec4",
+  "parameter": [
+   {"type": "sampler2D", "name": "sampler"},
+   {"type": "vec3", "name": "coord"}
+  ]
+ },
+ {
+  "name": "texture2DProj",
+  "return_type": "vec4",
+  "parameter": [
+   {"type": "sampler2D", "name": "sampler"},
+   {"type": "vec4", "name": "coord"}
+  ]
+ },
+ {
+  "name": "textureCube",
+  "return_type": "vec4",
+  "parameter": [
+   {"type": "samplerCube", "name": "sampler"},
+   {"type": "vec3", "name": "coord"}
+  ]
+ },
+ {
+  "name": "texture2D",
+  "return_type": "vec4",
+  "parameter": [
+   {"type": "samplerExternalOES", "name": "sampler"},
+   {"type": "vec2", "name": "coord"}
+  ],
+  "condition":"resources.OES_EGL_image_external"
+ },
+ {
+  "name": "texture2DProj",
+  "return_type": "vec4",
+  "parameter": [
+   {"type": "samplerExternalOES", "name": "sampler"},
+   {"type": "vec3", "name": "coord"}
+  ],
+  "condition":"resources.OES_EGL_image_external"
+ },
+ {
+  "name": "texture2DProj",
+  "return_type": "vec4",
+  "parameter": [
+   {"type": "samplerExternalOES", "name": "sampler"},
+   {"type": "vec4", "name": "coord"}
+  ],
+  "condition":"resources.OES_EGL_image_external"
+ },
+ {
+  "name": "texture2DRect",
+  "return_type": "vec4",
+  "parameter": [
+   {"type": "sampler2DRect", "name": "sampler"},
+   {"type": "vec2", "name": "coord"}
+  ],
+  "condition":"resources.ARB_texture_rectangle"
+ },
+ {
+  "name": "texture2DRectProj",
+  "return_type": "vec4",
+  "parameter": [
+   {"type": "sampler2DRect", "name": "sampler"},
+   {"type": "vec3", "name": "coord"}
+  ],
+  "condition":"resources.ARB_texture_rectangle"
+ },
+ {
+  "name": "texture2DRectProj",
+  "return_type": "vec4",
+  "parameter": [
+   {"type": "sampler2DRect", "name": "sampler"},
+   {"type": "vec4", "name": "coord"}
+  ],
+  "condition":"resources.ARB_texture_rectangle"
+ }
+],
+ 
+"vertex" : [
+ {
+  "name": "texture2DLod",
+  "return_type": "vec4",
+  "parameter": [
+   {"type": "sampler2D", "name": "sampler"},
+   {"type": "vec2", "name": "coord"},
+   {"type": "float", "name": "lod"}
+  ]
+ },
+ {
+  "name": "texture2DProjLod",
+  "return_type": "vec4",
+  "parameter": [
+   {"type": "sampler2D", "name": "sampler"},
+   {"type": "vec3", "name": "coord"},
+   {"type": "float", "name": "lod"}
+  ]
+ },
+ {
+  "name": "texture2DProjLod",
+  "return_type": "vec4",
+  "parameter": [
+   {"type": "sampler2D", "name": "sampler"},
+   {"type": "vec4", "name": "coord"},
+   {"type": "float", "name": "lod"}
+  ]
+ },
+ {
+  "name": "textureCubeLod",
+  "return_type": "vec4",
+  "parameter": [
+   {"type": "samplerCube", "name": "sampler"},
+   {"type": "vec3", "name": "coord"},
+   {"type": "float", "name": "lod"}
+  ]
+ }
 ]
+
 } 
diff --git a/src/compiler/generate_builtin_symbol_table.py b/src/compiler/generate_builtin_symbol_table.py
old mode 100644
new mode 100755
index d20970c..5fdf626
--- a/src/compiler/generate_builtin_symbol_table.py
+++ b/src/compiler/generate_builtin_symbol_table.py
@@ -38,6 +38,7 @@
   f->addParameter(param);
   t->insert(*f);
 }
+
 static void builtin2(TSymbolTable* t, TType* rvalue, const char* name, TType* ptype1, const char* pname1, TType* ptype2, const char* pname2)
 {
   TFunction* f = new TFunction(new TString(name), *rvalue);
@@ -59,33 +60,42 @@
   f->addParameter(param3);
   t->insert(*f);
 }
+
 """
 output.write(registerfunc)
 
-commonHeader = "void InsertBuiltInFunctionsCommon(const ShBuiltInResources& resources, TSymbolTable * t) {\n"
-output.write(commonHeader)
+# A function that parses the JSON representation of a list of builtin functions.
+def parseBuiltin(name):
+    for func in builtin[name]:
+        out = ""
+        indent = "    ";
+        size = len(func['parameter'])
+        if 'condition' in func:
+            out += indent + "if (" + func['condition'] + ") {\n"
+            indent += indent;
+        out += indent + "builtin" + str(size) + "(t, "
+        out += ttypeMap[func['return_type']]
+        out += ", \"" + func['name'] + "\""
+        paramlist = func['parameter']
+        paramdef = "";
+        for param in paramlist:
+            paramdef += ", "
+            paramdef += ttypeMap[param['type']] 
+            paramdef += ", \"" + param['name'] + "\""
+        out += paramdef + ");\n"
+        if 'condition' in func:
+            out += "    }\n"
+        output.write(out)
 
-for func in builtin["common"]:
-	out = ""
-	indent = "    ";
-	size = len(func['parameter'])
-	if 'condition' in func:
-		out += indent + "if (" + func['condition'] + ") {\n"
-		indent += indent;
-	out += indent + "builtin" + str(size) + "(t, "
-	out += ttypeMap[func['return_type']]
-	out += ", \"" + func['name'] + "\""
-	paramlist = func['parameter']
-	paramdef = "";
-	for param in paramlist:
-		paramdef += ", "
-		paramdef += ttypeMap[param['type']] 
-		paramdef += ", \"" + param['name'] + "\""
-	out += paramdef + ");\n"
-	if 'condition' in func:
-		out += "    }\n"
-	output.write(out)
-output.write("}\n")
+commonHeader = "void InsertBuiltInFunctionsCommon(const ShBuiltInResources& resources, TSymbolTable* t) {\n"
+output.write(commonHeader)
+parseBuiltin("common")
+output.write("}\n\n")
+
+vertexHeader = "void InsertBuiltInFunctionsVertex(const ShBuiltInResources& resources, TSymbolTable* t) {\n"
+output.write(vertexHeader)
+parseBuiltin("vertex")
+output.write("}\n\n")
 
 json_data.close()
 output.close()