From ae7eb87564632ce7c676bd728b8ff2710ff0bb83 Mon Sep 17 00:00:00 2001 From: hwc487 Date: Wed, 18 Apr 2012 15:44:26 -0700 Subject: Merge branch 'master' of github.com:Motorola-Mobility/ninja-internal into Snapping_II Conflicts: js/tools/Rotate3DToolBase.js js/tools/RotateStage3DTool.js js/tools/Translate3DToolBase.js js/tools/modifier-tool-base.js --- assets/images/CL13.png | Bin 0 -> 40537 bytes assets/shaders/Cloud.frag.glsl | 3 ++- js/lib/rdge/materials/cloud-material.js | 10 +++++++--- js/lib/rdge/materials/pulse-material.js | 5 +++-- js/lib/rdge/texture.js | 1 - 5 files changed, 12 insertions(+), 7 deletions(-) create mode 100644 assets/images/CL13.png diff --git a/assets/images/CL13.png b/assets/images/CL13.png new file mode 100644 index 00000000..236eb3f8 Binary files /dev/null and b/assets/images/CL13.png differ diff --git a/assets/shaders/Cloud.frag.glsl b/assets/shaders/Cloud.frag.glsl index 3d466a24..3f858b7a 100644 --- a/assets/shaders/Cloud.frag.glsl +++ b/assets/shaders/Cloud.frag.glsl @@ -18,7 +18,8 @@ varying vec2 v_texCoord0; void main() { vec4 c = texture2D(u_tex0, v_texCoord0); - c.a *= u_surfaceAlpha; + //c.a *= u_surfaceAlpha; + if ((c.r == 0.0) && (c.b == 0.0) && (c.g == 0.0) && (c.a == 1.0)) c = vec4( 0.0, 0.0, 1.0, 1.0 ); gl_FragColor = c; } \ No newline at end of file diff --git a/js/lib/rdge/materials/cloud-material.js b/js/lib/rdge/materials/cloud-material.js index 28796c42..4200c1b2 100644 --- a/js/lib/rdge/materials/cloud-material.js +++ b/js/lib/rdge/materials/cloud-material.js @@ -23,6 +23,8 @@ var CloudMaterial = function CloudMaterial() { this._shaderName = "cloud"; this._texMap = 'assets/images/cloud10.png'; + //this._texMap = 'assets/images/CL13.png'; + //this._texMap = 'assets/images/material_paint.png'; //this._texMap = 'assets/images/us_flag.png'; //this._texMap = 'assets/images/cubelight.png'; this._diffuseColor = [0.5, 0.5, 0.5, 0.5]; @@ -36,8 +38,10 @@ var CloudMaterial = function CloudMaterial() { // parameter initial values this._time = 0.0; this._surfaceAlpha = 0.5; - this._zmin = 2.0; - this._zmax = 5.0; +// this._zmin = 2.0; +// this._zmax = 5.0; + this._zmin = 5.0; + this._zmax = 10.0; // the adjusted zMin and zMax values are // what get sent to the shader. They are initialized @@ -211,7 +215,7 @@ var CloudMaterial = function CloudMaterial() { { if (this._srcWorld) { - this._srcWorld.update(); + //this._srcWorld.update(); this._srcWorld.draw(); g_Engine.setContext( this.getWorld()._canvas.rdgeid ); } diff --git a/js/lib/rdge/materials/pulse-material.js b/js/lib/rdge/materials/pulse-material.js index 9cb500c8..4ba5110e 100644 --- a/js/lib/rdge/materials/pulse-material.js +++ b/js/lib/rdge/materials/pulse-material.js @@ -25,8 +25,9 @@ var PulseMaterial = function PulseMaterial() this._name = "PulseMaterial"; this._shaderName = "pulse"; - //this._texMap = 'assets/images/cubelight.png'; - this._texMap = 'texture'; + this._texMap = 'assets/images/cubelight.png'; + //this._texMap = 'assets/images/cloud10.png'; + //this._texMap = 'texture'; this._time = 0.0; this._dTime = 0.01; diff --git a/js/lib/rdge/texture.js b/js/lib/rdge/texture.js index 628f22ba..e0bf3364 100644 --- a/js/lib/rdge/texture.js +++ b/js/lib/rdge/texture.js @@ -205,7 +205,6 @@ function Texture( dstWorld, texMapName, wrap, mips ) } var renderer = world.getRenderer(); - var imageData; var width = srcCanvas.width, height = srcCanvas.height; if (!this.isPowerOfTwo(width) || !this.isPowerOfTwo(height)) { -- cgit v1.2.3