Commit c0ca7b4e by acleung@chromium.org

Use new symbol table initization for vertex shader.

BUG= R=alokp@chromium.org Review URL: https://codereview.appspot.com/10247043 git-svn-id: https://angleproject.googlecode.com/svn/trunk@2426 736b8ea6-26fd-11df-bfd4-992fa37f6226
parent 18f50f78
...@@ -69,7 +69,20 @@ bool InitializeSymbolTable( ...@@ -69,7 +69,20 @@ bool InitializeSymbolTable(
} }
} }
switch (type) {
case SH_FRAGMENT_SHADER:
InsertBuiltInFunctionsCommon(resources, &symbolTable);
break;
case SH_VERTEX_SHADER:
InsertBuiltInFunctionsCommon(resources, &symbolTable); InsertBuiltInFunctionsCommon(resources, &symbolTable);
InsertBuiltInFunctionsVertex(resources, &symbolTable);
break;
default: assert(false && "Language not supported");
}
IdentifyBuiltIns(type, spec, resources, symbolTable); IdentifyBuiltIns(type, spec, resources, symbolTable);
return true; return true;
......
...@@ -16,31 +16,6 @@ ...@@ -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. // Prototypes for built-in functions seen by fragment shaders only.
// //
//============================================================================ //============================================================================
...@@ -164,7 +139,6 @@ void TBuiltIns::initialize(ShShaderType type, ShShaderSpec spec, ...@@ -164,7 +139,6 @@ void TBuiltIns::initialize(ShShaderType type, ShShaderSpec spec,
case SH_VERTEX_SHADER: case SH_VERTEX_SHADER:
builtInStrings.push_back(DefaultPrecisionVertex()); builtInStrings.push_back(DefaultPrecisionVertex());
builtInStrings.push_back(BuiltInFunctionsVertex(resources));
builtInStrings.push_back(StandardUniforms()); builtInStrings.push_back(StandardUniforms());
break; break;
......
...@@ -16,6 +16,7 @@ static void builtin1(TSymbolTable* t, TType* rvalue, const char* name, TType* pt ...@@ -16,6 +16,7 @@ static void builtin1(TSymbolTable* t, TType* rvalue, const char* name, TType* pt
f->addParameter(param); f->addParameter(param);
t->insert(*f); t->insert(*f);
} }
static void builtin2(TSymbolTable* t, TType* rvalue, const char* name, TType* ptype1, const char* pname1, TType* ptype2, const char* pname2) 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); TFunction* f = new TFunction(new TString(name), *rvalue);
...@@ -37,7 +38,8 @@ static void builtin3(TSymbolTable* t, TType* rvalue, const char* name, TType* pt ...@@ -37,7 +38,8 @@ static void builtin3(TSymbolTable* t, TType* rvalue, const char* name, TType* pt
f->addParameter(param3); f->addParameter(param3);
t->insert(*f); 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, 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, 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"); builtin1(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 3, false, false), "radians", new TType(EbtFloat, EbpUndefined, EvqGlobal, 3, false, false), "degrees");
...@@ -277,3 +279,11 @@ void InsertBuiltInFunctionsCommon(const ShBuiltInResources& resources, TSymbolTa ...@@ -277,3 +279,11 @@ void InsertBuiltInFunctionsCommon(const ShBuiltInResources& resources, TSymbolTa
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"); 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");
}
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
class TSymbolTable; 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_ #endif // _BUILTIN_SYMBOL_TABLE_INCLUDED_
...@@ -22,771 +22,771 @@ ...@@ -22,771 +22,771 @@
}, },
"common" : [ "common" : [
{ {
"name": "radians", "name": "radians",
"return_type": "float", "return_type": "float",
"parameter": [ "parameter": [
{"type": "float", "name": "degrees"} {"type": "float", "name": "degrees"}
] ]
}, },
{ {
"name": "radians", "name": "radians",
"return_type": "vec2", "return_type": "vec2",
"parameter": [ "parameter": [
{"type": "vec2", "name": "degrees"} {"type": "vec2", "name": "degrees"}
] ]
}, },
{ {
"name": "radians", "name": "radians",
"return_type": "vec3", "return_type": "vec3",
"parameter": [ "parameter": [
{"type": "vec3", "name": "degrees"} {"type": "vec3", "name": "degrees"}
] ]
}, },
{ {
"name": "radians", "name": "radians",
"return_type": "vec4", "return_type": "vec4",
"parameter": [ "parameter": [
{"type": "vec4", "name": "degrees"} {"type": "vec4", "name": "degrees"}
] ]
}, },
{ {
"name": "degrees", "name": "degrees",
"return_type": "float", "return_type": "float",
"parameter": [ "parameter": [
{"type": "float", "name": "radians"} {"type": "float", "name": "radians"}
] ]
}, },
{ {
"name": "degrees", "name": "degrees",
"return_type": "vec2", "return_type": "vec2",
"parameter": [ "parameter": [
{"type": "vec2", "name": "radians"} {"type": "vec2", "name": "radians"}
] ]
}, },
{ {
"name": "degrees", "name": "degrees",
"return_type": "vec3", "return_type": "vec3",
"parameter": [ "parameter": [
{"type": "vec3", "name": "radians"} {"type": "vec3", "name": "radians"}
] ]
}, },
{ {
"name": "degrees", "name": "degrees",
"return_type": "vec4", "return_type": "vec4",
"parameter": [ "parameter": [
{"type": "vec4", "name": "radians"} {"type": "vec4", "name": "radians"}
] ]
}, },
{ {
"name": "sin", "name": "sin",
"return_type": "float", "return_type": "float",
"parameter": [ "parameter": [
{"type": "float", "name": "angle"} {"type": "float", "name": "angle"}
] ]
}, },
{ {
"name": "sin", "name": "sin",
"return_type": "vec2", "return_type": "vec2",
"parameter": [ "parameter": [
{"type": "vec2", "name": "angle"} {"type": "vec2", "name": "angle"}
] ]
}, },
{ {
"name": "sin", "name": "sin",
"return_type": "vec3", "return_type": "vec3",
"parameter": [ "parameter": [
{"type": "vec3", "name": "angle"} {"type": "vec3", "name": "angle"}
] ]
}, },
{ {
"name": "sin", "name": "sin",
"return_type": "vec4", "return_type": "vec4",
"parameter": [ "parameter": [
{"type": "vec4", "name": "angle"} {"type": "vec4", "name": "angle"}
] ]
}, },
{ {
"name": "cos", "name": "cos",
"return_type": "float", "return_type": "float",
"parameter": [ "parameter": [
{"type": "float", "name": "angle"} {"type": "float", "name": "angle"}
] ]
}, },
{ {
"name": "cos", "name": "cos",
"return_type": "vec2", "return_type": "vec2",
"parameter": [ "parameter": [
{"type": "vec2", "name": "angle"} {"type": "vec2", "name": "angle"}
] ]
}, },
{ {
"name": "cos", "name": "cos",
"return_type": "vec3", "return_type": "vec3",
"parameter": [ "parameter": [
{"type": "vec3", "name": "angle"} {"type": "vec3", "name": "angle"}
] ]
}, },
{ {
"name": "cos", "name": "cos",
"return_type": "vec4", "return_type": "vec4",
"parameter": [ "parameter": [
{"type": "vec4", "name": "angle"} {"type": "vec4", "name": "angle"}
] ]
}, },
{ {
"name": "tan", "name": "tan",
"return_type": "float", "return_type": "float",
"parameter": [ "parameter": [
{"type": "float", "name": "angle"} {"type": "float", "name": "angle"}
] ]
}, },
{ {
"name": "tan", "name": "tan",
"return_type": "vec2", "return_type": "vec2",
"parameter": [ "parameter": [
{"type": "vec2", "name": "angle"} {"type": "vec2", "name": "angle"}
] ]
}, },
{ {
"name": "tan", "name": "tan",
"return_type": "vec3", "return_type": "vec3",
"parameter": [ "parameter": [
{"type": "vec3", "name": "angle"} {"type": "vec3", "name": "angle"}
] ]
}, },
{ {
"name": "tan", "name": "tan",
"return_type": "vec4", "return_type": "vec4",
"parameter": [ "parameter": [
{"type": "vec4", "name": "angle"} {"type": "vec4", "name": "angle"}
] ]
}, },
{ {
"name": "asin", "name": "asin",
"return_type": "float", "return_type": "float",
"parameter": [ "parameter": [
{"type": "float", "name": "x"} {"type": "float", "name": "x"}
] ]
}, },
{ {
"name": "asin", "name": "asin",
"return_type": "vec2", "return_type": "vec2",
"parameter": [ "parameter": [
{"type": "vec2", "name": "x"} {"type": "vec2", "name": "x"}
] ]
}, },
{ {
"name": "asin", "name": "asin",
"return_type": "vec3", "return_type": "vec3",
"parameter": [ "parameter": [
{"type": "vec3", "name": "x"} {"type": "vec3", "name": "x"}
] ]
}, },
{ {
"name": "asin", "name": "asin",
"return_type": "vec4", "return_type": "vec4",
"parameter": [ "parameter": [
{"type": "vec4", "name": "x"} {"type": "vec4", "name": "x"}
] ]
}, },
{ {
"name": "acos", "name": "acos",
"return_type": "float", "return_type": "float",
"parameter": [ "parameter": [
{"type": "float", "name": "x"} {"type": "float", "name": "x"}
] ]
}, },
{ {
"name": "acos", "name": "acos",
"return_type": "vec2", "return_type": "vec2",
"parameter": [ "parameter": [
{"type": "vec2", "name": "x"} {"type": "vec2", "name": "x"}
] ]
}, },
{ {
"name": "acos", "name": "acos",
"return_type": "vec3", "return_type": "vec3",
"parameter": [ "parameter": [
{"type": "vec3", "name": "x"} {"type": "vec3", "name": "x"}
] ]
}, },
{ {
"name": "acos", "name": "acos",
"return_type": "vec4", "return_type": "vec4",
"parameter": [ "parameter": [
{"type": "vec4", "name": "x"} {"type": "vec4", "name": "x"}
] ]
}, },
{ {
"name": "atan", "name": "atan",
"return_type": "float", "return_type": "float",
"parameter": [ "parameter": [
{"type": "float", "name": "y"}, {"type": "float", "name": "y"},
{"type": "float", "name": "x"} {"type": "float", "name": "x"}
] ]
}, },
{ {
"name": "atan", "name": "atan",
"return_type": "vec2", "return_type": "vec2",
"parameter": [ "parameter": [
{"type": "vec2", "name": "y"}, {"type": "vec2", "name": "y"},
{"type": "vec2", "name": "x"} {"type": "vec2", "name": "x"}
] ]
}, },
{ {
"name": "atan", "name": "atan",
"return_type": "vec3", "return_type": "vec3",
"parameter": [ "parameter": [
{"type": "vec3", "name": "y"}, {"type": "vec3", "name": "y"},
{"type": "vec3", "name": "x"} {"type": "vec3", "name": "x"}
] ]
}, },
{ {
"name": "atan", "name": "atan",
"return_type": "vec4", "return_type": "vec4",
"parameter": [ "parameter": [
{"type": "vec4", "name": "y"}, {"type": "vec4", "name": "y"},
{"type": "vec4", "name": "x"} {"type": "vec4", "name": "x"}
] ]
}, },
{ {
"name": "atan", "name": "atan",
"return_type": "float", "return_type": "float",
"parameter": [ "parameter": [
{"type": "float", "name": "y_over_x"} {"type": "float", "name": "y_over_x"}
] ]
}, },
{ {
"name": "atan", "name": "atan",
"return_type": "vec2", "return_type": "vec2",
"parameter": [ "parameter": [
{"type": "vec2", "name": "y_over_x"} {"type": "vec2", "name": "y_over_x"}
] ]
}, },
{ {
"name": "atan", "name": "atan",
"return_type": "vec3", "return_type": "vec3",
"parameter": [ "parameter": [
{"type": "vec3", "name": "y_over_x"} {"type": "vec3", "name": "y_over_x"}
] ]
}, },
{ {
"name": "atan", "name": "atan",
"return_type": "vec4", "return_type": "vec4",
"parameter": [ "parameter": [
{"type": "vec4", "name": "y_over_x"} {"type": "vec4", "name": "y_over_x"}
] ]
}, },
{ {
"name": "pow", "name": "pow",
"return_type": "float", "return_type": "float",
"parameter": [ "parameter": [
{"type": "float", "name": "x"}, {"type": "float", "name": "x"},
{"type": "float", "name": "y"} {"type": "float", "name": "y"}
] ]
}, },
{ {
"name": "pow", "name": "pow",
"return_type": "vec2", "return_type": "vec2",
"parameter": [ "parameter": [
{"type": "vec2", "name": "x"}, {"type": "vec2", "name": "x"},
{"type": "vec2", "name": "y"} {"type": "vec2", "name": "y"}
] ]
}, },
{ {
"name": "pow", "name": "pow",
"return_type": "vec3", "return_type": "vec3",
"parameter": [ "parameter": [
{"type": "vec3", "name": "x"}, {"type": "vec3", "name": "x"},
{"type": "vec3", "name": "y"} {"type": "vec3", "name": "y"}
] ]
}, },
{ {
"name": "pow", "name": "pow",
"return_type": "vec4", "return_type": "vec4",
"parameter": [ "parameter": [
{"type": "vec4", "name": "x"}, {"type": "vec4", "name": "x"},
{"type": "vec4", "name": "y"} {"type": "vec4", "name": "y"}
] ]
}, },
{ {
"name": "exp", "name": "exp",
"return_type": "float", "return_type": "float",
"parameter": [ "parameter": [
{"type": "float", "name": "x"} {"type": "float", "name": "x"}
] ]
}, },
{ {
"name": "exp", "name": "exp",
"return_type": "vec2", "return_type": "vec2",
"parameter": [ "parameter": [
{"type": "vec2", "name": "x"} {"type": "vec2", "name": "x"}
] ]
}, },
{ {
"name": "exp", "name": "exp",
"return_type": "vec3", "return_type": "vec3",
"parameter": [ "parameter": [
{"type": "vec3", "name": "x"} {"type": "vec3", "name": "x"}
] ]
}, },
{ {
"name": "exp", "name": "exp",
"return_type": "vec4", "return_type": "vec4",
"parameter": [ "parameter": [
{"type": "vec4", "name": "x"} {"type": "vec4", "name": "x"}
] ]
}, },
{ {
"name": "log", "name": "log",
"return_type": "float", "return_type": "float",
"parameter": [ "parameter": [
{"type": "float", "name": "x"} {"type": "float", "name": "x"}
] ]
}, },
{ {
"name": "log", "name": "log",
"return_type": "vec2", "return_type": "vec2",
"parameter": [ "parameter": [
{"type": "vec2", "name": "x"} {"type": "vec2", "name": "x"}
] ]
}, },
{ {
"name": "log", "name": "log",
"return_type": "vec3", "return_type": "vec3",
"parameter": [ "parameter": [
{"type": "vec3", "name": "x"} {"type": "vec3", "name": "x"}
] ]
}, },
{ {
"name": "log", "name": "log",
"return_type": "vec4", "return_type": "vec4",
"parameter": [ "parameter": [
{"type": "vec4", "name": "x"} {"type": "vec4", "name": "x"}
] ]
}, },
{ {
"name": "exp2", "name": "exp2",
"return_type": "float", "return_type": "float",
"parameter": [ "parameter": [
{"type": "float", "name": "x"} {"type": "float", "name": "x"}
] ]
}, },
{ {
"name": "exp2", "name": "exp2",
"return_type": "vec2", "return_type": "vec2",
"parameter": [ "parameter": [
{"type": "vec2", "name": "x"} {"type": "vec2", "name": "x"}
] ]
}, },
{ {
"name": "exp2", "name": "exp2",
"return_type": "vec3", "return_type": "vec3",
"parameter": [ "parameter": [
{"type": "vec3", "name": "x"} {"type": "vec3", "name": "x"}
] ]
}, },
{ {
"name": "exp2", "name": "exp2",
"return_type": "vec4", "return_type": "vec4",
"parameter": [ "parameter": [
{"type": "vec4", "name": "x"} {"type": "vec4", "name": "x"}
] ]
}, },
{ {
"name": "log2", "name": "log2",
"return_type": "float", "return_type": "float",
"parameter": [ "parameter": [
{"type": "float", "name": "x"} {"type": "float", "name": "x"}
] ]
}, },
{ {
"name": "log2", "name": "log2",
"return_type": "vec2", "return_type": "vec2",
"parameter": [ "parameter": [
{"type": "vec2", "name": "x"} {"type": "vec2", "name": "x"}
] ]
}, },
{ {
"name": "log2", "name": "log2",
"return_type": "vec3", "return_type": "vec3",
"parameter": [ "parameter": [
{"type": "vec3", "name": "x"} {"type": "vec3", "name": "x"}
] ]
}, },
{ {
"name": "log2", "name": "log2",
"return_type": "vec4", "return_type": "vec4",
"parameter": [ "parameter": [
{"type": "vec4", "name": "x"} {"type": "vec4", "name": "x"}
] ]
}, },
{ {
"name": "sqrt", "name": "sqrt",
"return_type": "float", "return_type": "float",
"parameter": [ "parameter": [
{"type": "float", "name": "x"} {"type": "float", "name": "x"}
] ]
}, },
{ {
"name": "sqrt", "name": "sqrt",
"return_type": "vec2", "return_type": "vec2",
"parameter": [ "parameter": [
{"type": "vec2", "name": "x"} {"type": "vec2", "name": "x"}
] ]
}, },
{ {
"name": "sqrt", "name": "sqrt",
"return_type": "vec3", "return_type": "vec3",
"parameter": [ "parameter": [
{"type": "vec3", "name": "x"} {"type": "vec3", "name": "x"}
] ]
}, },
{ {
"name": "sqrt", "name": "sqrt",
"return_type": "vec4", "return_type": "vec4",
"parameter": [ "parameter": [
{"type": "vec4", "name": "x"} {"type": "vec4", "name": "x"}
] ]
}, },
{ {
"name": "inversesqrt", "name": "inversesqrt",
"return_type": "float", "return_type": "float",
"parameter": [ "parameter": [
{"type": "float", "name": "x"} {"type": "float", "name": "x"}
] ]
}, },
{ {
"name": "inversesqrt", "name": "inversesqrt",
"return_type": "vec2", "return_type": "vec2",
"parameter": [ "parameter": [
{"type": "vec2", "name": "x"} {"type": "vec2", "name": "x"}
] ]
}, },
{ {
"name": "inversesqrt", "name": "inversesqrt",
"return_type": "vec3", "return_type": "vec3",
"parameter": [ "parameter": [
{"type": "vec3", "name": "x"} {"type": "vec3", "name": "x"}
] ]
}, },
{ {
"name": "inversesqrt", "name": "inversesqrt",
"return_type": "vec4", "return_type": "vec4",
"parameter": [ "parameter": [
{"type": "vec4", "name": "x"} {"type": "vec4", "name": "x"}
] ]
}, },
{ {
"name": "abs", "name": "abs",
"return_type": "float", "return_type": "float",
"parameter": [ "parameter": [
{"type": "float", "name": "x"} {"type": "float", "name": "x"}
] ]
}, },
{ {
"name": "abs", "name": "abs",
"return_type": "vec2", "return_type": "vec2",
"parameter": [ "parameter": [
{"type": "vec2", "name": "x"} {"type": "vec2", "name": "x"}
] ]
}, },
{ {
"name": "abs", "name": "abs",
"return_type": "vec3", "return_type": "vec3",
"parameter": [ "parameter": [
{"type": "vec3", "name": "x"} {"type": "vec3", "name": "x"}
] ]
}, },
{ {
"name": "abs", "name": "abs",
"return_type": "vec4", "return_type": "vec4",
"parameter": [ "parameter": [
{"type": "vec4", "name": "x"} {"type": "vec4", "name": "x"}
] ]
}, },
{ {
"name": "sign", "name": "sign",
"return_type": "float", "return_type": "float",
"parameter": [ "parameter": [
{"type": "float", "name": "x"} {"type": "float", "name": "x"}
] ]
}, },
{ {
"name": "sign", "name": "sign",
"return_type": "vec2", "return_type": "vec2",
"parameter": [ "parameter": [
{"type": "vec2", "name": "x"} {"type": "vec2", "name": "x"}
] ]
}, },
{ {
"name": "sign", "name": "sign",
"return_type": "vec3", "return_type": "vec3",
"parameter": [ "parameter": [
{"type": "vec3", "name": "x"} {"type": "vec3", "name": "x"}
] ]
}, },
{ {
"name": "sign", "name": "sign",
"return_type": "vec4", "return_type": "vec4",
"parameter": [ "parameter": [
{"type": "vec4", "name": "x"} {"type": "vec4", "name": "x"}
] ]
}, },
{ {
"name": "floor", "name": "floor",
"return_type": "float", "return_type": "float",
"parameter": [ "parameter": [
{"type": "float", "name": "x"} {"type": "float", "name": "x"}
] ]
}, },
{ {
"name": "floor", "name": "floor",
"return_type": "vec2", "return_type": "vec2",
"parameter": [ "parameter": [
{"type": "vec2", "name": "x"} {"type": "vec2", "name": "x"}
] ]
}, },
{ {
"name": "floor", "name": "floor",
"return_type": "vec3", "return_type": "vec3",
"parameter": [ "parameter": [
{"type": "vec3", "name": "x"} {"type": "vec3", "name": "x"}
] ]
}, },
{ {
"name": "floor", "name": "floor",
"return_type": "vec4", "return_type": "vec4",
"parameter": [ "parameter": [
{"type": "vec4", "name": "x"} {"type": "vec4", "name": "x"}
] ]
}, },
{ {
"name": "ceil", "name": "ceil",
"return_type": "float", "return_type": "float",
"parameter": [ "parameter": [
{"type": "float", "name": "x"} {"type": "float", "name": "x"}
] ]
}, },
{ {
"name": "ceil", "name": "ceil",
"return_type": "vec2", "return_type": "vec2",
"parameter": [ "parameter": [
{"type": "vec2", "name": "x"} {"type": "vec2", "name": "x"}
] ]
}, },
{ {
"name": "ceil", "name": "ceil",
"return_type": "vec3", "return_type": "vec3",
"parameter": [ "parameter": [
{"type": "vec3", "name": "x"} {"type": "vec3", "name": "x"}
] ]
}, },
{ {
"name": "ceil", "name": "ceil",
"return_type": "vec4", "return_type": "vec4",
"parameter": [ "parameter": [
{"type": "vec4", "name": "x"} {"type": "vec4", "name": "x"}
] ]
}, },
{ {
"name": "fract", "name": "fract",
"return_type": "float", "return_type": "float",
"parameter": [ "parameter": [
{"type": "float", "name": "x"} {"type": "float", "name": "x"}
] ]
}, },
{ {
"name": "fract", "name": "fract",
"return_type": "vec2", "return_type": "vec2",
"parameter": [ "parameter": [
{"type": "vec2", "name": "x"} {"type": "vec2", "name": "x"}
] ]
}, },
{ {
"name": "fract", "name": "fract",
"return_type": "vec3", "return_type": "vec3",
"parameter": [ "parameter": [
{"type": "vec3", "name": "x"} {"type": "vec3", "name": "x"}
] ]
}, },
{ {
"name": "fract", "name": "fract",
"return_type": "vec4", "return_type": "vec4",
"parameter": [ "parameter": [
{"type": "vec4", "name": "x"} {"type": "vec4", "name": "x"}
] ]
}, },
{ {
"name": "mod", "name": "mod",
"return_type": "float", "return_type": "float",
"parameter": [ "parameter": [
{"type": "float", "name": "x"}, {"type": "float", "name": "x"},
{"type": "float", "name": "y"} {"type": "float", "name": "y"}
] ]
}, },
{ {
"name": "mod", "name": "mod",
"return_type": "vec2", "return_type": "vec2",
"parameter": [ "parameter": [
{"type": "vec2", "name": "x"}, {"type": "vec2", "name": "x"},
{"type": "float", "name": "y"} {"type": "float", "name": "y"}
] ]
}, },
{ {
"name": "mod", "name": "mod",
"return_type": "vec3", "return_type": "vec3",
"parameter": [ "parameter": [
{"type": "vec3", "name": "x"}, {"type": "vec3", "name": "x"},
{"type": "float", "name": "y"} {"type": "float", "name": "y"}
] ]
}, },
{ {
"name": "mod", "name": "mod",
"return_type": "vec4", "return_type": "vec4",
"parameter": [ "parameter": [
{"type": "vec4", "name": "x"}, {"type": "vec4", "name": "x"},
{"type": "float", "name": "y"} {"type": "float", "name": "y"}
] ]
}, },
{ {
"name": "mod", "name": "mod",
"return_type": "vec2", "return_type": "vec2",
"parameter": [ "parameter": [
{"type": "vec2", "name": "x"}, {"type": "vec2", "name": "x"},
{"type": "vec2", "name": "y"} {"type": "vec2", "name": "y"}
] ]
}, },
{ {
"name": "mod", "name": "mod",
"return_type": "vec3", "return_type": "vec3",
"parameter": [ "parameter": [
{"type": "vec3", "name": "x"}, {"type": "vec3", "name": "x"},
{"type": "vec3", "name": "y"} {"type": "vec3", "name": "y"}
] ]
}, },
{ {
"name": "mod", "name": "mod",
"return_type": "vec4", "return_type": "vec4",
"parameter": [ "parameter": [
{"type": "vec4", "name": "x"}, {"type": "vec4", "name": "x"},
{"type": "vec4", "name": "y"} {"type": "vec4", "name": "y"}
] ]
}, },
{ {
"name": "min", "name": "min",
"return_type": "float", "return_type": "float",
"parameter": [ "parameter": [
{"type": "float", "name": "x"}, {"type": "float", "name": "x"},
{"type": "float", "name": "y"} {"type": "float", "name": "y"}
] ]
}, },
{ {
"name": "min", "name": "min",
"return_type": "vec2", "return_type": "vec2",
"parameter": [ "parameter": [
{"type": "vec2", "name": "x"}, {"type": "vec2", "name": "x"},
{"type": "float", "name": "y"} {"type": "float", "name": "y"}
] ]
}, },
{ {
"name": "min", "name": "min",
"return_type": "vec3", "return_type": "vec3",
"parameter": [ "parameter": [
{"type": "vec3", "name": "x"}, {"type": "vec3", "name": "x"},
{"type": "float", "name": "y"} {"type": "float", "name": "y"}
] ]
}, },
{ {
"name": "min", "name": "min",
"return_type": "vec4", "return_type": "vec4",
"parameter": [ "parameter": [
{"type": "vec4", "name": "x"}, {"type": "vec4", "name": "x"},
{"type": "float", "name": "y"} {"type": "float", "name": "y"}
] ]
}, },
{ {
"name": "min", "name": "min",
"return_type": "vec2", "return_type": "vec2",
"parameter": [ "parameter": [
{"type": "vec2", "name": "x"}, {"type": "vec2", "name": "x"},
{"type": "vec2", "name": "y"} {"type": "vec2", "name": "y"}
] ]
}, },
{ {
"name": "min", "name": "min",
"return_type": "vec3", "return_type": "vec3",
"parameter": [ "parameter": [
{"type": "vec3", "name": "x"}, {"type": "vec3", "name": "x"},
{"type": "vec3", "name": "y"} {"type": "vec3", "name": "y"}
] ]
}, },
{ {
"name": "min", "name": "min",
"return_type": "vec4", "return_type": "vec4",
"parameter": [ "parameter": [
{"type": "vec4", "name": "x"}, {"type": "vec4", "name": "x"},
{"type": "vec4", "name": "y"} {"type": "vec4", "name": "y"}
] ]
}, },
{ {
"name": "max", "name": "max",
"return_type": "float", "return_type": "float",
"parameter": [ "parameter": [
{"type": "float", "name": "x"}, {"type": "float", "name": "x"},
{"type": "float", "name": "y"} {"type": "float", "name": "y"}
] ]
}, },
{ {
"name": "max", "name": "max",
"return_type": "vec2", "return_type": "vec2",
"parameter": [ "parameter": [
{"type": "vec2", "name": "x"}, {"type": "vec2", "name": "x"},
{"type": "float", "name": "y"} {"type": "float", "name": "y"}
] ]
}, },
{ {
"name": "max", "name": "max",
"return_type": "vec3", "return_type": "vec3",
"parameter": [ "parameter": [
{"type": "vec3", "name": "x"}, {"type": "vec3", "name": "x"},
{"type": "float", "name": "y"} {"type": "float", "name": "y"}
] ]
}, },
{ {
"name": "max", "name": "max",
"return_type": "vec4", "return_type": "vec4",
"parameter": [ "parameter": [
{"type": "vec4", "name": "x"}, {"type": "vec4", "name": "x"},
{"type": "float", "name": "y"} {"type": "float", "name": "y"}
] ]
}, },
{ {
"name": "max", "name": "max",
"return_type": "vec2", "return_type": "vec2",
"parameter": [ "parameter": [
{"type": "vec2", "name": "x"}, {"type": "vec2", "name": "x"},
{"type": "vec2", "name": "y"} {"type": "vec2", "name": "y"}
] ]
}, },
{ {
"name": "max", "name": "max",
"return_type": "vec3", "return_type": "vec3",
"parameter": [ "parameter": [
{"type": "vec3", "name": "x"}, {"type": "vec3", "name": "x"},
{"type": "vec3", "name": "y"} {"type": "vec3", "name": "y"}
] ]
}, },
{ {
"name": "max", "name": "max",
"return_type": "vec4", "return_type": "vec4",
"parameter": [ "parameter": [
{"type": "vec4", "name": "x"}, {"type": "vec4", "name": "x"},
{"type": "vec4", "name": "y"} {"type": "vec4", "name": "y"}
] ]
}, },
{ {
"name": "clamp", "name": "clamp",
"return_type": "float", "return_type": "float",
"parameter": [ "parameter": [
...@@ -794,8 +794,8 @@ ...@@ -794,8 +794,8 @@
{"type": "float", "name": "minVal"}, {"type": "float", "name": "minVal"},
{"type": "float", "name": "maxVal"} {"type": "float", "name": "maxVal"}
] ]
}, },
{ {
"name": "clamp", "name": "clamp",
"return_type": "vec2", "return_type": "vec2",
"parameter": [ "parameter": [
...@@ -803,8 +803,8 @@ ...@@ -803,8 +803,8 @@
{"type": "float", "name": "minVal"}, {"type": "float", "name": "minVal"},
{"type": "float", "name": "maxVal"} {"type": "float", "name": "maxVal"}
] ]
}, },
{ {
"name": "clamp", "name": "clamp",
"return_type": "vec3", "return_type": "vec3",
"parameter": [ "parameter": [
...@@ -812,8 +812,8 @@ ...@@ -812,8 +812,8 @@
{"type": "float", "name": "minVal"}, {"type": "float", "name": "minVal"},
{"type": "float", "name": "maxVal"} {"type": "float", "name": "maxVal"}
] ]
}, },
{ {
"name": "clamp", "name": "clamp",
"return_type": "vec4", "return_type": "vec4",
"parameter": [ "parameter": [
...@@ -821,8 +821,8 @@ ...@@ -821,8 +821,8 @@
{"type": "float", "name": "minVal"}, {"type": "float", "name": "minVal"},
{"type": "float", "name": "maxVal"} {"type": "float", "name": "maxVal"}
] ]
}, },
{ {
"name": "clamp", "name": "clamp",
"return_type": "vec2", "return_type": "vec2",
"parameter": [ "parameter": [
...@@ -830,8 +830,8 @@ ...@@ -830,8 +830,8 @@
{"type": "vec2", "name": "minVal"}, {"type": "vec2", "name": "minVal"},
{"type": "vec2", "name": "maxVal"} {"type": "vec2", "name": "maxVal"}
] ]
}, },
{ {
"name": "clamp", "name": "clamp",
"return_type": "vec3", "return_type": "vec3",
"parameter": [ "parameter": [
...@@ -839,8 +839,8 @@ ...@@ -839,8 +839,8 @@
{"type": "vec3", "name": "minVal"}, {"type": "vec3", "name": "minVal"},
{"type": "vec3", "name": "maxVal"} {"type": "vec3", "name": "maxVal"}
] ]
}, },
{ {
"name": "clamp", "name": "clamp",
"return_type": "vec4", "return_type": "vec4",
"parameter": [ "parameter": [
...@@ -848,8 +848,8 @@ ...@@ -848,8 +848,8 @@
{"type": "vec4", "name": "minVal"}, {"type": "vec4", "name": "minVal"},
{"type": "vec4", "name": "maxVal"} {"type": "vec4", "name": "maxVal"}
] ]
}, },
{ {
"name": "mix", "name": "mix",
"return_type": "float", "return_type": "float",
"parameter": [ "parameter": [
...@@ -857,8 +857,8 @@ ...@@ -857,8 +857,8 @@
{"type": "float", "name": "y"}, {"type": "float", "name": "y"},
{"type": "float", "name": "a"} {"type": "float", "name": "a"}
] ]
}, },
{ {
"name": "mix", "name": "mix",
"return_type": "vec2", "return_type": "vec2",
"parameter": [ "parameter": [
...@@ -866,8 +866,8 @@ ...@@ -866,8 +866,8 @@
{"type": "vec2", "name": "y"}, {"type": "vec2", "name": "y"},
{"type": "float", "name": "a"} {"type": "float", "name": "a"}
] ]
}, },
{ {
"name": "mix", "name": "mix",
"return_type": "vec3", "return_type": "vec3",
"parameter": [ "parameter": [
...@@ -875,8 +875,8 @@ ...@@ -875,8 +875,8 @@
{"type": "vec3", "name": "y"}, {"type": "vec3", "name": "y"},
{"type": "float", "name": "a"} {"type": "float", "name": "a"}
] ]
}, },
{ {
"name": "mix", "name": "mix",
"return_type": "vec4", "return_type": "vec4",
"parameter": [ "parameter": [
...@@ -884,8 +884,8 @@ ...@@ -884,8 +884,8 @@
{"type": "vec4", "name": "y"}, {"type": "vec4", "name": "y"},
{"type": "float", "name": "a"} {"type": "float", "name": "a"}
] ]
}, },
{ {
"name": "mix", "name": "mix",
"return_type": "vec2", "return_type": "vec2",
"parameter": [ "parameter": [
...@@ -893,8 +893,8 @@ ...@@ -893,8 +893,8 @@
{"type": "vec2", "name": "y"}, {"type": "vec2", "name": "y"},
{"type": "vec2", "name": "a"} {"type": "vec2", "name": "a"}
] ]
}, },
{ {
"name": "mix", "name": "mix",
"return_type": "vec3", "return_type": "vec3",
"parameter": [ "parameter": [
...@@ -902,8 +902,8 @@ ...@@ -902,8 +902,8 @@
{"type": "vec3", "name": "y"}, {"type": "vec3", "name": "y"},
{"type": "vec3", "name": "a"} {"type": "vec3", "name": "a"}
] ]
}, },
{ {
"name": "mix", "name": "mix",
"return_type": "vec4", "return_type": "vec4",
"parameter": [ "parameter": [
...@@ -911,64 +911,64 @@ ...@@ -911,64 +911,64 @@
{"type": "vec4", "name": "y"}, {"type": "vec4", "name": "y"},
{"type": "vec4", "name": "a"} {"type": "vec4", "name": "a"}
] ]
}, },
{ {
"name": "step", "name": "step",
"return_type": "float", "return_type": "float",
"parameter": [ "parameter": [
{"type": "float", "name": "edge"}, {"type": "float", "name": "edge"},
{"type": "float", "name": "x"} {"type": "float", "name": "x"}
] ]
}, },
{ {
"name": "step", "name": "step",
"return_type": "vec2", "return_type": "vec2",
"parameter": [ "parameter": [
{"type": "vec2", "name": "edge"}, {"type": "vec2", "name": "edge"},
{"type": "vec2", "name": "x"} {"type": "vec2", "name": "x"}
] ]
}, },
{ {
"name": "step", "name": "step",
"return_type": "vec3", "return_type": "vec3",
"parameter": [ "parameter": [
{"type": "vec3", "name": "edge"}, {"type": "vec3", "name": "edge"},
{"type": "vec3", "name": "x"} {"type": "vec3", "name": "x"}
] ]
}, },
{ {
"name": "step", "name": "step",
"return_type": "vec4", "return_type": "vec4",
"parameter": [ "parameter": [
{"type": "vec4", "name": "edge"}, {"type": "vec4", "name": "edge"},
{"type": "vec4", "name": "x"} {"type": "vec4", "name": "x"}
] ]
}, },
{ {
"name": "step", "name": "step",
"return_type": "vec2", "return_type": "vec2",
"parameter": [ "parameter": [
{"type": "float", "name": "edge"}, {"type": "float", "name": "edge"},
{"type": "vec2", "name": "x"} {"type": "vec2", "name": "x"}
] ]
}, },
{ {
"name": "step", "name": "step",
"return_type": "vec3", "return_type": "vec3",
"parameter": [ "parameter": [
{"type": "float", "name": "edge"}, {"type": "float", "name": "edge"},
{"type": "vec3", "name": "x"} {"type": "vec3", "name": "x"}
] ]
}, },
{ {
"name": "step", "name": "step",
"return_type": "vec4", "return_type": "vec4",
"parameter": [ "parameter": [
{"type": "float", "name": "edge"}, {"type": "float", "name": "edge"},
{"type": "vec4", "name": "x"} {"type": "vec4", "name": "x"}
] ]
}, },
{ {
"name": "smoothstep", "name": "smoothstep",
"return_type": "float", "return_type": "float",
"parameter": [ "parameter": [
...@@ -976,8 +976,8 @@ ...@@ -976,8 +976,8 @@
{"type": "float", "name": "edge1"}, {"type": "float", "name": "edge1"},
{"type": "float", "name": "x"} {"type": "float", "name": "x"}
] ]
}, },
{ {
"name": "smoothstep", "name": "smoothstep",
"return_type": "vec2", "return_type": "vec2",
"parameter": [ "parameter": [
...@@ -985,8 +985,8 @@ ...@@ -985,8 +985,8 @@
{"type": "vec2", "name": "edge1"}, {"type": "vec2", "name": "edge1"},
{"type": "vec2", "name": "x"} {"type": "vec2", "name": "x"}
] ]
}, },
{ {
"name": "smoothstep", "name": "smoothstep",
"return_type": "vec3", "return_type": "vec3",
"parameter": [ "parameter": [
...@@ -994,8 +994,8 @@ ...@@ -994,8 +994,8 @@
{"type": "vec3", "name": "edge1"}, {"type": "vec3", "name": "edge1"},
{"type": "vec3", "name": "x"} {"type": "vec3", "name": "x"}
] ]
}, },
{ {
"name": "smoothstep", "name": "smoothstep",
"return_type": "vec4", "return_type": "vec4",
"parameter": [ "parameter": [
...@@ -1003,8 +1003,8 @@ ...@@ -1003,8 +1003,8 @@
{"type": "vec4", "name": "edge1"}, {"type": "vec4", "name": "edge1"},
{"type": "vec4", "name": "x"} {"type": "vec4", "name": "x"}
] ]
}, },
{ {
"name": "smoothstep", "name": "smoothstep",
"return_type": "vec2", "return_type": "vec2",
"parameter": [ "parameter": [
...@@ -1012,8 +1012,8 @@ ...@@ -1012,8 +1012,8 @@
{"type": "float", "name": "edge1"}, {"type": "float", "name": "edge1"},
{"type": "vec2", "name": "x"} {"type": "vec2", "name": "x"}
] ]
}, },
{ {
"name": "smoothstep", "name": "smoothstep",
"return_type": "vec3", "return_type": "vec3",
"parameter": [ "parameter": [
...@@ -1021,8 +1021,8 @@ ...@@ -1021,8 +1021,8 @@
{"type": "float", "name": "edge1"}, {"type": "float", "name": "edge1"},
{"type": "vec3", "name": "x"} {"type": "vec3", "name": "x"}
] ]
}, },
{ {
"name": "smoothstep", "name": "smoothstep",
"return_type": "vec4", "return_type": "vec4",
"parameter": [ "parameter": [
...@@ -1030,136 +1030,136 @@ ...@@ -1030,136 +1030,136 @@
{"type": "float", "name": "edge1"}, {"type": "float", "name": "edge1"},
{"type": "vec4", "name": "x"} {"type": "vec4", "name": "x"}
] ]
}, },
{ {
"name": "length", "name": "length",
"return_type": "float", "return_type": "float",
"parameter": [ "parameter": [
{"type": "float", "name": "x"} {"type": "float", "name": "x"}
] ]
}, },
{ {
"name": "length", "name": "length",
"return_type": "float", "return_type": "float",
"parameter": [ "parameter": [
{"type": "vec2", "name": "x"} {"type": "vec2", "name": "x"}
] ]
}, },
{ {
"name": "length", "name": "length",
"return_type": "float", "return_type": "float",
"parameter": [ "parameter": [
{"type": "vec3", "name": "x"} {"type": "vec3", "name": "x"}
] ]
}, },
{ {
"name": "length", "name": "length",
"return_type": "float", "return_type": "float",
"parameter": [ "parameter": [
{"type": "vec4", "name": "x"} {"type": "vec4", "name": "x"}
] ]
}, },
{ {
"name": "distance", "name": "distance",
"return_type": "float", "return_type": "float",
"parameter": [ "parameter": [
{"type": "float", "name": "p0"}, {"type": "float", "name": "p0"},
{"type": "float", "name": "p1"} {"type": "float", "name": "p1"}
] ]
}, },
{ {
"name": "distance", "name": "distance",
"return_type": "float", "return_type": "float",
"parameter": [ "parameter": [
{"type": "vec2", "name": "p0"}, {"type": "vec2", "name": "p0"},
{"type": "vec2", "name": "p1"} {"type": "vec2", "name": "p1"}
] ]
}, },
{ {
"name": "distance", "name": "distance",
"return_type": "float", "return_type": "float",
"parameter": [ "parameter": [
{"type": "vec3", "name": "p0"}, {"type": "vec3", "name": "p0"},
{"type": "vec3", "name": "p1"} {"type": "vec3", "name": "p1"}
] ]
}, },
{ {
"name": "distance", "name": "distance",
"return_type": "float", "return_type": "float",
"parameter": [ "parameter": [
{"type": "vec4", "name": "p0"}, {"type": "vec4", "name": "p0"},
{"type": "vec4", "name": "p1"} {"type": "vec4", "name": "p1"}
] ]
}, },
{ {
"name": "dot", "name": "dot",
"return_type": "float", "return_type": "float",
"parameter": [ "parameter": [
{"type": "float", "name": "x"}, {"type": "float", "name": "x"},
{"type": "float", "name": "y"} {"type": "float", "name": "y"}
] ]
}, },
{ {
"name": "dot", "name": "dot",
"return_type": "float", "return_type": "float",
"parameter": [ "parameter": [
{"type": "vec2", "name": "x"}, {"type": "vec2", "name": "x"},
{"type": "vec2", "name": "y"} {"type": "vec2", "name": "y"}
] ]
}, },
{ {
"name": "dot", "name": "dot",
"return_type": "float", "return_type": "float",
"parameter": [ "parameter": [
{"type": "vec3", "name": "x"}, {"type": "vec3", "name": "x"},
{"type": "vec3", "name": "y"} {"type": "vec3", "name": "y"}
] ]
}, },
{ {
"name": "dot", "name": "dot",
"return_type": "float", "return_type": "float",
"parameter": [ "parameter": [
{"type": "vec4", "name": "x"}, {"type": "vec4", "name": "x"},
{"type": "vec4", "name": "y"} {"type": "vec4", "name": "y"}
] ]
}, },
{ {
"name": "cross", "name": "cross",
"return_type": "vec3", "return_type": "vec3",
"parameter": [ "parameter": [
{"type": "vec3", "name": "x"}, {"type": "vec3", "name": "x"},
{"type": "vec3", "name": "y"} {"type": "vec3", "name": "y"}
] ]
}, },
{ {
"name": "normalize", "name": "normalize",
"return_type": "float", "return_type": "float",
"parameter": [ "parameter": [
{"type": "float", "name": "x"} {"type": "float", "name": "x"}
] ]
}, },
{ {
"name": "normalize", "name": "normalize",
"return_type": "vec2", "return_type": "vec2",
"parameter": [ "parameter": [
{"type": "vec2", "name": "x"} {"type": "vec2", "name": "x"}
] ]
}, },
{ {
"name": "normalize", "name": "normalize",
"return_type": "vec3", "return_type": "vec3",
"parameter": [ "parameter": [
{"type": "vec3", "name": "x"} {"type": "vec3", "name": "x"}
] ]
}, },
{ {
"name": "normalize", "name": "normalize",
"return_type": "vec4", "return_type": "vec4",
"parameter": [ "parameter": [
{"type": "vec4", "name": "x"} {"type": "vec4", "name": "x"}
] ]
}, },
{ {
"name": "faceforward", "name": "faceforward",
"return_type": "float", "return_type": "float",
"parameter": [ "parameter": [
...@@ -1167,8 +1167,8 @@ ...@@ -1167,8 +1167,8 @@
{"type": "float", "name": "I"}, {"type": "float", "name": "I"},
{"type": "float", "name": "Nref"} {"type": "float", "name": "Nref"}
] ]
}, },
{ {
"name": "faceforward", "name": "faceforward",
"return_type": "vec2", "return_type": "vec2",
"parameter": [ "parameter": [
...@@ -1176,8 +1176,8 @@ ...@@ -1176,8 +1176,8 @@
{"type": "vec2", "name": "I"}, {"type": "vec2", "name": "I"},
{"type": "vec2", "name": "Nref"} {"type": "vec2", "name": "Nref"}
] ]
}, },
{ {
"name": "faceforward", "name": "faceforward",
"return_type": "vec3", "return_type": "vec3",
"parameter": [ "parameter": [
...@@ -1185,8 +1185,8 @@ ...@@ -1185,8 +1185,8 @@
{"type": "vec3", "name": "I"}, {"type": "vec3", "name": "I"},
{"type": "vec3", "name": "Nref"} {"type": "vec3", "name": "Nref"}
] ]
}, },
{ {
"name": "faceforward", "name": "faceforward",
"return_type": "vec4", "return_type": "vec4",
"parameter": [ "parameter": [
...@@ -1194,40 +1194,40 @@ ...@@ -1194,40 +1194,40 @@
{"type": "vec4", "name": "I"}, {"type": "vec4", "name": "I"},
{"type": "vec4", "name": "Nref"} {"type": "vec4", "name": "Nref"}
] ]
}, },
{ {
"name": "reflect", "name": "reflect",
"return_type": "float", "return_type": "float",
"parameter": [ "parameter": [
{"type": "float", "name": "I"}, {"type": "float", "name": "I"},
{"type": "float", "name": "N"} {"type": "float", "name": "N"}
] ]
}, },
{ {
"name": "reflect", "name": "reflect",
"return_type": "vec2", "return_type": "vec2",
"parameter": [ "parameter": [
{"type": "vec2", "name": "I"}, {"type": "vec2", "name": "I"},
{"type": "vec2", "name": "N"} {"type": "vec2", "name": "N"}
] ]
}, },
{ {
"name": "reflect", "name": "reflect",
"return_type": "vec3", "return_type": "vec3",
"parameter": [ "parameter": [
{"type": "vec3", "name": "I"}, {"type": "vec3", "name": "I"},
{"type": "vec3", "name": "N"} {"type": "vec3", "name": "N"}
] ]
}, },
{ {
"name": "reflect", "name": "reflect",
"return_type": "vec4", "return_type": "vec4",
"parameter": [ "parameter": [
{"type": "vec4", "name": "I"}, {"type": "vec4", "name": "I"},
{"type": "vec4", "name": "N"} {"type": "vec4", "name": "N"}
] ]
}, },
{ {
"name": "refract", "name": "refract",
"return_type": "float", "return_type": "float",
"parameter": [ "parameter": [
...@@ -1235,8 +1235,8 @@ ...@@ -1235,8 +1235,8 @@
{"type": "float", "name": "N"}, {"type": "float", "name": "N"},
{"type": "float", "name": "eta"} {"type": "float", "name": "eta"}
] ]
}, },
{ {
"name": "refract", "name": "refract",
"return_type": "vec2", "return_type": "vec2",
"parameter": [ "parameter": [
...@@ -1244,8 +1244,8 @@ ...@@ -1244,8 +1244,8 @@
{"type": "vec2", "name": "N"}, {"type": "vec2", "name": "N"},
{"type": "float", "name": "eta"} {"type": "float", "name": "eta"}
] ]
}, },
{ {
"name": "refract", "name": "refract",
"return_type": "vec3", "return_type": "vec3",
"parameter": [ "parameter": [
...@@ -1253,8 +1253,8 @@ ...@@ -1253,8 +1253,8 @@
{"type": "vec3", "name": "N"}, {"type": "vec3", "name": "N"},
{"type": "float", "name": "eta"} {"type": "float", "name": "eta"}
] ]
}, },
{ {
"name": "refract", "name": "refract",
"return_type": "vec4", "return_type": "vec4",
"parameter": [ "parameter": [
...@@ -1262,463 +1262,463 @@ ...@@ -1262,463 +1262,463 @@
{"type": "vec4", "name": "N"}, {"type": "vec4", "name": "N"},
{"type": "float", "name": "eta"} {"type": "float", "name": "eta"}
] ]
}, },
{ {
"name": "matrixCompMult", "name": "matrixCompMult",
"return_type": "mat2", "return_type": "mat2",
"parameter": [ "parameter": [
{"type": "mat2", "name": "x"}, {"type": "mat2", "name": "x"},
{"type": "mat2", "name": "y"} {"type": "mat2", "name": "y"}
] ]
}, },
{ {
"name": "matrixCompMult", "name": "matrixCompMult",
"return_type": "mat3", "return_type": "mat3",
"parameter": [ "parameter": [
{"type": "mat3", "name": "x"}, {"type": "mat3", "name": "x"},
{"type": "mat3", "name": "y"} {"type": "mat3", "name": "y"}
] ]
}, },
{ {
"name": "matrixCompMult", "name": "matrixCompMult",
"return_type": "mat4", "return_type": "mat4",
"parameter": [ "parameter": [
{"type": "mat4", "name": "x"}, {"type": "mat4", "name": "x"},
{"type": "mat4", "name": "y"} {"type": "mat4", "name": "y"}
] ]
}, },
{ {
"name": "lessThan", "name": "lessThan",
"return_type": "bvec2", "return_type": "bvec2",
"parameter": [ "parameter": [
{"type": "vec2", "name": "x"}, {"type": "vec2", "name": "x"},
{"type": "vec2", "name": "y"} {"type": "vec2", "name": "y"}
] ]
}, },
{ {
"name": "lessThan", "name": "lessThan",
"return_type": "bvec3", "return_type": "bvec3",
"parameter": [ "parameter": [
{"type": "vec3", "name": "x"}, {"type": "vec3", "name": "x"},
{"type": "vec3", "name": "y"} {"type": "vec3", "name": "y"}
] ]
}, },
{ {
"name": "lessThan", "name": "lessThan",
"return_type": "bvec4", "return_type": "bvec4",
"parameter": [ "parameter": [
{"type": "vec4", "name": "x"}, {"type": "vec4", "name": "x"},
{"type": "vec4", "name": "y"} {"type": "vec4", "name": "y"}
] ]
}, },
{ {
"name": "lessThan", "name": "lessThan",
"return_type": "bvec2", "return_type": "bvec2",
"parameter": [ "parameter": [
{"type": "ivec2", "name": "x"}, {"type": "ivec2", "name": "x"},
{"type": "ivec2", "name": "y"} {"type": "ivec2", "name": "y"}
] ]
}, },
{ {
"name": "lessThan", "name": "lessThan",
"return_type": "bvec3", "return_type": "bvec3",
"parameter": [ "parameter": [
{"type": "ivec3", "name": "x"}, {"type": "ivec3", "name": "x"},
{"type": "ivec3", "name": "y"} {"type": "ivec3", "name": "y"}
] ]
}, },
{ {
"name": "lessThan", "name": "lessThan",
"return_type": "bvec4", "return_type": "bvec4",
"parameter": [ "parameter": [
{"type": "ivec4", "name": "x"}, {"type": "ivec4", "name": "x"},
{"type": "ivec4", "name": "y"} {"type": "ivec4", "name": "y"}
] ]
}, },
{ {
"name": "lessThanEqual", "name": "lessThanEqual",
"return_type": "bvec2", "return_type": "bvec2",
"parameter": [ "parameter": [
{"type": "vec2", "name": "x"}, {"type": "vec2", "name": "x"},
{"type": "vec2", "name": "y"} {"type": "vec2", "name": "y"}
] ]
}, },
{ {
"name": "lessThanEqual", "name": "lessThanEqual",
"return_type": "bvec3", "return_type": "bvec3",
"parameter": [ "parameter": [
{"type": "vec3", "name": "x"}, {"type": "vec3", "name": "x"},
{"type": "vec3", "name": "y"} {"type": "vec3", "name": "y"}
] ]
}, },
{ {
"name": "lessThanEqual", "name": "lessThanEqual",
"return_type": "bvec4", "return_type": "bvec4",
"parameter": [ "parameter": [
{"type": "vec4", "name": "x"}, {"type": "vec4", "name": "x"},
{"type": "vec4", "name": "y"} {"type": "vec4", "name": "y"}
] ]
}, },
{ {
"name": "lessThanEqual", "name": "lessThanEqual",
"return_type": "bvec2", "return_type": "bvec2",
"parameter": [ "parameter": [
{"type": "ivec2", "name": "x"}, {"type": "ivec2", "name": "x"},
{"type": "ivec2", "name": "y"} {"type": "ivec2", "name": "y"}
] ]
}, },
{ {
"name": "lessThanEqual", "name": "lessThanEqual",
"return_type": "bvec3", "return_type": "bvec3",
"parameter": [ "parameter": [
{"type": "ivec3", "name": "x"}, {"type": "ivec3", "name": "x"},
{"type": "ivec3", "name": "y"} {"type": "ivec3", "name": "y"}
] ]
}, },
{ {
"name": "lessThanEqual", "name": "lessThanEqual",
"return_type": "bvec4", "return_type": "bvec4",
"parameter": [ "parameter": [
{"type": "ivec4", "name": "x"}, {"type": "ivec4", "name": "x"},
{"type": "ivec4", "name": "y"} {"type": "ivec4", "name": "y"}
] ]
}, },
{ {
"name": "greaterThan", "name": "greaterThan",
"return_type": "bvec2", "return_type": "bvec2",
"parameter": [ "parameter": [
{"type": "vec2", "name": "x"}, {"type": "vec2", "name": "x"},
{"type": "vec2", "name": "y"} {"type": "vec2", "name": "y"}
] ]
}, },
{ {
"name": "greaterThan", "name": "greaterThan",
"return_type": "bvec3", "return_type": "bvec3",
"parameter": [ "parameter": [
{"type": "vec3", "name": "x"}, {"type": "vec3", "name": "x"},
{"type": "vec3", "name": "y"} {"type": "vec3", "name": "y"}
] ]
}, },
{ {
"name": "greaterThan", "name": "greaterThan",
"return_type": "bvec4", "return_type": "bvec4",
"parameter": [ "parameter": [
{"type": "vec4", "name": "x"}, {"type": "vec4", "name": "x"},
{"type": "vec4", "name": "y"} {"type": "vec4", "name": "y"}
] ]
}, },
{ {
"name": "greaterThan", "name": "greaterThan",
"return_type": "bvec2", "return_type": "bvec2",
"parameter": [ "parameter": [
{"type": "ivec2", "name": "x"}, {"type": "ivec2", "name": "x"},
{"type": "ivec2", "name": "y"} {"type": "ivec2", "name": "y"}
] ]
}, },
{ {
"name": "greaterThan", "name": "greaterThan",
"return_type": "bvec3", "return_type": "bvec3",
"parameter": [ "parameter": [
{"type": "ivec3", "name": "x"}, {"type": "ivec3", "name": "x"},
{"type": "ivec3", "name": "y"} {"type": "ivec3", "name": "y"}
] ]
}, },
{ {
"name": "greaterThan", "name": "greaterThan",
"return_type": "bvec4", "return_type": "bvec4",
"parameter": [ "parameter": [
{"type": "ivec4", "name": "x"}, {"type": "ivec4", "name": "x"},
{"type": "ivec4", "name": "y"} {"type": "ivec4", "name": "y"}
] ]
}, },
{ {
"name": "greaterThanEqual", "name": "greaterThanEqual",
"return_type": "bvec2", "return_type": "bvec2",
"parameter": [ "parameter": [
{"type": "vec2", "name": "x"}, {"type": "vec2", "name": "x"},
{"type": "vec2", "name": "y"} {"type": "vec2", "name": "y"}
] ]
}, },
{ {
"name": "greaterThanEqual", "name": "greaterThanEqual",
"return_type": "bvec3", "return_type": "bvec3",
"parameter": [ "parameter": [
{"type": "vec3", "name": "x"}, {"type": "vec3", "name": "x"},
{"type": "vec3", "name": "y"} {"type": "vec3", "name": "y"}
] ]
}, },
{ {
"name": "greaterThanEqual", "name": "greaterThanEqual",
"return_type": "bvec4", "return_type": "bvec4",
"parameter": [ "parameter": [
{"type": "vec4", "name": "x"}, {"type": "vec4", "name": "x"},
{"type": "vec4", "name": "y"} {"type": "vec4", "name": "y"}
] ]
}, },
{ {
"name": "greaterThanEqual", "name": "greaterThanEqual",
"return_type": "bvec2", "return_type": "bvec2",
"parameter": [ "parameter": [
{"type": "ivec2", "name": "x"}, {"type": "ivec2", "name": "x"},
{"type": "ivec2", "name": "y"} {"type": "ivec2", "name": "y"}
] ]
}, },
{ {
"name": "greaterThanEqual", "name": "greaterThanEqual",
"return_type": "bvec3", "return_type": "bvec3",
"parameter": [ "parameter": [
{"type": "ivec3", "name": "x"}, {"type": "ivec3", "name": "x"},
{"type": "ivec3", "name": "y"} {"type": "ivec3", "name": "y"}
] ]
}, },
{ {
"name": "greaterThanEqual", "name": "greaterThanEqual",
"return_type": "bvec4", "return_type": "bvec4",
"parameter": [ "parameter": [
{"type": "ivec4", "name": "x"}, {"type": "ivec4", "name": "x"},
{"type": "ivec4", "name": "y"} {"type": "ivec4", "name": "y"}
] ]
}, },
{ {
"name": "equal", "name": "equal",
"return_type": "bvec2", "return_type": "bvec2",
"parameter": [ "parameter": [
{"type": "vec2", "name": "x"}, {"type": "vec2", "name": "x"},
{"type": "vec2", "name": "y"} {"type": "vec2", "name": "y"}
] ]
}, },
{ {
"name": "equal", "name": "equal",
"return_type": "bvec3", "return_type": "bvec3",
"parameter": [ "parameter": [
{"type": "vec3", "name": "x"}, {"type": "vec3", "name": "x"},
{"type": "vec3", "name": "y"} {"type": "vec3", "name": "y"}
] ]
}, },
{ {
"name": "equal", "name": "equal",
"return_type": "bvec4", "return_type": "bvec4",
"parameter": [ "parameter": [
{"type": "vec4", "name": "x"}, {"type": "vec4", "name": "x"},
{"type": "vec4", "name": "y"} {"type": "vec4", "name": "y"}
] ]
}, },
{ {
"name": "equal", "name": "equal",
"return_type": "bvec2", "return_type": "bvec2",
"parameter": [ "parameter": [
{"type": "ivec2", "name": "x"}, {"type": "ivec2", "name": "x"},
{"type": "ivec2", "name": "y"} {"type": "ivec2", "name": "y"}
] ]
}, },
{ {
"name": "equal", "name": "equal",
"return_type": "bvec3", "return_type": "bvec3",
"parameter": [ "parameter": [
{"type": "ivec3", "name": "x"}, {"type": "ivec3", "name": "x"},
{"type": "ivec3", "name": "y"} {"type": "ivec3", "name": "y"}
] ]
}, },
{ {
"name": "equal", "name": "equal",
"return_type": "bvec4", "return_type": "bvec4",
"parameter": [ "parameter": [
{"type": "ivec4", "name": "x"}, {"type": "ivec4", "name": "x"},
{"type": "ivec4", "name": "y"} {"type": "ivec4", "name": "y"}
] ]
}, },
{ {
"name": "equal", "name": "equal",
"return_type": "bvec2", "return_type": "bvec2",
"parameter": [ "parameter": [
{"type": "bvec2", "name": "x"}, {"type": "bvec2", "name": "x"},
{"type": "bvec2", "name": "y"} {"type": "bvec2", "name": "y"}
] ]
}, },
{ {
"name": "equal", "name": "equal",
"return_type": "bvec3", "return_type": "bvec3",
"parameter": [ "parameter": [
{"type": "bvec3", "name": "x"}, {"type": "bvec3", "name": "x"},
{"type": "bvec3", "name": "y"} {"type": "bvec3", "name": "y"}
] ]
}, },
{ {
"name": "equal", "name": "equal",
"return_type": "bvec4", "return_type": "bvec4",
"parameter": [ "parameter": [
{"type": "bvec4", "name": "x"}, {"type": "bvec4", "name": "x"},
{"type": "bvec4", "name": "y"} {"type": "bvec4", "name": "y"}
] ]
}, },
{ {
"name": "notEqual", "name": "notEqual",
"return_type": "bvec2", "return_type": "bvec2",
"parameter": [ "parameter": [
{"type": "vec2", "name": "x"}, {"type": "vec2", "name": "x"},
{"type": "vec2", "name": "y"} {"type": "vec2", "name": "y"}
] ]
}, },
{ {
"name": "notEqual", "name": "notEqual",
"return_type": "bvec3", "return_type": "bvec3",
"parameter": [ "parameter": [
{"type": "vec3", "name": "x"}, {"type": "vec3", "name": "x"},
{"type": "vec3", "name": "y"} {"type": "vec3", "name": "y"}
] ]
}, },
{ {
"name": "notEqual", "name": "notEqual",
"return_type": "bvec4", "return_type": "bvec4",
"parameter": [ "parameter": [
{"type": "vec4", "name": "x"}, {"type": "vec4", "name": "x"},
{"type": "vec4", "name": "y"} {"type": "vec4", "name": "y"}
] ]
}, },
{ {
"name": "notEqual", "name": "notEqual",
"return_type": "bvec2", "return_type": "bvec2",
"parameter": [ "parameter": [
{"type": "ivec2", "name": "x"}, {"type": "ivec2", "name": "x"},
{"type": "ivec2", "name": "y"} {"type": "ivec2", "name": "y"}
] ]
}, },
{ {
"name": "notEqual", "name": "notEqual",
"return_type": "bvec3", "return_type": "bvec3",
"parameter": [ "parameter": [
{"type": "ivec3", "name": "x"}, {"type": "ivec3", "name": "x"},
{"type": "ivec3", "name": "y"} {"type": "ivec3", "name": "y"}
] ]
}, },
{ {
"name": "notEqual", "name": "notEqual",
"return_type": "bvec4", "return_type": "bvec4",
"parameter": [ "parameter": [
{"type": "ivec4", "name": "x"}, {"type": "ivec4", "name": "x"},
{"type": "ivec4", "name": "y"} {"type": "ivec4", "name": "y"}
] ]
}, },
{ {
"name": "notEqual", "name": "notEqual",
"return_type": "bvec2", "return_type": "bvec2",
"parameter": [ "parameter": [
{"type": "bvec2", "name": "x"}, {"type": "bvec2", "name": "x"},
{"type": "bvec2", "name": "y"} {"type": "bvec2", "name": "y"}
] ]
}, },
{ {
"name": "notEqual", "name": "notEqual",
"return_type": "bvec3", "return_type": "bvec3",
"parameter": [ "parameter": [
{"type": "bvec3", "name": "x"}, {"type": "bvec3", "name": "x"},
{"type": "bvec3", "name": "y"} {"type": "bvec3", "name": "y"}
] ]
}, },
{ {
"name": "notEqual", "name": "notEqual",
"return_type": "bvec4", "return_type": "bvec4",
"parameter": [ "parameter": [
{"type": "bvec4", "name": "x"}, {"type": "bvec4", "name": "x"},
{"type": "bvec4", "name": "y"} {"type": "bvec4", "name": "y"}
] ]
}, },
{ {
"name": "any", "name": "any",
"return_type": "bool", "return_type": "bool",
"parameter": [ "parameter": [
{"type": "bvec2", "name": "x"} {"type": "bvec2", "name": "x"}
] ]
}, },
{ {
"name": "any", "name": "any",
"return_type": "bool", "return_type": "bool",
"parameter": [ "parameter": [
{"type": "bvec3", "name": "x"} {"type": "bvec3", "name": "x"}
] ]
}, },
{ {
"name": "any", "name": "any",
"return_type": "bool", "return_type": "bool",
"parameter": [ "parameter": [
{"type": "bvec4", "name": "x"} {"type": "bvec4", "name": "x"}
] ]
}, },
{ {
"name": "all", "name": "all",
"return_type": "bool", "return_type": "bool",
"parameter": [ "parameter": [
{"type": "bvec2", "name": "x"} {"type": "bvec2", "name": "x"}
] ]
}, },
{ {
"name": "all", "name": "all",
"return_type": "bool", "return_type": "bool",
"parameter": [ "parameter": [
{"type": "bvec3", "name": "x"} {"type": "bvec3", "name": "x"}
] ]
}, },
{ {
"name": "all", "name": "all",
"return_type": "bool", "return_type": "bool",
"parameter": [ "parameter": [
{"type": "bvec4", "name": "x"} {"type": "bvec4", "name": "x"}
] ]
}, },
{ {
"name": "not", "name": "not",
"return_type": "bvec2", "return_type": "bvec2",
"parameter": [ "parameter": [
{"type": "bvec2", "name": "x"} {"type": "bvec2", "name": "x"}
] ]
}, },
{ {
"name": "not", "name": "not",
"return_type": "bvec3", "return_type": "bvec3",
"parameter": [ "parameter": [
{"type": "bvec3", "name": "x"} {"type": "bvec3", "name": "x"}
] ]
}, },
{ {
"name": "not", "name": "not",
"return_type": "bvec4", "return_type": "bvec4",
"parameter": [ "parameter": [
{"type": "bvec4", "name": "x"} {"type": "bvec4", "name": "x"}
] ]
}, },
{ {
"name": "texture2D", "name": "texture2D",
"return_type": "vec4", "return_type": "vec4",
"parameter": [ "parameter": [
{"type": "sampler2D", "name": "sampler"}, {"type": "sampler2D", "name": "sampler"},
{"type": "vec2", "name": "coord"} {"type": "vec2", "name": "coord"}
] ]
}, },
{ {
"name": "texture2DProj", "name": "texture2DProj",
"return_type": "vec4", "return_type": "vec4",
"parameter": [ "parameter": [
{"type": "sampler2D", "name": "sampler"}, {"type": "sampler2D", "name": "sampler"},
{"type": "vec3", "name": "coord"} {"type": "vec3", "name": "coord"}
] ]
}, },
{ {
"name": "texture2DProj", "name": "texture2DProj",
"return_type": "vec4", "return_type": "vec4",
"parameter": [ "parameter": [
{"type": "sampler2D", "name": "sampler"}, {"type": "sampler2D", "name": "sampler"},
{"type": "vec4", "name": "coord"} {"type": "vec4", "name": "coord"}
] ]
}, },
{ {
"name": "textureCube", "name": "textureCube",
"return_type": "vec4", "return_type": "vec4",
"parameter": [ "parameter": [
{"type": "samplerCube", "name": "sampler"}, {"type": "samplerCube", "name": "sampler"},
{"type": "vec3", "name": "coord"} {"type": "vec3", "name": "coord"}
] ]
}, },
{ {
"name": "texture2D", "name": "texture2D",
"return_type": "vec4", "return_type": "vec4",
"parameter": [ "parameter": [
...@@ -1726,8 +1726,8 @@ ...@@ -1726,8 +1726,8 @@
{"type": "vec2", "name": "coord"} {"type": "vec2", "name": "coord"}
], ],
"condition":"resources.OES_EGL_image_external" "condition":"resources.OES_EGL_image_external"
}, },
{ {
"name": "texture2DProj", "name": "texture2DProj",
"return_type": "vec4", "return_type": "vec4",
"parameter": [ "parameter": [
...@@ -1735,8 +1735,8 @@ ...@@ -1735,8 +1735,8 @@
{"type": "vec3", "name": "coord"} {"type": "vec3", "name": "coord"}
], ],
"condition":"resources.OES_EGL_image_external" "condition":"resources.OES_EGL_image_external"
}, },
{ {
"name": "texture2DProj", "name": "texture2DProj",
"return_type": "vec4", "return_type": "vec4",
"parameter": [ "parameter": [
...@@ -1744,8 +1744,8 @@ ...@@ -1744,8 +1744,8 @@
{"type": "vec4", "name": "coord"} {"type": "vec4", "name": "coord"}
], ],
"condition":"resources.OES_EGL_image_external" "condition":"resources.OES_EGL_image_external"
}, },
{ {
"name": "texture2DRect", "name": "texture2DRect",
"return_type": "vec4", "return_type": "vec4",
"parameter": [ "parameter": [
...@@ -1753,8 +1753,8 @@ ...@@ -1753,8 +1753,8 @@
{"type": "vec2", "name": "coord"} {"type": "vec2", "name": "coord"}
], ],
"condition":"resources.ARB_texture_rectangle" "condition":"resources.ARB_texture_rectangle"
}, },
{ {
"name": "texture2DRectProj", "name": "texture2DRectProj",
"return_type": "vec4", "return_type": "vec4",
"parameter": [ "parameter": [
...@@ -1762,8 +1762,8 @@ ...@@ -1762,8 +1762,8 @@
{"type": "vec3", "name": "coord"} {"type": "vec3", "name": "coord"}
], ],
"condition":"resources.ARB_texture_rectangle" "condition":"resources.ARB_texture_rectangle"
}, },
{ {
"name": "texture2DRectProj", "name": "texture2DRectProj",
"return_type": "vec4", "return_type": "vec4",
"parameter": [ "parameter": [
...@@ -1771,6 +1771,46 @@ ...@@ -1771,6 +1771,46 @@
{"type": "vec4", "name": "coord"} {"type": "vec4", "name": "coord"}
], ],
"condition":"resources.ARB_texture_rectangle" "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"}
]
}
] ]
} }
...@@ -38,6 +38,7 @@ static void builtin1(TSymbolTable* t, TType* rvalue, const char* name, TType* pt ...@@ -38,6 +38,7 @@ static void builtin1(TSymbolTable* t, TType* rvalue, const char* name, TType* pt
f->addParameter(param); f->addParameter(param);
t->insert(*f); t->insert(*f);
} }
static void builtin2(TSymbolTable* t, TType* rvalue, const char* name, TType* ptype1, const char* pname1, TType* ptype2, const char* pname2) 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); TFunction* f = new TFunction(new TString(name), *rvalue);
...@@ -59,13 +60,13 @@ static void builtin3(TSymbolTable* t, TType* rvalue, const char* name, TType* pt ...@@ -59,13 +60,13 @@ static void builtin3(TSymbolTable* t, TType* rvalue, const char* name, TType* pt
f->addParameter(param3); f->addParameter(param3);
t->insert(*f); t->insert(*f);
} }
""" """
output.write(registerfunc) output.write(registerfunc)
commonHeader = "void InsertBuiltInFunctionsCommon(const ShBuiltInResources& resources, TSymbolTable * t) {\n" # A function that parses the JSON representation of a list of builtin functions.
output.write(commonHeader) def parseBuiltin(name):
for func in builtin[name]:
for func in builtin["common"]:
out = "" out = ""
indent = " "; indent = " ";
size = len(func['parameter']) size = len(func['parameter'])
...@@ -85,7 +86,16 @@ for func in builtin["common"]: ...@@ -85,7 +86,16 @@ for func in builtin["common"]:
if 'condition' in func: if 'condition' in func:
out += " }\n" out += " }\n"
output.write(out) 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() json_data.close()
output.close() output.close()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment