> On Dec 26, 11:05 am, bob <b...@coolfone.comze.com> wrote:> What is the best way to learn OpenGL ES 2.0 for Android?
>
> What kind of tutorial are you looking for ? are you a beginner ?
> What did you already find ?
Also, I like this shader:
private final String mFragmentShader =
"precision mediump float;\n" +
"varying vec2 vTextureCoord;\n" +
"uniform sampler2D sTexture;\n" +
"void main() {\n" +
"vec2 center = vec2(0.5,0.5);\n" +
"float intensity = 1.0 - distance(vTextureCoord,center);\n" +
" gl_FragColor = texture2D(sTexture, vTextureCoord) *
vec4(1.0, 1.0, 1.0, intensity);\n" +
"}\n";
Be sure to have blending on:
GLES20.glEnable(GL10.GL_BLEND);
GLES20.glBlendFunc(GL10.GL_SRC_ALPHA,
GL10.GL_ONE_MINUS_SRC_ALPHA);
Here's what it looks like:
http://i1190.photobucket.com/albums/z449/m75214/myshade.png
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
No comments:
Post a Comment