From 41cd6c47b23975098cd155517790e018670785e7 Mon Sep 17 00:00:00 2001 From: Kenneth Russel Date: Mon, 15 Jun 2009 23:12:27 +0000 Subject: Copied JOGL_2_SANDBOX r350 on to trunk; JOGL_2_SANDBOX branch is now closed git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/../svn-server-sync/jogl-demos/trunk@352 3298f667-5e0e-4b4a-8ed4-a3559d26a5f4 --- src/demos/es2/openmax/shader/moviesimple.fp | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 src/demos/es2/openmax/shader/moviesimple.fp (limited to 'src/demos/es2/openmax/shader/moviesimple.fp') diff --git a/src/demos/es2/openmax/shader/moviesimple.fp b/src/demos/es2/openmax/shader/moviesimple.fp new file mode 100644 index 0000000..c711641 --- /dev/null +++ b/src/demos/es2/openmax/shader/moviesimple.fp @@ -0,0 +1,21 @@ + +#ifdef GL_ES + #define MEDIUMP mediump + #define HIGHP highp +#else + #define MEDIUMP + #define HIGHP +#endif + +uniform sampler2D mgl_ActiveTexture; +varying HIGHP vec4 mgl_texCoord; +varying HIGHP vec4 frontColor; + +void main (void) +{ + vec4 texColor = texture2D(mgl_ActiveTexture, mgl_texCoord.st); + + // mix frontColor with texture .. + gl_FragColor = vec4(frontColor.rgb*texColor.rgb, frontColor.a); +} + -- cgit v1.2.3