Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 10 Jun 2008
Offline Last Active Oct 10 2013 05:13 AM

Topics I've Started

[ES 2.0] Texture rendering problem

20 September 2013 - 08:51 AM

Hi everyone,


Recently I've been working on a page curl effect in Opengl ES 2.0 for embedded systems. I've been able to write the model and surface deformation algorithm properly, but I have problems with rendering it with a texture. I have attached three screenshots showing exactly the problem I get when rendering the curl at certain angles of the deformation cylinder (yes, the page is deformed around a cylinder). The problem is that if the angle of the cylinder is higher than PI / 2 the texture renders all perfectly, but if it's smaller I get some transparent stripes which you can see through and if you make the angle even smaller the whole bended surface seems to be transparent for the page behind.


I have checked if it's not a problem of the mathematical model (the surface crossing itself), but it's not. I have also disabled face culling and alpha blending in this case and I'm out of ideas what can be wrong. I would be very grateful if somebody gave me a hint where to start from.


The vertex shader I use is very simple:

uniform mat4 uPositionMatrix;
uniform mat4 uMV;

attribute vec4 aPosition;
attribute vec2 aTextureCoord;

varying vec4 vTextureCoord;

void main()
        vTextureCoord = aTextureCoord;
	gl_Position = uPositionMatrix * aPosition;

Fragment shader (basic one):

// Fragment shader program
precision highp float;

varying vec2 vTextureCoord;

uniform sampler2D sTexture;

void main (void)
	gl_FragColor =  texture2D(sTexture, vTextureCoord);

I know I didn't give you a lot of details, but as I don't know where to start from I'll wait for any questions for more details.


Thanks in advance!

Attached File  Screen-20130920154606519612.jpg   121.95KB   26 downloads

Attached File  Screen-20130920154613617023.jpg   93.08KB   26 downloads

Attached File  Screen-20130920154618177095.jpg   96.72KB   9 downloads

[SOLVED]Another Ball to Ball collision written in Java

10 June 2008 - 01:17 PM

Hello Everyone! I know this topic can get boring, but there's just another guy, who can't handle these ball to ball collisions and he's pretty desperate in finding help. I've written an app in Java which was suposed to simulate ellastic collision, but I've stumped upon a problem. I tried to read a lot about collisions and so on and I know, that I need to separate two balls during collision, but that's where I get lost. I think I somehow understand what's needed to make this simulation look realistic, but I just can't find a good way to implement it. I have problems mostly with my separate method (I'll just add my source code, so everyone who's willing to help me, can see it from inside). In this method I check if two balls are colliding, I check if distance between them is smaller than their radius sum. If it is, than there is a collision and in addition they are overlapping (do I get it right?). After this collision check I try to separate them in such way: pos1 -= vel1 * dt pos2 -= vel2 * dt. And I don't know why, but it doesn't seem to behave as it should. The rest of you can see it running, I've uploaded it here: http://www.turboupload.com/download/t7LUPWf7Kj84/Bounclets.jar The source code is included in this jar file. And for people who have seen my app running - yes I know there is this ball, which is beeing omitted in calculations, but I'm not doing anything with it until I'm done with my separation. All your help is so much welcome! Big thanks in advance! PS. If This post is a dumb one, violates the rules, or somethin, then just please delete it and accept my apology. Regards! [Edited by - Blessed on June 11, 2008 11:02:31 AM]