Author Topic: Geforce 4 bug and bump mapping and open source?  (Read 2562 times)

0 Members and 1 Guest are viewing this topic.

Offline RandomTiger

  • Senior Member
  • 211
Geforce 4 bug and bump mapping and open source?
Has anyone else who has a GeForce 4 Ti 4600 experienced a very annoying visual bug in the animations and fonts?

They are scaled slightly wrong and it makes it look awful. I have taken the code and fixed this bug. I havent had the chance to see what effect my 'fix' has on other cards. I also havent been able to determine if it only happens on XP. Anyone who wants to see the code change (its very small) should contact me.

I just want to highlight this problem so that it us GF4 users dont miss out.

Secondly I think higher res textures and bumpmapping would make the biggest impact on this game visually.

Finally can someone confirm that any additions to freespace like bumpmapping will remain open source for everyone so if no-one bothers to fix my Geforce problem at least I can fix it myself and benifit from new developements?

 
Geforce 4 bug and bump mapping and open source?
Hey,

I have a Ti 4600 and its all screwed up too.  Do you think you could send me the fix?
Ich kann nicht eine Sache des Deutschen sprechen!!

 

Offline RandomTiger

  • Senior Member
  • 211
GEFORCE 4 BUG FIX CODE!!!!!!!!!!!!!!!!!
Im glad its not just me! What OS do you have and what make of GeForce?

-------------------
OK just for the record this is a fix for the Geforce 4 only, I have no idea (currently) what effect it has on other cards.
-------------------

FILE: GrD3DRender.cpp
FUNC: gr_d3d_aabitmap_ex_internal
LINE: 1485 (aprox)

OLD: (replace this)

   // Rendition
   if ( D3d_rendition_uvs )   {
      u0 = u_scale*(i2fl(sx)+0.5f)/i2fl(bw);
      v0 = v_scale*(i2fl(sy)+0.5f)/i2fl(bh);

      u1 = u_scale*(i2fl(sx+w)+0.5f)/i2fl(bw);
      v1 = v_scale*(i2fl(sy+h)+0.5f)/i2fl(bh);
   } else {
      u0 = u_scale*i2fl(sx)/i2fl(bw);
      v0 = v_scale*i2fl(sy)/i2fl(bh);

      u1 = u_scale*i2fl(sx+w)/i2fl(bw);
      v1 = v_scale*i2fl(sy+h)/i2fl(bh);
   }



MY CHANGES: (with this)

   // Rendition RANDOM_TIGER GEFORCE 4 FIX
      if (D3d_rendition_uvs )   
   {
                               // This top bit is the same
      u0 = u_scale*(i2fl(sx)+0.5f)/i2fl(bw);
      v0 = v_scale*(i2fl(sy)+0.5f)/i2fl(bh);

      u1 = u_scale*(i2fl(sx+w)+0.5f)/i2fl(bw);
      v1 = v_scale*(i2fl(sy+h)+0.5f)/i2fl(bh);
   }
   else
   {
                               // However this bit needs to be -0.5
      u0 = u_scale*(i2fl(sx)-0.5f)/i2fl(bw);
      v0 = v_scale*(i2fl(sy)-0.5f)/i2fl(bh);

      u1 = u_scale*(i2fl(sx+w)-0.5f)/i2fl(bw);
      v1 = v_scale*(i2fl(sy+h)-0.5f)/i2fl(bh);
   }

-------------------

I hope this helps.
If this doesnt work or you have problems give me a shout.
Let me know if it does work out too! Watch the hall anims, you may not notice but they are slightly out as well (before fix).

 
Geforce 4 bug and bump mapping and open source?
I have  a problem.  Where do I put this? :o

If I have to put this in the source we have a problem also.  I know nothing of the language and have no compiler.  Could you put it in and exe like Bobbau(sp?) did with his fighter beams?
Ich kann nicht eine Sache des Deutschen sprechen!!

 

Offline RandomTiger

  • Senior Member
  • 211
Geforce 4 bug and bump mapping and open source?
Sure, do you want me to e-mail it to you? Only problem is that any exe I make from the FS2 code will not play any of the big movies due to interplay not allowing their code to be released.

Still its the lesser of two evils.

 

Offline DTP

  • ImPortant Coder
  • 28
    • http://www.c4-group.dk
Re: Geforce 4 bug and bump mapping and open source?
Quote


Finally can someone confirm that any additions to freespace like bumpmapping will remain open source for everyone so if no-one bothers to fix my Geforce problem at least I can fix it myself and benifit from new developements?


Unless you break something, and as long as you program in an option to turn it off, like a command line switch -bumpmap that will enable bump mapping. That should be there in case some cards don’t support it or it slows down performance considerable.

Your additions will stay as they are.

Some may even improve on them.

That’s the terms of Open Source
VBB member; reg aug 1999; total posts 600.
War is a lion, on whos back you fall, never to get up.
Think big. Invade Space.

 

Offline Inquisitor

Geforce 4 bug and bump mapping and open source?
Seems to be a tested bit, that fixes a genuine problem. Whe nI get out to my dev machine I can make it, otherwise, someone with write access can get to it.
No signature.

 

Offline RandomTiger

  • Senior Member
  • 211
Just for the record heres the test results
Worked on all the following:

OUTSIDER Voodoo 3 win98
OUTSIDER Geforce 2 win2000
Me Geforce 4 PNY 4600 XP
JBX-Phoenix Geforce 4 PNY XP
Mehrunes GeForce 3 XP
WMCoolmon nVidia TNT2 M64 win2000
Orange GeForce 4 4200 XP
ShadowWolf_IH Monster2 win98
ShadowWolf_IH  voodoo 2 win98

 And probably some other people who havent got back to me.