Position_invariant not so invariant

Take a look at this picture here: http://dux.isec.pt/~a9805016/Sigma/Conflito.jpg . If you look at the window, and to the thing highlighted in red, they all share the same shader. But, being a multipass shader, and using vertex programs to calculate the texture coordinates, I have to of course use a position invariant program… Well, the results are not that invariant as they should. If you look closely the the highlighted area you will notice the fighting on the z-buffer, that should not occur… I know that the program is working as it should, because if you look at the window, it looks OK, because it as only two passes. This is the program, so what am I doing wrong?!

const unsigned char VP_Environment =
{
“!!VP1.1”

“OPTION NV_position_invariant;”

“ADD R0, c[4], -v[OPOS];”

“DP3 R0.w, R0, R0;”
“RSQ R0.w, R0.w;”
“MUL R0, R0, R0.w;”

“ADD o[TEX0].x,R0.x,v[NRML].x;”
“ADD o[TEX0].y,R0.y,v[NRML].y;”

“MOV o[COL0],v[COL0];”
“MOV o[BFC0],v[COL0];”

“END”
};

Thanks a lot…

Well, you’re not using a GeForce3/4TI - is that correct ? Nutty had this problem a while back and Matt confirmed it as a bug in the VP emulation code ( something like that ).

Damn… That’s right… I’m using a GeForce2 MX… Altought I can’t believe that NVidia found the bug and didn’t correct it already! They have a excellent drivers team. John Carmack once said that their drivers were is “gold standard”. Is this so hard to fix? Please, correct the bug. The GeForce3 is not that cheap, and some people can’t affort it…

Well, thanks anyway, know I now that it’s not my problem!!!

john carmack sais much… they don’t have gold standart, but theire okay…

they don’t solve the bug as it is not a very important one, i think…

I’m not so convinced about the excellence or “Gold standard” of nVidia drivers and their coder (no offence Matt). I’ll be convinced the day they respond as quickly (and at all!) as ATi when reporting driver bugs and fixes them in a timely manner. I have reported a driver bug that causes all my demos which uses bumpmapping to go completely corrupt on GF3/4 when anisotropic is enabled in the drivers several times, no reply. A few weeks ago I was on a job interview at nVidia and one of the guys interviewing me wondered why he couldn’t run one of my demos while other people obviously could, and of course it was same problem so the bug is still there unless it’s been fixed very recently.

Originally posted by Humus:
I’m not so convinced about the excellence or “Gold standard” of nVidia drivers and their coder (no offence Matt). I’ll be convinced the day they respond as quickly (and at all!) as ATi when reporting driver bugs and fixes them in a timely manner. I have reported a driver bug that causes all my demos which uses bumpmapping to go completely corrupt on GF3/4 when anisotropic is enabled in the drivers several times, no reply. A few weeks ago I was on a job interview at nVidia and one of the guys interviewing me wondered why he couldn’t run one of my demos while other people obviously could, and of course it was same problem so the bug is still there unless it’s been fixed very recently.

Same here. Though ATI still hasn’t fixed this little bug in the fragment shader that causes a system lockup (they are on their second try AFAIK), but other than that they are indeed fast at fixing bugs.

I’m sorry, where I wrote “their drivers were is “gold standard”.”, one should read “their drivers were HIS “gold standard”.”

Anyway, I just quoted him because I believe he works a lot with extensions, OpenGL, and sometimes he is the first to try out drivers and hardware, so who better to tell what drivers are good and what drivers aren’t… Althought, he also agrees that NVidia drivers are the worst when it comes to fixing bugs…

they don’t solve the bug as it is not a very important one, i think…

Well, like I said before, not everyone can affort a Geforce3. And I think an extension like NV_vertex_program_1_1 is VERY important. What do you guys think?

If there was a bug that made impossible for the person with the username, for exemple davepermen, to post replays in this forums, I would not think it would be that important. But what would you think davepermen?

