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