float mix(floatx,float y,float a ) 返回x和y 的线性混合,即x(1-a)+ya
<div id="container"></div>
<script src="js/three.js"></script>
<script src="js/Detector.js"></script>
<script id="vertexShader" type="x-shader/x-vertex">
varying vec2 vUv;
void main()
{
vUv = uv;
vec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );
gl_Position = projectionMatrix * mvPosition;
}
</script>
<script id="fragmentShader" type="x-shader/x-fragment">
uniform float time;
uniform bool isoriginColor;
uniform sampler2D texture3;
uniform sampler2D texture4;
varying vec2 vUv;
void main( void ) {
vec2 position = - 1.0 + 2.0 * vUv;
vec4 color3 = texture2D( texture3, vUv );
vec3 tarcolor =color3.rgb;
float f1 =