Graphics engine does Pixel jumping

A discussion area for general design issues that staff would like detailed feedback on.

Moderator: Staff

User avatar
Roots
Dictator
Posts: 8644
Joined: Wed Jun 16, 2004 6:07 pm
Location: Austin TX
Contact:

Re: Graphics engine does Pixel jumping

Postby Roots » Fri May 23, 2008 8:41 pm

The rounding problem also stems from the hardware. Both nvidia and ATI cards employ custom floating-point notation numbers of various bit sizes. I believe that more modern graphics cards are all supporting 32-bit floats now that are almost IEEE 754 compliant, but we can't guarantee on having a consistent rounding/floating-point number scheme across all our different supported platforms and hardware.


I'm not sure what an acceptable solution to this problem may be. My best guess right now is to keep our floating point representation in the video engine API, but internally have the video engine convert those floats to ints prior to making the OpenGL draw calls. I don't feel like I know enough about computer graphics to comment on this further, and I don't want to make any presumptions without an expert around.
Image
User avatar
prophile
Senior Member
Posts: 324
Joined: Fri Jan 27, 2006 7:18 pm
Location: Chaldon, Surrey, UK
Contact:

Re: Graphics engine does Pixel jumping

Postby prophile » Fri May 23, 2008 11:52 pm

That's not going to work - most GPUs don't understand ints. Your int values would be converted back to floats, but now with the added overhead of having rounded all floats to ints and casted them back to floats along the way.
Alastair Lynn / Resident Whinger / Allacrost
User avatar
ElonNarai
Developer
Posts: 207
Joined: Sat Apr 19, 2008 2:43 pm
Location: Netherlands
Contact:

Re: Graphics engine does Pixel jumping

Postby ElonNarai » Sat May 24, 2008 1:11 pm

Ok, but we are already using floats and we are not making it a network multiplayer game so I don't see the problem even if the implementation of floats are different.

However, subtexel (subpixel is for polygons) is a way to go around rounding problems (int to float cast). Anyway I will start working on it as soon as I have finished this post so that we can see what is the best way to fix it.
Documenter and coder
Image
User avatar
Drakkoon
Developer
Posts: 173
Joined: Thu Jan 11, 2007 12:54 am
Location: Montréal, Qc

Re: Graphics engine does Pixel jumping

Postby Drakkoon » Sat May 24, 2008 1:13 pm

ElonNarai wrote:Ok, but we are already using floats and we are not making it a network multiplayer game so I don't see the problem even if the implementation of floats are different.


This was brought up because there are big differences in the rendering on Mac and Linux, it might be related to that.

Return to “Design”

Who is online

Users browsing this forum: No registered users and 1 guest