aboutsummaryrefslogtreecommitdiff
path: root/js/lib/rdge/materials/uber-material.js
diff options
context:
space:
mode:
authorJohn Mayhew2012-04-02 14:57:31 -0700
committerJohn Mayhew2012-04-02 14:57:31 -0700
commitfb0a659c9ca3479fd6799325498b11f074689936 (patch)
tree46342298281aa93e48756e040715f42770ccc526 /js/lib/rdge/materials/uber-material.js
parentc24f58c10231c30d3a8a4c9fb9a4f395dd746180 (diff)
downloadninja-fb0a659c9ca3479fd6799325498b11f074689936.tar.gz
-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
Diffstat (limited to 'js/lib/rdge/materials/uber-material.js')
-rwxr-xr-xjs/lib/rdge/materials/uber-material.js16
1 files changed, 8 insertions, 8 deletions
diff --git a/js/lib/rdge/materials/uber-material.js b/js/lib/rdge/materials/uber-material.js
index 6bc35d51..e2f86511 100755
--- a/js/lib/rdge/materials/uber-material.js
+++ b/js/lib/rdge/materials/uber-material.js
@@ -237,7 +237,7 @@ var UberMaterial = function UberMaterial() {
237 var material = this._materialNode; 237 var material = this._materialNode;
238 if (material) { 238 if (material) {
239 var technique = material.shaderProgram.defaultTechnique; 239 var technique = material.shaderProgram.defaultTechnique;
240 var renderer = g_Engine.getContext().renderer; 240 var renderer = RDGE.globals.engine.getContext().renderer;
241 if (renderer && technique) { 241 if (renderer && technique) {
242 var tex = renderer.getTextureByName(value, caps.environmentMap.wrap); 242 var tex = renderer.getTextureByName(value, caps.environmentMap.wrap);
243 this.registerTexture( tex ); 243 this.registerTexture( tex );
@@ -265,7 +265,7 @@ var UberMaterial = function UberMaterial() {
265 var material = this._materialNode; 265 var material = this._materialNode;
266 if (material) { 266 if (material) {
267 var technique = material.shaderProgram.defaultTechnique; 267 var technique = material.shaderProgram.defaultTechnique;
268 var renderer = g_Engine.getContext().renderer; 268 var renderer = RDGE.globals.engine.getContext().renderer;
269 if (renderer && technique) { 269 if (renderer && technique) {
270 var tex = renderer.getTextureByName(value, caps.diffuseMap.wrap); 270 var tex = renderer.getTextureByName(value, caps.diffuseMap.wrap);
271 this.registerTexture( tex ); 271 this.registerTexture( tex );
@@ -293,7 +293,7 @@ var UberMaterial = function UberMaterial() {
293 var material = this._materialNode; 293 var material = this._materialNode;
294 if (material) { 294 if (material) {
295 var technique = material.shaderProgram.defaultTechnique; 295 var technique = material.shaderProgram.defaultTechnique;
296 var renderer = g_Engine.getContext().renderer; 296 var renderer = RDGE.globals.engine.getContext().renderer;
297 if (renderer && technique) { 297 if (renderer && technique) {
298 var tex = renderer.getTextureByName(value, caps.specularMap.wrap); 298 var tex = renderer.getTextureByName(value, caps.specularMap.wrap);
299 this.registerTexture( tex ); 299 this.registerTexture( tex );
@@ -321,7 +321,7 @@ var UberMaterial = function UberMaterial() {
321 var material = this._materialNode; 321 var material = this._materialNode;
322 if (material) { 322 if (material) {
323 var technique = material.shaderProgram.defaultTechnique; 323 var technique = material.shaderProgram.defaultTechnique;
324 var renderer = g_Engine.getContext().renderer; 324 var renderer = RDGE.globals.engine.getContext().renderer;
325 if (renderer && technique) { 325 if (renderer && technique) {
326 var tex = renderer.getTextureByName(value, caps.normalMap.wrap); 326 var tex = renderer.getTextureByName(value, caps.normalMap.wrap);
327 this.registerTexture( tex ); 327 this.registerTexture( tex );
@@ -363,7 +363,7 @@ var UberMaterial = function UberMaterial() {
363 this._shader = this.buildUberShader( this._ubershaderCaps ); 363 this._shader = this.buildUberShader( this._ubershaderCaps );
364 364
365 // set up the material node 365 // set up the material node
366 this._materialNode = createMaterialNode("uberMaterial"); 366 this._materialNode = RDGE.createMaterialNode("uberMaterial");
367 this._materialNode.setShader(this._shader); 367 this._materialNode.setShader(this._shader);
368 }; 368 };
369 369
@@ -450,7 +450,7 @@ var UberMaterial = function UberMaterial() {
450 var fshader = preproc + uberFShader; 450 var fshader = preproc + uberFShader;
451 451
452 // build output jshader 452 // build output jshader
453 var uberJShader = new jshader(); 453 var uberJShader = new RDGE.jshader();
454 uberJShader.def = { 454 uberJShader.def = {
455 'shaders': { 455 'shaders': {
456 'defaultVShader': vshader, 456 'defaultVShader': vshader,
@@ -517,9 +517,9 @@ var UberMaterial = function UberMaterial() {
517 } 517 }
518 } 518 }
519 } 519 }
520 technique.u_uvMatrix.set(caps.uvTransform || mat4.identity()); 520 technique.u_uvMatrix.set(caps.uvTransform || RDGE.mat4.identity());
521 521
522 var renderer = g_Engine.getContext().renderer; 522 var renderer = RDGE.globals.engine.getContext().renderer;
523 if(this._useDiffuseMap) { 523 if(this._useDiffuseMap) {
524 var tex = renderer.getTextureByName(caps.diffuseMap.texture, caps.diffuseMap.wrap, caps.diffuseMap.mips); 524 var tex = renderer.getTextureByName(caps.diffuseMap.texture, caps.diffuseMap.wrap, caps.diffuseMap.mips);
525 this.registerTexture( tex ); 525 this.registerTexture( tex );