Originally posted by -NiCo-:
[b] [quote] Nut even Nehe’s examples work correctly.
So ‘Nut’ means ‘yes’?
Anyway, it’s indeed time to do some debugging at every step and see if the results are what you expect.
Good luck!
N.[/b][/QUOTE]‘Nut’ means ‘But’.
I’ll gladly debug each step, but WHAT STEPS SHOULD I DEBUG?! The texture coordinates are correct, but somewhere in the pipeline before the fragement proccessor something goes wrong…
Start with the NeHe tutorial for a textured quad, then gradually ad parts of your code to that tutorial that would effect the execution and verify at each point that the results are still correct.
Originally posted by -NiCo-:
[b]Start with the NeHe tutorial for a textured quad, then gradually ad parts of your code to that tutorial that would effect the execution and verify at each point that the results are still correct.
N.[/b]
Yeah, I think I’ll do that. Thanks for your help and time.
Originally posted by yooyo:
[b]On your screenshots I can see bad texture mapping only when hw do clipping. Check your vertex shader. Maybe your transform code doesn’t work as well.
Strange. It does work correctly on the GF4Ti using my ARB code path, however forcing exactly the same code path on my Radeon doesn’t solve the problem. :mad:
I am also having trouble with my radeon. I have a problem with texture-coords “damaged”, too. But my problem appeares when i use point-sprites. My code worked on a geforce-3.
Strange, strange. Someone should report all these bugs to ATI. Hopefully the will release a new driver. I am getting crazy. :eek:
Originally posted by CPPMaster: [quote]Originally posted by Overmind: Just an idea, I didn’t actually test this:
Do you do your camera transformation on the projection matrix instead of the modelview matrix? If yes, this could cause a problem with perspective correct interpolation…
No, everything (except the perspective calculation and calling glfrustom) is done in the ModelView matrix.
I just don’t get it… [/QUOTE]I second the idea that the most likely cause of these issues is that your matrix stacks are botched. You might produce constant w or something like that.
I take it that you construct some (all?) matrices yourself? (because you said “perspective calculation and calling glFrustum”)
Can you insert code that gets both the modelview and projection matrices during a “broken” frame and just post the results?
Fixed it. It does looks like a driver bug. I’ve commented out glPushMatrix() and glPopMatrix() in the particle rendering code, and it looks like calling glTransform a few thousends of times (probably out of precision of float) causes some matrix bugs or something. Anyway adding the missing push and pop matrix calls fixes it, thanks everybody.