the extension is funny, but
a) its useless when gl2.0 is there, and thats about half a year to a year…
b) its useless on hardware that has to emulate it (as it is much to slow for useful scenes… at least here
c) most of the stuff can be done without it, except good setup for pixelshaders, but well… on the gf2 i have exposed all its features and i can live without vp even then…
d) the position-invarianz is not THAT important as you can stick to non-vp or full-vp quite easy…

Originally posted by KRONOS:
NV_vertex_program_1_1 is VERY important. What do you guys think?

It’s a very useful extension but I never thought it was a great idea to expose it ( and VP1.0 ) on anything less than a GeForce3. You won’t be able to get good performance with NV_vertex_array_range with emulated vertex programs.

Calm down, people…

Humus, I already tracked down and fixed your anisotropic bug. I suspect the latest leaked drivers include a fix.

This bug with position invariant programs is another one that I fixed long ago, but the fix is substantial enough in scope that it’s not feasible for it to go into a current driver release. A future (major) driver release will include the fix. At present, emulated position invariant programs “work” (i.e. they generate essentially the right geometry) but they aren’t position invariant. (The alternative would have been that they not work at all… hardly a palatable alternative.)

And I think it’s pretty clear that position invariant is an extremely useful feature. John Carmack was certainly not alone in wanting it. In addition, I’ll point out that position invariant programs will run slightly faster, too. (With my emulation fixes, they will even run faster in emulation, too.)

Of course, VP1.1 also provides DPH, which is itself useful…

  • Matt

Nice one Matt! Keep up the excellent work

Originally posted by davepermen:
the extension is funny, but
a) its useless when gl2.0 is there, and thats about half a year to a year…

The latest roadmap I read (yesterday) stated GL2.0 would be publicly released at SIGGRAPH 2003. So your 0.5 year becomes 1.5 year already. Also count a 6-month delay to get it in the market and you end up with using this extension for the next 2 years (although GL2_geometry_shader should arrive sooner, in GL1.4 drivers).


