PDA

View Full Version : OpenGL ES 2: length and normalize in iPad



xissburg
10-24-2011, 09:30 AM
I started to get a black screen and no errors in an app I am running in an iPad. After a tinkering with the code a little, commenting and swapping stuff here and there, I noticed that whenever I call normalize or length in my fragment shader, the screen get totally black, no error messages. Looks like a driver problem, or what?

Thanks in advance.

carsten neumann
10-24-2011, 11:11 AM
Are you only calling length() or are you also dividing by the return value to do your own normalization? In that case you could be dividing by 0, which often has interesting effects if done in the fragment shader.