 
 varying vec2 uv;
 varying vec4 object;
+varying vec4 relobj;
 
 void main(void) {
 	object = vec4(position, 1.0);
-	gl_Position = projector * modelview * object;
+	relobj = modelview * object;
+	gl_Position = projector * relobj;
 	uv = texturec;
-	
 }
 </script>
 


varying vec2 uv;
varying vec4 object;

void main(void) {

	float hl = (4.5 - abs(object.y)) / 4.5;
	float ll = 1.0 - pow(abs(32.0 - object.z) / 32.0, 2.0);
//	float ll = 1.0;
	vec3 rocktex = 	texture2D(rock, uv * 0.005).r * color0 +
					texture2D(rock, uv * 0.05).r * color1 +
					texture2D(rock, uv * 0.5).r  * color2;
	gl_FragColor = vec4(ll * hl * rocktex, 1.0);
}

</script>


	@param uv		texture coordinates of fragment
	@param object	position in object coordinates
	@param relobj	position in modelview coordinates
	
**/

