shadertoy移植问题

2.4.6尝试将shadertoy的shader移植到cocos,出现了效果不一致,求大佬
原:Shader - Shadertoy BETA
个人转的有问题

CCEffect %{
techniques:
-
passes:
-
vert: vs
frag: fs
blendState:
targets:
-
blend: true
rasterizerState:
cullMode: none
properties:
texture:
value: white
iResolution:
value:
- 960
- 640
iMouse:
value:
- 0.5
- 0.5
- 0.5
- 0.5
iChannel2:
value: white
iChannel1:
value: white

}%

CCProgram vs { precision highp float; #include <cc-global> #include <cc-local> in vec3 a_position; in vec4 a_color; out vec4 v_color; #if USE_TEXTURE in vec2 a_uv0; out vec2 v_uv0; #endif #if USE_TINT #endif void main () { vec4 pos = vec4(a_position, 1); #if CC_USE_MODEL pos = cc_matViewProj * cc_matWorld * pos; #else pos = cc_matViewProj * pos; #endif #if USE_TEXTURE v_uv0 = a_uv0; #endif v_color = a_color; gl_Position = pos; } }

CCProgram fs %{

precision highp float;
#include <cc-global>
#include <texture>
in vec4 v_color;
#if USE_TEXTURE
	in vec2 v_uv0;
	uniform sampler2D texture;
#endif
uniform Uniforms {
		vec4 iMouse;

vec2 iResolution;

};
  uniform sampler2D iChannel2;

uniform sampler2D iChannel1;

#define round(number) (sign(number)floor(abs(number)+0.5))
float avg(vec4 color) {
return (color.r + color.g + color.b)/3.0;
}
void main()
{
float speed = 0.1;
float scale = 1.8;
float opacity = 0.5;
vec2 uv = (v_uv0);
vec2 scaledUv = uv
scale;
vec4 water1 = texture2D(texture, scaledUv + cc_time[0]0.02speed - 0.1);
vec4 water2 = texture2D(texture, scaledUv.xy + cc_time[0]speedvec2(-0.02, -0.02) + 0.1);
vec4 highlights1 = texture2D(iChannel2, scaledUv.xy + cc_time[0]*speed / vec2(-10, 100));
vec4 highlights2 = texture2D(iChannel2, scaledUv.xy + cc_time[0]*speed / vec2(10, 100));
vec4 background = texture2D(iChannel1, vec2(uv) + avg(water1) * 0.05);
water1.rgb = vec3(avg(water1));
water2.rgb = vec3(avg(water2));
highlights1.rgb = vec3(avg(highlights1)/1.5);
highlights2.rgb = vec3(avg(highlights2)/1.5);
float alpha = opacity;
if(avg(water1 + water2) > 0.3) {
alpha = 0.0;
}
if(avg(water1 + water2 + highlights1 + highlights2) > 0.75) {
alpha = 5.0 * opacity;
}
gl_FragColor = (water1 + water2) * alpha + background;
gl_FragColor.a = texture2D(texture, v_uv0).a;
}
}%