Lighting problem on different computers

Started by
4 comments, last by Atrix256 14 years ago
Hello here is a few examples of the same program running on different computers.(difuse lighting is used).The graphic card drivers were updated on both computers.The first pc is with nvidia card the second one is with via. What the cause of the problem and how it can be fixed?
Advertisement
Some surfaces are green?
Maybe it is an issue with FRONT and BACK faces. Are you setting FRONT and BACK to the same color?
Sig: http://glhlib.sourceforge.net
an open source GLU replacement library. Much more modern than GLU.
float matrix[16], inverse_matrix[16];
glhLoadIdentityf2(matrix);
glhTranslatef2(matrix, 0.0, 0.0, 5.0);
glhRotateAboutXf2(matrix, angleInRadians);
glhScalef2(matrix, 1.0, 1.0, -1.0);
glhQuickInvertMatrixf2(matrix, inverse_matrix);
glUniformMatrix4fv(uniformLocation1, 1, FALSE, matrix);
glUniformMatrix4fv(uniformLocation2, 1, FALSE, inverse_matrix);
I have experienced this problem with both fixed function pipeline AND shaders.

The FFP problem i never solved, figured it was diff behavior with diff drivers and i just had to deal. Now though looking back im thinking maybe i didnt initialize all the data i should have.

The reason I think that might be true is when i had the same problem with shaders, the problem turned out to be un-initialized values in the shader itself.

So, sometimes it would look right, sometimes it would not look right, just depended on iff the memory was clean or dirty at that particular time :P

And if wondering, i saw this problem happen sometimes on other people's computers and sometimes not just like you are (so it wasnt just on my own machine).

Some people had a near 100% repro rate, while others had a near 0% repro rate.
Quote:Original post by V-man
Some surfaces are green?
Maybe it is an issue with FRONT and BACK faces. Are you setting FRONT and BACK to the same color?


Well it does work on one of the computer and on the other it don't. So I did initialize it right.
Are you overflowing the color buffer (i.e. having values greater than 1.0 for a component)? Different hardware could have different behavior (like clamping or wrapping). If your red component is overflowing, yellow turns to green, which looks like what's happening. Also, it looks like the brightest parts of your image are turning green.

Are you using OpenGL lighting or your own shader?
Quote:Well it does work on one of the computer and on the other it don't. So I did initialize it right.


Possibly not true.

If it is due to uninitialized data, it could be that one graphics driver always zeroes out the memory and gives it to you clean before executing while another graphics driver leaves the memory in whatever state it is in and leaves it up to you to initialize data.

Or just dumb luck about the memory used being often clean on one machine while it is often dirty on another.

You aren't assured to be blameless just because you get different results on different systems :P

This topic is closed to new replies.

Advertisement