aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--assets/images/CL13.pngbin0 -> 40537 bytes
-rw-r--r--assets/shaders/Cloud.frag.glsl3
-rw-r--r--js/lib/rdge/materials/cloud-material.js10
-rw-r--r--js/lib/rdge/materials/pulse-material.js5
-rw-r--r--js/lib/rdge/texture.js1
5 files changed, 12 insertions, 7 deletions
diff --git a/assets/images/CL13.png b/assets/images/CL13.png
new file mode 100644
index 00000000..236eb3f8
--- /dev/null
+++ b/assets/images/CL13.png
Binary files 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;
18void main() 18void main()
19{ 19{
20 vec4 c = texture2D(u_tex0, v_texCoord0); 20 vec4 c = texture2D(u_tex0, v_texCoord0);
21 c.a *= u_surfaceAlpha; 21 //c.a *= u_surfaceAlpha;
22 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 );
22 gl_FragColor = c; 23 gl_FragColor = c;
23} 24}
24 \ No newline at end of file 25 \ 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() {
23 this._shaderName = "cloud"; 23 this._shaderName = "cloud";
24 24
25 this._texMap = 'assets/images/cloud10.png'; 25 this._texMap = 'assets/images/cloud10.png';
26 //this._texMap = 'assets/images/CL13.png';
27 //this._texMap = 'assets/images/material_paint.png';
26 //this._texMap = 'assets/images/us_flag.png'; 28 //this._texMap = 'assets/images/us_flag.png';
27 //this._texMap = 'assets/images/cubelight.png'; 29 //this._texMap = 'assets/images/cubelight.png';
28 this._diffuseColor = [0.5, 0.5, 0.5, 0.5]; 30 this._diffuseColor = [0.5, 0.5, 0.5, 0.5];
@@ -36,8 +38,10 @@ var CloudMaterial = function CloudMaterial() {
36 // parameter initial values 38 // parameter initial values
37 this._time = 0.0; 39 this._time = 0.0;
38 this._surfaceAlpha = 0.5; 40 this._surfaceAlpha = 0.5;
39 this._zmin = 2.0; 41// this._zmin = 2.0;
40 this._zmax = 5.0; 42// this._zmax = 5.0;
43 this._zmin = 5.0;
44 this._zmax = 10.0;
41 45
42 // the adjusted zMin and zMax values are 46 // the adjusted zMin and zMax values are
43 // what get sent to the shader. They are initialized 47 // what get sent to the shader. They are initialized
@@ -211,7 +215,7 @@ var CloudMaterial = function CloudMaterial() {
211 { 215 {
212 if (this._srcWorld) 216 if (this._srcWorld)
213 { 217 {
214 this._srcWorld.update(); 218 //this._srcWorld.update();
215 this._srcWorld.draw(); 219 this._srcWorld.draw();
216 g_Engine.setContext( this.getWorld()._canvas.rdgeid ); 220 g_Engine.setContext( this.getWorld()._canvas.rdgeid );
217 } 221 }
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()
25 this._name = "PulseMaterial"; 25 this._name = "PulseMaterial";
26 this._shaderName = "pulse"; 26 this._shaderName = "pulse";
27 27
28 //this._texMap = 'assets/images/cubelight.png'; 28 this._texMap = 'assets/images/cubelight.png';
29 this._texMap = 'texture'; 29 //this._texMap = 'assets/images/cloud10.png';
30 //this._texMap = 'texture';
30 31
31 this._time = 0.0; 32 this._time = 0.0;
32 this._dTime = 0.01; 33 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 )
205 } 205 }
206 var renderer = world.getRenderer(); 206 var renderer = world.getRenderer();
207 207
208 var imageData;
209 var width = srcCanvas.width, height = srcCanvas.height; 208 var width = srcCanvas.width, height = srcCanvas.height;
210 if (!this.isPowerOfTwo(width) || !this.isPowerOfTwo(height)) 209 if (!this.isPowerOfTwo(width) || !this.isPowerOfTwo(height))
211 { 210 {