b) its useless on hardware that has to emulate it (as it is much to slow for useful scenes… at least here

The purpose of an API has always been to ease programmers’ work. When it’s not hardware accelerated, you should consider this extension as a software API which makes shaders programming easier (even if they’re slow).

Julien.

Originally posted by mcraighead:
Humus, I already tracked down and fixed your anisotropic bug. I suspect the latest leaked drivers include a fix.

Oki, that’s nice (Can’t test it though as I don’t have the hardware, I have been promised a board by another nVidia guy, have yet to recieve it though)
Anyway, probably not your responsibility, but I would have preferred if I would have got any feedback on it when I reported it. Hard to know if the bug is being worked on or if the mail just got piped directly to /dev/null. ATi is very consistent on giving feedback both when the bug has been confirmed and when it has been fixed.

Humus,

Where/who do you report the bugs to ? Do you use devrel@ati.com for ATI ? What about NVIDIA ? I haven’t been able to find an email address specifically for bugs. I usually just mention them on this board and hope they are noticed …

I would like a board to… Not much, just a GeForce3 Ti2000, the cheapest you can deliver… Can someone from NVidia promise one too?!

That would be nice!!!
It sure would make my work easier, alas I can’t affort one…

Cheers…

Originally posted by PH:
[b]Humus,

Where/who do you report the bugs to ? Do you use devrel@ati.com for ATI ? What about NVIDIA ? I haven’t been able to find an email address specifically for bugs. I usually just mention them on this board and hope they are noticed …[/b]

For ATi devrel@ati.com is what I use. For nVidia it’s a little harder. When I tried to report this bug I wasn’t a registered developer, and as such there were no place to direct my driver bug finding. Of the email addresses listed in their “contact us” page on the developer page none seamed to fit for bug reports, so I just choose DeveloperRelations@nVidia.com which seamed generic enough for it and hoped it would make it through. As I didn’t get any replies I tried mailing a guy on the nVidia OpenGL team about it, I was lucky enough to have an email address I got through a friend. No reply from him either. Mailed another guy, no reply, so I gave up I let them have their bug. I have ever since become an registered developer, and if you log in you have a bug report form there for you. I wonder why people that aren’t registered developers can’t report bugs. It’s not always easy to become one if you’re just a student.

[This message has been edited by Humus (edited 05-22-2002).]

Originally posted by KRONOS:
[b]I would like a board to… Not much, just a GeForce3 Ti2000, the cheapest you can deliver… Can someone from NVidia promise one too?!

That would be nice!!!
It sure would make my work easier, alas I can’t affort one…

Cheers…[/b]

You’re in the same situation as I am, can’t afford having multiple cards for ensuring compatibility with all vendors out there. Do like me, release a demo that becomes a great hit and hope someone notices it I put a lot of time and effort into my GameEngine demo . I was then offered a nVidia board, a job at nVidia, a job at ATi and a job at CryTek studios , not to count all those other coders around the world offering me to join their projects. Way beyond my expectations in all kinds of ways. Unfortunately, the nVidia job didn’t get through, after the interview they found me “hard to talk with”, a “communication barrier”. So I’m trying to get it through at ATi now. Interestingly, I never even thought about the idea of working with any of the major graphic vendors before nVidia first contacted me, my confidence hardly allowed me to think about working with any game developers. Somehow it verified for myself at least that I can produce some kickass code if I want to

Anyway, about the board, if it doesn’t arrive tomorrow I have to mail the guy again, I don’t think it should take FedEx 10 days to find my door, especially not as the flight tickets for the interview took like 3-4 days or so to arrive.

Originally posted by Humus:
I was then offered a nVidia board, a job at nVidia…Unfortunately, the nVidia job didn’t get through, after the interview they found me “hard to talk with”, a “communication barrier”.

Hey…how come they offered you a card? I never got offered one . They did fly me out for an interview. I got a similar response…except I wasn’t any good at marketing and they thought I wouldnt be any good working with developers. I thought I did excellent in every one-on-one interview, and cass and I had a blast talking on the phone. Then I had an interview with one of the managers, and he asked me some non-technical stuff I didnt know how to answer. Then we went to lunch and I got triple teamed by Cass, John, and Chris (no, really they were pretty nice about it, but I just felt really intimidated when someone asks a question and you have 3 absolute experts staring at you waiting looking for a response).

Not to take joy in your misfortune or anything, but I’m glad it wasn’t just me

The card story wasn’t directly related to the job story. When I released the demo it did at first not work on GF3’s, I revised it several times with the help of lots of people on various forums including this one. I soon got to the state where it at least didn’t crash, but still rendered incorectly. About that time one of the guys behind beyond3d.com had some contact with a guy at nVidia and sort of got us together via mail and asked this nVidia guy if he would mind sending me a board so that I could more easily debug it as I’m student who can’t afford buying one … etc.

Had a similar experience with the interviews, thought they all went just fine, well except for being a little nervous and thus was maybe a little slow on some questions. So when I got the mail later on telling me they had experienced a “communication barrier” I felt really confused, cause I didn’t really feel that was a problem at all, rather the opposite. I was more concerned about my performance when it came to certain questions they asked, I sometimes doubted even on simple stuff, like basic transformations. Somehow I’m thinking maybe they expected my to perform better after having seen my demos and such and maybe thought the questions didn’t get through or that I maybe misunderstood them and so on, when in reality I was just having a little performance anxiety.

For the sake of performance.

// These three instructions should be the same as
“MUL R0, R0, R0.w;”
“ADD o[TEX0].x,R0.x,v[NRML].x;”
“ADD o[TEX0].y,R0.y,v[NRML].y;”
// this one here:
“MAD o[TEX0].xy, R0, R0.w, v[NRML];”