Browse Source

Examples: GPGPU Bird, removed redundent variables in shaders

Joshua Koo 11 years ago
parent
commit
79d8e9a4fd
1 changed files with 0 additions and 15 deletions
  1. 0 15
      examples/webgl_gpgpu_birds.html

+ 0 - 15
examples/webgl_gpgpu_birds.html

@@ -288,8 +288,6 @@
 			uniform sampler2D texturePosition;
 			uniform sampler2D textureVelocity;
 
-			varying vec3 vNormal;
-			varying vec2 vUv;
 			varying vec4 vColor;
 			varying float z;
 
@@ -297,8 +295,6 @@
 
 			void main() {
 
-				vNormal = normal;
-
 				vec4 tmpPos = texture2D( texturePosition, reference );
 				vec3 pos = tmpPos.xyz;
 				vec3 velocity = normalize(texture2D( textureVelocity, reference ).xyz);
@@ -351,8 +347,6 @@
 		<!-- bird geometry shader -->
 		<script type="x-shader/x-fragment" id="birdFS">
 
-			varying vec3 vNormal;
-			varying vec2 vUv;
 			varying vec4 vColor;
 			varying float z;
 
@@ -363,15 +357,6 @@
 				float z2 = 0.2 + ( 1000. - z ) / 1000. * vColor.x;
 				gl_FragColor = vec4( z2, z2, z2, 1. );
 
-				// vec3 light = vec3( 0.0, 1.0, 1.0 );
-				// light = normalize( light );
-				// float dProd = dot( vNormal, light ) ; //* 0.5 + 0.5;
-				// vec4 tcolor = vColor;
-				// vec4 gray = vec4( vec3( tcolor.r * 0.3 + tcolor.g * 0.59 + tcolor.b * 0.11 ), 1.0 );
-
-				// gl_FragColor =  gray * dProd;
-				// gl_FragColor =  vec4( dProd  * tcolor );
-
 			}
 
 		</script>