aboutsummaryrefslogtreecommitdiff
path: root/js/helper-classes/RDGE/src/core/script/precompiled.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/helper-classes/RDGE/src/core/script/precompiled.js')
-rwxr-xr-xjs/helper-classes/RDGE/src/core/script/precompiled.js196
1 files changed, 98 insertions, 98 deletions
diff --git a/js/helper-classes/RDGE/src/core/script/precompiled.js b/js/helper-classes/RDGE/src/core/script/precompiled.js
index a83631b9..a77029b8 100755
--- a/js/helper-classes/RDGE/src/core/script/precompiled.js
+++ b/js/helper-classes/RDGE/src/core/script/precompiled.js
@@ -1,98 +1,98 @@
1/* <copyright> 1/* <copyright>
2Copyright (c) 2012, Motorola Mobility, Inc 2Copyright (c) 2012, Motorola Mobility, Inc
3All Rights Reserved. 3All Rights Reserved.
4BSD License. 4BSD License.
5 5
6Redistribution and use in source and binary forms, with or without 6Redistribution and use in source and binary forms, with or without
7modification, are permitted provided that the following conditions are met: 7modification, are permitted provided that the following conditions are met:
8 8
9 - Redistributions of source code must retain the above copyright notice, 9 - Redistributions of source code must retain the above copyright notice,
10 this list of conditions and the following disclaimer. 10 this list of conditions and the following disclaimer.
11 - Redistributions in binary form must reproduce the above copyright 11 - Redistributions in binary form must reproduce the above copyright
12 notice, this list of conditions and the following disclaimer in the 12 notice, this list of conditions and the following disclaimer in the
13 documentation and/or other materials provided with the distribution. 13 documentation and/or other materials provided with the distribution.
14 - Neither the name of Motorola Mobility nor the names of its contributors 14 - Neither the name of Motorola Mobility nor the names of its contributors
15 may be used to endorse or promote products derived from this software 15 may be used to endorse or promote products derived from this software
16 without specific prior written permission. 16 without specific prior written permission.
17 17
18THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 21ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
22LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 27ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28POSSIBILITY OF SUCH DAMAGE. 28POSSIBILITY OF SUCH DAMAGE.
29</copyright> */ 29</copyright> */
30 30
31/* 31/*
32* A list of shared parameters that all shaders can support (the engine always try to bind these uniforms) 32* A list of shared parameters that all shaders can support (the engine always try to bind these uniforms)
33* These parameters are compiled into all jshaders and can be set from any jshader 33* These parameters are compiled into all jshaders and can be set from any jshader
34* with a call to jshader.global.u_matDiffuse.set([1,0,0,1]) if the jshader depends on that parameter. 34* with a call to jshader.global.u_matDiffuse.set([1,0,0,1]) if the jshader depends on that parameter.
35* To set directly call rdgeGlobalParameters.'param'.set(x), for example rdgeGlobalParameters.u_lightPos.set([1,1,1]) 35* To set directly call rdgeGlobalParameters.'param'.set(x), for example rdgeGlobalParameters.u_lightPos.set([1,1,1])
36* The values can be added to a jshaders params list - this will creating local jshader memory that binds to the parameter 36* The values can be added to a jshaders params list - this will creating local jshader memory that binds to the parameter
37* this parameter can be used to set the value for that shader but will not override the global setting 37* this parameter can be used to set the value for that shader but will not override the global setting
38* The values set here are the default global values. 38* The values set here are the default global values.
39* note: the rdge_lights substructure can be ignored, the final parameter list contains only the uniform objects 39* note: the rdge_lights substructure can be ignored, the final parameter list contains only the uniform objects
40*/ 40*/
41 41
42var RDGE = RDGE || {}; 42var RDGE = RDGE || {};
43 43
44 44
45 45
46RDGE.rdgeGlobalParameters = 46RDGE.rdgeGlobalParameters =
47{ 47{
48 "u_projMatrix": { 'type': 'mat4', 'data': RDGE.mat4.identity() }, 48 "u_projMatrix": { 'type': 'mat4', 'data': RDGE.mat4.identity() },
49 "u_mvMatrix": { 'type': 'mat4', 'data': RDGE.mat4.identity() }, 49 "u_mvMatrix": { 'type': 'mat4', 'data': RDGE.mat4.identity() },
50 "u_invMvMatrix": { 'type': 'mat4', 'data': RDGE.mat4.identity() }, 50 "u_invMvMatrix": { 'type': 'mat4', 'data': RDGE.mat4.identity() },
51 "u_normalMatrix": { 'type': 'mat4', 'data': RDGE.mat4.identity() }, 51 "u_normalMatrix": { 'type': 'mat4', 'data': RDGE.mat4.identity() },
52 "u_worldMatrix": { 'type': 'mat4', 'data': RDGE.mat4.identity() }, 52 "u_worldMatrix": { 'type': 'mat4', 'data': RDGE.mat4.identity() },
53 "u_viewMatrix": { 'type': 'mat4', 'data': RDGE.mat4.identity() }, 53 "u_viewMatrix": { 'type': 'mat4', 'data': RDGE.mat4.identity() },
54 "u_invViewMatrix": { 'type': 'mat4', 'data': RDGE.mat4.identity() }, 54 "u_invViewMatrix": { 'type': 'mat4', 'data': RDGE.mat4.identity() },
55 "u_invWorldMatrix": { 'type': 'mat4', 'data': RDGE.mat4.identity() }, 55 "u_invWorldMatrix": { 'type': 'mat4', 'data': RDGE.mat4.identity() },
56 "u_inv_viewport_width": { 'type': 'float', 'data': [1] }, 56 "u_inv_viewport_width": { 'type': 'float', 'data': [1] },
57 "u_inv_viewport_height": { 'type': 'float', 'data': [1] }, 57 "u_inv_viewport_height": { 'type': 'float', 'data': [1] },
58 "u_lightPos": { 'type': 'vec3', 'data': [-20.0, 50.0, 20.0] }, 58 "u_lightPos": { 'type': 'vec3', 'data': [-20.0, 50.0, 20.0] },
59 "u_lightDiff": { 'type': 'vec4', 'data': [0.8, 0.8, 0.8, 1] }, 59 "u_lightDiff": { 'type': 'vec4', 'data': [0.8, 0.8, 0.8, 1] },
60 "u_lightAmb": { 'type': 'vec4', 'data': [1.0000, 1.0000, 1.0000, 1.0] }, 60 "u_lightAmb": { 'type': 'vec4', 'data': [1.0000, 1.0000, 1.0000, 1.0] },
61 "rdge_lights": { 61 "rdge_lights": {
62 "u_light0Pos": { 'type': 'vec3', 'data': [-20.0, 50.0, 20.0] }, 62 "u_light0Pos": { 'type': 'vec3', 'data': [-20.0, 50.0, 20.0] },
63 "u_light0Diff": { 'type': 'vec4', 'data': [0.8, 0.8, 0.8, 1] }, 63 "u_light0Diff": { 'type': 'vec4', 'data': [0.8, 0.8, 0.8, 1] },
64 "u_light0Amb": { 'type': 'vec4', 'data': [0.0008, 0.0008, 0.0008, 1.0] }, 64 "u_light0Amb": { 'type': 'vec4', 'data': [0.0008, 0.0008, 0.0008, 1.0] },
65 "u_light0Spec": { 'type': 'vec4', 'data': [1.0, 1.0, 1.0, 1.0] }, 65 "u_light0Spec": { 'type': 'vec4', 'data': [1.0, 1.0, 1.0, 1.0] },
66 "u_light1Pos": { 'type': 'vec3', 'data': [0.0, 0.0, 0.0] }, 66 "u_light1Pos": { 'type': 'vec3', 'data': [0.0, 0.0, 0.0] },
67 "u_light1Diff": { 'type': 'vec4', 'data': [0.0, 0.0, 0.0, 0.0] }, 67 "u_light1Diff": { 'type': 'vec4', 'data': [0.0, 0.0, 0.0, 0.0] },
68 "u_light1Amb": { 'type': 'vec4', 'data': [0.5, 0.5, 0.5, 1.0] }, 68 "u_light1Amb": { 'type': 'vec4', 'data': [0.5, 0.5, 0.5, 1.0] },
69 "u_light1Spec": { 'type': 'vec4', 'data': [1.0, 1.0, 1.0, 1.0] }, 69 "u_light1Spec": { 'type': 'vec4', 'data': [1.0, 1.0, 1.0, 1.0] },
70 "u_light2Pos": { 'type': 'vec3', 'data': [0.0, 0.0, 0.0] }, 70 "u_light2Pos": { 'type': 'vec3', 'data': [0.0, 0.0, 0.0] },
71 "u_light2Diff": { 'type': 'vec4', 'data': [0.0, 0.0, 0.0, 1.0] }, 71 "u_light2Diff": { 'type': 'vec4', 'data': [0.0, 0.0, 0.0, 1.0] },
72 "u_light2Amb": { 'type': 'vec4', 'data': [0.5, 0.5, 0.5, 1.0] }, 72 "u_light2Amb": { 'type': 'vec4', 'data': [0.5, 0.5, 0.5, 1.0] },
73 "u_light2Spec": { 'type': 'vec4', 'data': [1.0, 1.0, 1.0, 1.0] }, 73 "u_light2Spec": { 'type': 'vec4', 'data': [1.0, 1.0, 1.0, 1.0] },
74 "u_light3Pos": { 'type': 'vec3', 'data': [0.0, 0.0, 0.0] }, 74 "u_light3Pos": { 'type': 'vec3', 'data': [0.0, 0.0, 0.0] },
75 "u_light3Diff": { 'type': 'vec4', 'data': [0.8, 0.8, 0.8, 1] }, 75 "u_light3Diff": { 'type': 'vec4', 'data': [0.8, 0.8, 0.8, 1] },
76 "u_light3Amb": { 'type': 'vec4', 'data': [0.5, 0.5, 0.5, 1.0] }, 76 "u_light3Amb": { 'type': 'vec4', 'data': [0.5, 0.5, 0.5, 1.0] },
77 "u_light3Spec": { 'type': 'vec4', 'data': [1.0, 1.0, 1.0, 1.0] } 77 "u_light3Spec": { 'type': 'vec4', 'data': [1.0, 1.0, 1.0, 1.0] }
78 }, 78 },
79 "colMap": { 'type': 'tex2d', 'data': "assets/images/white.png" }, 79 "colMap": { 'type': 'tex2d', 'data': "assets/images/white.png" },
80 //"envMap": {'type': 'tex2d', 'data': null}, 80 //"envMap": {'type': 'tex2d', 'data': null},
81 //"normalMap": {'type': 'tex2d', 'data': null}, 81 //"normalMap": {'type': 'tex2d', 'data': null},
82 //"glowMap": {'type': 'tex2d', 'data': "assets/images/black.png"}, 82 //"glowMap": {'type': 'tex2d', 'data': "assets/images/black.png"},
83 //"u_shadowDepthMap": {'type': 'tex2d', 'data': null}, 83 //"u_shadowDepthMap": {'type': 'tex2d', 'data': null},
84 //"u_depthMap": {'type': 'tex2d', 'data': null}, 84 //"u_depthMap": {'type': 'tex2d', 'data': null},
85 "u_matAmbient": { 'type': 'vec4', 'data': [1.00, 1.00, 1.00, 1] }, 85 "u_matAmbient": { 'type': 'vec4', 'data': [1.00, 1.00, 1.00, 1] },
86 "u_matDiffuse": { 'type': 'vec4', 'data': [1.0, 1.0, 1.0, 1.0] }, 86 "u_matDiffuse": { 'type': 'vec4', 'data': [1.0, 1.0, 1.0, 1.0] },
87 "u_matSpecular": { 'type': 'vec4', 'data': [1.0, 1.0, 1.0, 1.0] }, 87 "u_matSpecular": { 'type': 'vec4', 'data': [1.0, 1.0, 1.0, 1.0] },
88 "u_matShininess": { 'type': 'float', 'data': [128.0] }, 88 "u_matShininess": { 'type': 'float', 'data': [128.0] },
89 "u_matEmission": { 'type': 'float', 'data': [0.0, 0.0, 0.0, 1.0] }, 89 "u_matEmission": { 'type': 'float', 'data': [0.0, 0.0, 0.0, 1.0] },
90 "u_frustumFarZ": { 'type': 'float', 'data': [1000.0] }, 90 "u_frustumFarZ": { 'type': 'float', 'data': [1000.0] },
91 "u_shadowLightWorld": { 'type': 'mat4', 'data': RDGE.mat4.identity() }, 91 "u_shadowLightWorld": { 'type': 'mat4', 'data': RDGE.mat4.identity() },
92 "u_shadowBiasMatrix": { 'type': 'mat4', 'data': RDGE.mat4.identity() }, 92 "u_shadowBiasMatrix": { 'type': 'mat4', 'data': RDGE.mat4.identity() },
93 "u_vShadowLight": { 'type': 'mat4', 'data': RDGE.mat4.identity() }, 93 "u_vShadowLight": { 'type': 'mat4', 'data': RDGE.mat4.identity() },
94 "u_shadowBPV": { 'type': 'mat4', 'data': RDGE.mat4.identity() }, 94 "u_shadowBPV": { 'type': 'mat4', 'data': RDGE.mat4.identity() },
95 "u_farZ": { 'type': 'float', 'data': [1000] }, 95 "u_farZ": { 'type': 'float', 'data': [1000] },
96 "u_shadowLightFarZ": { 'type': 'float', 'data': [1000] }, 96 "u_shadowLightFarZ": { 'type': 'float', 'data': [1000] },
97 "u_cameraFTR": { 'type': 'vec3', 'data': [0.0, 0.0, 0.0] } 97 "u_cameraFTR": { 'type': 'vec3', 'data': [0.0, 0.0, 0.0] }
98}; 98};