diff --git a/tests/cpp-tests/Resources/Sprite3DTest/caustics.png b/tests/cpp-tests/Resources/Sprite3DTest/caustics.png new file mode 100644 index 0000000000..edc158d982 Binary files /dev/null and b/tests/cpp-tests/Resources/Sprite3DTest/caustics.png differ diff --git a/tests/cpp-tests/Resources/Sprite3DTest/cylinder.c3b b/tests/cpp-tests/Resources/Sprite3DTest/cylinder.c3b new file mode 100644 index 0000000000..be07b5b05a Binary files /dev/null and b/tests/cpp-tests/Resources/Sprite3DTest/cylinder.c3b differ diff --git a/tests/cpp-tests/Resources/Sprite3DTest/cylinder.frag b/tests/cpp-tests/Resources/Sprite3DTest/cylinder.frag new file mode 100644 index 0000000000..1cae8301d7 --- /dev/null +++ b/tests/cpp-tests/Resources/Sprite3DTest/cylinder.frag @@ -0,0 +1,16 @@ +#ifdef GL_ES +varying mediump vec2 TextureCoordOut; +#else +varying vec2 TextureCoordOut; +#endif + +uniform vec4 u_color; +uniform float offset; +uniform float duration; +uniform sampler2D caustics; +void main(void) +{ + vec4 golden = duration*vec4(0,0.8,0.4,1.0); + //blend two texture + gl_FragColor = texture2D(CC_Texture0, vec2(TextureCoordOut.x- 2.0 * offset,TextureCoordOut.y)) * vec4(0.3,0.3,0.3,1)+texture2D(caustics,vec2(TextureCoordOut.x-offset,TextureCoordOut.y)).r*golden; +} \ No newline at end of file diff --git a/tests/cpp-tests/Resources/Sprite3DTest/cylinder.vert b/tests/cpp-tests/Resources/Sprite3DTest/cylinder.vert new file mode 100644 index 0000000000..01da9c33bf --- /dev/null +++ b/tests/cpp-tests/Resources/Sprite3DTest/cylinder.vert @@ -0,0 +1,10 @@ +attribute vec4 a_position; +attribute vec2 a_texCoord; +uniform float offset; +varying vec2 TextureCoordOut; +void main(void) +{ + gl_Position = CC_MVPMatrix * a_position; + TextureCoordOut = a_texCoord; + TextureCoordOut.y = (1.0 - TextureCoordOut.y); +} diff --git a/tests/cpp-tests/Resources/Sprite3DTest/dragon.png b/tests/cpp-tests/Resources/Sprite3DTest/dragon.png new file mode 100644 index 0000000000..80ea2eb670 Binary files /dev/null and b/tests/cpp-tests/Resources/Sprite3DTest/dragon.png differ