diff options
Diffstat (limited to 'js/lib/rdge/materials/uber-material.js')
-rwxr-xr-x | js/lib/rdge/materials/uber-material.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/js/lib/rdge/materials/uber-material.js b/js/lib/rdge/materials/uber-material.js index 6de74495..0fef78f6 100755 --- a/js/lib/rdge/materials/uber-material.js +++ b/js/lib/rdge/materials/uber-material.js | |||
@@ -247,9 +247,9 @@ var UberMaterial = function UberMaterial() { | |||
247 | var technique = material.shaderProgram.defaultTechnique; | 247 | var technique = material.shaderProgram.defaultTechnique; |
248 | var renderer = RDGE.globals.engine.getContext().renderer; | 248 | var renderer = RDGE.globals.engine.getContext().renderer; |
249 | if (renderer && technique) { | 249 | if (renderer && technique) { |
250 | var tex = renderer.getTextureByName(value, caps.environmentMap.wrap); | 250 | var tex = renderer.getTextureByName(value, this._ubershaderCaps.environmentMap.wrap); |
251 | this.registerTexture(tex); | 251 | this.registerTexture(tex); |
252 | technique.s_environmentMap.set(tex); | 252 | technique.s_envMap.set(tex); |
253 | } | 253 | } |
254 | } | 254 | } |
255 | } | 255 | } |
@@ -276,7 +276,7 @@ var UberMaterial = function UberMaterial() { | |||
276 | var technique = material.shaderProgram.defaultTechnique; | 276 | var technique = material.shaderProgram.defaultTechnique; |
277 | var renderer = RDGE.globals.engine.getContext().renderer; | 277 | var renderer = RDGE.globals.engine.getContext().renderer; |
278 | if (renderer && technique) { | 278 | if (renderer && technique) { |
279 | this._diffuseTexture = new Texture( this.getWorld(), value, caps.diffuseMap.wrap ); | 279 | this._diffuseTexture = new Texture( this.getWorld(), value, this._ubershaderCaps.diffuseMap.wrap ); |
280 | var tex = this._diffuseTexture.getTexture(); | 280 | var tex = this._diffuseTexture.getTexture(); |
281 | technique.s_diffuseMap.set( tex ); | 281 | technique.s_diffuseMap.set( tex ); |
282 | } | 282 | } |
@@ -304,7 +304,7 @@ var UberMaterial = function UberMaterial() { | |||
304 | var technique = material.shaderProgram.defaultTechnique; | 304 | var technique = material.shaderProgram.defaultTechnique; |
305 | var renderer = RDGE.globals.engine.getContext().renderer; | 305 | var renderer = RDGE.globals.engine.getContext().renderer; |
306 | if (renderer && technique) { | 306 | if (renderer && technique) { |
307 | var tex = renderer.getTextureByName(value, caps.specularMap.wrap); | 307 | var tex = renderer.getTextureByName(value, this._ubershaderCaps.specularMap.wrap); |
308 | this.registerTexture(tex); | 308 | this.registerTexture(tex); |
309 | technique.s_specularMap.set(tex); | 309 | technique.s_specularMap.set(tex); |
310 | } | 310 | } |
@@ -332,7 +332,7 @@ var UberMaterial = function UberMaterial() { | |||
332 | var technique = material.shaderProgram.defaultTechnique; | 332 | var technique = material.shaderProgram.defaultTechnique; |
333 | var renderer = RDGE.globals.engine.getContext().renderer; | 333 | var renderer = RDGE.globals.engine.getContext().renderer; |
334 | if (renderer && technique) { | 334 | if (renderer && technique) { |
335 | var tex = renderer.getTextureByName(value, caps.normalMap.wrap); | 335 | var tex = renderer.getTextureByName(value, this._ubershaderCaps.normalMap.wrap); |
336 | this.registerTexture(tex); | 336 | this.registerTexture(tex); |
337 | technique.s_normalMap.set(tex); | 337 | technique.s_normalMap.set(tex); |
338 | } | 338 | } |
@@ -798,7 +798,7 @@ var UberMaterial = function UberMaterial() { | |||
798 | 798 | ||
799 | var material = this._materialNode; | 799 | var material = this._materialNode; |
800 | if (material) { | 800 | if (material) { |
801 | material.setShader(buildUbershader(this._ubershaderCaps)); | 801 | material.setShader( this.buildUberShader(this._ubershaderCaps) ); |
802 | } | 802 | } |
803 | }; | 803 | }; |
804 | }; | 804 | }; |