From fb0a659c9ca3479fd6799325498b11f074689936 Mon Sep 17 00:00:00 2001 From: John Mayhew Date: Mon, 2 Apr 2012 14:57:31 -0700 Subject: -Namespaced all RDGE javascript. -Removed the following unused files from the build script /core/script/fx/blur.js /core/script/fx/ssao.js /core/script/animation.js - Fully removed the following from the build and from source control as they are unused or no longer needed /core/script/util/dbgpanel.js /core/script/util/fpsTracker.js /core/script/util/statTracker.js /core/script/input.js /core/script/TextureManager.js /core/script/ubershader.js --- .../RDGE/src/core/script/precompiled.js | 123 +++++++++++---------- 1 file changed, 64 insertions(+), 59 deletions(-) (limited to 'js/helper-classes/RDGE/src/core/script/precompiled.js') diff --git a/js/helper-classes/RDGE/src/core/script/precompiled.js b/js/helper-classes/RDGE/src/core/script/precompiled.js index bed94e4e..03e0bc0e 100755 --- a/js/helper-classes/RDGE/src/core/script/precompiled.js +++ b/js/helper-classes/RDGE/src/core/script/precompiled.js @@ -5,65 +5,70 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot */ /* - * A list of shared parameters that all shaders can support (the engine always try to bind these uniforms) - * These parameters are compiled into all jshaders and can be set from any jshader - * with a call to jshader.global.u_matDiffuse.set([1,0,0,1]) if the jshader depends on that parameter. - * To set directly call rdgeGlobalParameters.'param'.set(x), for example rdgeGlobalParameters.u_lightPos.set([1,1,1]) - * The values can be added to a jshaders params list - this will creating local jshader memory that binds to the parameter - * this parameter can be used to set the value for that shader but will not override the global setting - * The values set here are the default global values. - * note: the rdge_lights substructure can be ignored, the final parameter list contains only the uniform objects - */ +* A list of shared parameters that all shaders can support (the engine always try to bind these uniforms) +* These parameters are compiled into all jshaders and can be set from any jshader +* with a call to jshader.global.u_matDiffuse.set([1,0,0,1]) if the jshader depends on that parameter. +* To set directly call rdgeGlobalParameters.'param'.set(x), for example rdgeGlobalParameters.u_lightPos.set([1,1,1]) +* The values can be added to a jshaders params list - this will creating local jshader memory that binds to the parameter +* this parameter can be used to set the value for that shader but will not override the global setting +* The values set here are the default global values. +* note: the rdge_lights substructure can be ignored, the final parameter list contains only the uniform objects +*/ -rdgeGlobalParameters = +var RDGE = RDGE || {}; + + + +RDGE.rdgeGlobalParameters = { - "u_projMatrix": {'type': 'mat4', 'data': mat4.identity()}, - "u_mvMatrix": {'type': 'mat4', 'data': mat4.identity()}, - "u_invMvMatrix": {'type': 'mat4', 'data': mat4.identity()}, - "u_normalMatrix": {'type': 'mat4', 'data': mat4.identity()}, - "u_worldMatrix": {'type': 'mat4', 'data': mat4.identity()}, - "u_viewMatrix": {'type': 'mat4', 'data': mat4.identity()}, - "u_invViewMatrix": {'type': 'mat4', 'data': mat4.identity()}, - "u_invWorldMatrix": {'type': 'mat4', 'data': mat4.identity()}, - "u_inv_viewport_width": {'type': 'float', 'data': [1]}, - "u_inv_viewport_height":{'type': 'float', 'data': [1]}, - "u_lightPos": {'type': 'vec3', 'data': [-20.0, 50.0, 20.0]}, - "u_lightDiff": {'type': 'vec4', 'data': [0.8, 0.8, 0.8, 1]}, - "u_lightAmb": {'type': 'vec4', 'data': [1.0000, 1.0000, 1.0000, 1.0]}, - "rdge_lights": { - "u_light0Pos": {'type': 'vec3', 'data': [-20.0, 50.0, 20.0]}, - "u_light0Diff": {'type': 'vec4', 'data': [0.8, 0.8, 0.8, 1]}, - "u_light0Amb": {'type': 'vec4', 'data': [0.0008, 0.0008, 0.0008, 1.0]}, - "u_light0Spec": {'type': 'vec4', 'data': [1.0, 1.0, 1.0, 1.0]}, - "u_light1Pos": {'type': 'vec3', 'data': [0.0, 0.0, 0.0]}, - "u_light1Diff": {'type': 'vec4', 'data': [0.0, 0.0, 0.0, 0.0]}, - "u_light1Amb": {'type': 'vec4', 'data': [0.5, 0.5, 0.5, 1.0]}, - "u_light1Spec": {'type': 'vec4', 'data': [1.0, 1.0, 1.0, 1.0]}, - "u_light2Pos": {'type': 'vec3', 'data': [0.0, 0.0, 0.0]}, - "u_light2Diff": {'type': 'vec4', 'data': [0.0, 0.0, 0.0, 1.0]}, - "u_light2Amb": {'type': 'vec4', 'data': [0.5, 0.5, 0.5, 1.0]}, - "u_light2Spec": {'type': 'vec4', 'data': [1.0, 1.0, 1.0, 1.0]}, - "u_light3Pos": {'type': 'vec3', 'data': [0.0, 0.0, 0.0]}, - "u_light3Diff": {'type': 'vec4', 'data': [0.8, 0.8, 0.8, 1]}, - "u_light3Amb": {'type': 'vec4', 'data': [0.5, 0.5, 0.5, 1.0]}, - "u_light3Spec": {'type': 'vec4', 'data': [1.0, 1.0, 1.0, 1.0]}}, - "colMap": {'type': 'tex2d', 'data': "assets/images/white.png"}, - //"envMap": {'type': 'tex2d', 'data': null}, - //"normalMap": {'type': 'tex2d', 'data': null}, - //"glowMap": {'type': 'tex2d', 'data': "assets/images/black.png"}, - //"u_shadowDepthMap": {'type': 'tex2d', 'data': null}, - //"u_depthMap": {'type': 'tex2d', 'data': null}, - "u_matAmbient": {'type': 'vec4', 'data': [1.00,1.00,1.00, 1]}, - "u_matDiffuse": {'type': 'vec4', 'data': [1.0, 1.0, 1.0, 1.0]}, - "u_matSpecular": {'type': 'vec4', 'data': [1.0, 1.0, 1.0, 1.0]}, - "u_matShininess": {'type': 'float', 'data': [128.0]}, - "u_matEmission": {'type': 'float', 'data': [0.0, 0.0, 0.0, 1.0]}, - "u_frustumFarZ": {'type': 'float', 'data': [1000.0]}, - "u_shadowLightWorld": {'type': 'mat4', 'data': mat4.identity()}, - "u_shadowBiasMatrix": {'type': 'mat4', 'data': mat4.identity()}, - "u_vShadowLight": {'type': 'mat4', 'data': mat4.identity()}, - "u_shadowBPV": {'type': 'mat4', 'data': mat4.identity()}, - "u_farZ": {'type': 'float', 'data': [1000]}, - "u_shadowLightFarZ": {'type': 'float', 'data': [1000]}, - "u_cameraFTR": {'type': 'vec3', 'data':[0.0, 0.0, 0.0]} + "u_projMatrix": { 'type': 'mat4', 'data': RDGE.mat4.identity() }, + "u_mvMatrix": { 'type': 'mat4', 'data': RDGE.mat4.identity() }, + "u_invMvMatrix": { 'type': 'mat4', 'data': RDGE.mat4.identity() }, + "u_normalMatrix": { 'type': 'mat4', 'data': RDGE.mat4.identity() }, + "u_worldMatrix": { 'type': 'mat4', 'data': RDGE.mat4.identity() }, + "u_viewMatrix": { 'type': 'mat4', 'data': RDGE.mat4.identity() }, + "u_invViewMatrix": { 'type': 'mat4', 'data': RDGE.mat4.identity() }, + "u_invWorldMatrix": { 'type': 'mat4', 'data': RDGE.mat4.identity() }, + "u_inv_viewport_width": { 'type': 'float', 'data': [1] }, + "u_inv_viewport_height": { 'type': 'float', 'data': [1] }, + "u_lightPos": { 'type': 'vec3', 'data': [-20.0, 50.0, 20.0] }, + "u_lightDiff": { 'type': 'vec4', 'data': [0.8, 0.8, 0.8, 1] }, + "u_lightAmb": { 'type': 'vec4', 'data': [1.0000, 1.0000, 1.0000, 1.0] }, + "rdge_lights": { + "u_light0Pos": { 'type': 'vec3', 'data': [-20.0, 50.0, 20.0] }, + "u_light0Diff": { 'type': 'vec4', 'data': [0.8, 0.8, 0.8, 1] }, + "u_light0Amb": { 'type': 'vec4', 'data': [0.0008, 0.0008, 0.0008, 1.0] }, + "u_light0Spec": { 'type': 'vec4', 'data': [1.0, 1.0, 1.0, 1.0] }, + "u_light1Pos": { 'type': 'vec3', 'data': [0.0, 0.0, 0.0] }, + "u_light1Diff": { 'type': 'vec4', 'data': [0.0, 0.0, 0.0, 0.0] }, + "u_light1Amb": { 'type': 'vec4', 'data': [0.5, 0.5, 0.5, 1.0] }, + "u_light1Spec": { 'type': 'vec4', 'data': [1.0, 1.0, 1.0, 1.0] }, + "u_light2Pos": { 'type': 'vec3', 'data': [0.0, 0.0, 0.0] }, + "u_light2Diff": { 'type': 'vec4', 'data': [0.0, 0.0, 0.0, 1.0] }, + "u_light2Amb": { 'type': 'vec4', 'data': [0.5, 0.5, 0.5, 1.0] }, + "u_light2Spec": { 'type': 'vec4', 'data': [1.0, 1.0, 1.0, 1.0] }, + "u_light3Pos": { 'type': 'vec3', 'data': [0.0, 0.0, 0.0] }, + "u_light3Diff": { 'type': 'vec4', 'data': [0.8, 0.8, 0.8, 1] }, + "u_light3Amb": { 'type': 'vec4', 'data': [0.5, 0.5, 0.5, 1.0] }, + "u_light3Spec": { 'type': 'vec4', 'data': [1.0, 1.0, 1.0, 1.0] } + }, + "colMap": { 'type': 'tex2d', 'data': "assets/images/white.png" }, + //"envMap": {'type': 'tex2d', 'data': null}, + //"normalMap": {'type': 'tex2d', 'data': null}, + //"glowMap": {'type': 'tex2d', 'data': "assets/images/black.png"}, + //"u_shadowDepthMap": {'type': 'tex2d', 'data': null}, + //"u_depthMap": {'type': 'tex2d', 'data': null}, + "u_matAmbient": { 'type': 'vec4', 'data': [1.00, 1.00, 1.00, 1] }, + "u_matDiffuse": { 'type': 'vec4', 'data': [1.0, 1.0, 1.0, 1.0] }, + "u_matSpecular": { 'type': 'vec4', 'data': [1.0, 1.0, 1.0, 1.0] }, + "u_matShininess": { 'type': 'float', 'data': [128.0] }, + "u_matEmission": { 'type': 'float', 'data': [0.0, 0.0, 0.0, 1.0] }, + "u_frustumFarZ": { 'type': 'float', 'data': [1000.0] }, + "u_shadowLightWorld": { 'type': 'mat4', 'data': RDGE.mat4.identity() }, + "u_shadowBiasMatrix": { 'type': 'mat4', 'data': RDGE.mat4.identity() }, + "u_vShadowLight": { 'type': 'mat4', 'data': RDGE.mat4.identity() }, + "u_shadowBPV": { 'type': 'mat4', 'data': RDGE.mat4.identity() }, + "u_farZ": { 'type': 'float', 'data': [1000] }, + "u_shadowLightFarZ": { 'type': 'float', 'data': [1000] }, + "u_cameraFTR": { 'type': 'vec3', 'data': [0.0, 0.0, 0.0] } }; -- cgit v1.2.3