Displaced plane looks fine on NVIDIA, has cracks on ATI

  • Permalink
  • submit to reddit
  • Email
  • Follow


Hi,

my program does some simple displacement mapping using a vertex shader.
It works fine on NVIDIA chips, but not on ATI chips.

Here is the source code and the binary:
http://www.timosoft-software.de/stuff/dmtest.zip
The program uses the NeHe framework. I know that the NeHe samples partly
are of poor quality, but the problem also exists in a more complex
program that doesn't use the NeHe framework, so it must be *my* code
that's wrong.
The interesting things happen in DMTest.cpp. I load the textures, setup
a VBO for drawing a plane consisting of 240k vertexes and setup the
shaders. When drawing, I activate the shader program, load the color map
to texture unit 1 and the displacement map to texture unit 0, setup the
camera, and draw using the VBO.
The vertex shader reads from the (colored) displacement map, grayscales,
and displaces the vertex using the gray value:

gl_TexCoord[0].xy = gl_MultiTexCoord0.xy;
vec4 dv = texture2D(displacementMap, gl_MultiTexCoord0.xy);
float displacement = 0.30 * dv.x + 0.59 * dv.y + 0.11 * dv.z;
vec4 newVertexPos = vec4(gl_Normal * displacement * 100.0, 0.0) + gl_Vertex;
gl_Position = gl_ModelViewProjectionMatrix * newVertexPos;

This is what it looks like on my ATI Radeon HD3300 (Windows Vista x64)
and on an ATI Radeon HD4670 (Windows XP x64):
http://www.timosoft-software.de/stuff/dmtest.png
As you can see, there are cracks. Those cracks aren't there on a NVIDIA
Geforce 8800 GTS (Windows XP), 7300 GT (Windows XP) and 8800 GTX
(Windows Vista x64).
How do I make this work correctly on ATI? I've already tried different
drivers (8.12, 9.3, 9.4), but had no luck.

Thanks in advance
Timo

P.S.: In the sample program, use the arrow keys to rotate the mesh and
the C key to toggle backface culling.
-- 
www.TimoSoft-Software.de - Unicode controls for VB6
"Those who sacrifice freedom for safety deserve neither."
"Demokratie ist per Definition unsicher. Ihr Schutz entsteht aus der
Überzeugung, dass die demokratischen Kräfte überwiegen und sich – auf
demokratischem Wege – durchsetzen."
0
Reply Timo 4/15/2009 4:30:54 PM

See related articles to this posting


For completeness, here's a screenshot from a NVIDIA card:
http://www.timosoft-software.de/stuff/mapping.jpg

Timo
-- 
www.TimoSoft-Software.de - Unicode controls for VB6
"Those who sacrifice freedom for safety deserve neither."
"Demokratie ist per Definition unsicher. Ihr Schutz entsteht aus der
Überzeugung, dass die demokratischen Kräfte überwiegen und sich – auf
demokratischem Wege – durchsetzen."
0
Reply Timo 4/15/2009 5:15:51 PM

Timo Kunze wrote:

> [snip]

For me this looks like a culling problem. Do you use quads or
triangles as to-be-distorted mesh? If it's quads, try changing
into triangles by splitting the quads like

+---------+
|\       /|
| \     / |
|  \   /  |
|   \ /   |
|    +    |
|   / \   |
|  /   \  |
| /     \ |
|/       \|
+---------+

This should rule out any problems that may be caused by the quads
becoming concave, messing up the face direction or similiar.
Also it looks a lot better when used for a heightmap.


Wolfgang

0
Reply Wolfgang 4/15/2009 8:13:04 PM

Hi,

I already use triangles.

Timo
-- 
www.TimoSoft-Software.de - Unicode controls for VB6
"Those who sacrifice freedom for safety deserve neither."
"Demokratie ist per Definition unsicher. Ihr Schutz entsteht aus der
Überzeugung, dass die demokratischen Kräfte überwiegen und sich – auf
demokratischem Wege – durchsetzen."
0
Reply Timo 4/15/2009 8:44:44 PM

Timo Kunze wrote:

> Hi,
> 
> I already use triangles.

Ok, was just a thought.

But still it looks like if something is messing with the face
culling. So next question: Is face culling enabled? If so, try
what happens if you swich the culling mode from
glCullFace(GL_BACK) to glCullFace(GL_FRONT). If the missing
facets appear, then investigate further in that direction.


Wolfgang

0
Reply Wolfgang 4/16/2009 10:13:03 AM

Wolfgang Draxinger schrieb:
> But still it looks like if something is messing with the face
> culling. So next question: Is face culling enabled? If so, try
> what happens if you swich the culling mode from
> glCullFace(GL_BACK) to glCullFace(GL_FRONT). If the missing
> facets appear, then investigate further in that direction.

I call glDisable(GL_CULL_FACE), so culling shouldn't be the problem.

Timo
-- 
www.TimoSoft-Software.de - Unicode controls for VB6
"Those who sacrifice freedom for safety deserve neither."
"Demokratie ist per Definition unsicher. Ihr Schutz entsteht aus der
Überzeugung, dass die demokratischen Kräfte überwiegen und sich – auf
demokratischem Wege – durchsetzen."
0
Reply Timo 4/16/2009 2:17:47 PM

Got it working.
ATI cards have problems to chose the mipmap level when accessing
textures from vertex shaders. So you must use texture2DLod instead of
texture2D.

Timo
-- 
www.TimoSoft-Software.de - Unicode controls for VB6
"Those who sacrifice freedom for safety deserve neither."
"Demokratie ist per Definition unsicher. Ihr Schutz entsteht aus der
Überzeugung, dass die demokratischen Kräfte überwiegen und sich – auf
demokratischem Wege – durchsetzen."
0
Reply Timo 4/17/2009 7:04:18 PM

Timo Kunze schrieb:
> ATI cards have problems to chose the mipmap level when accessing
> textures from vertex shaders. So you must use texture2DLod instead of
> texture2D.
....or don't mipmap the displacement map.

Timo
-- 
www.TimoSoft-Software.de - Unicode controls for VB6
"Those who sacrifice freedom for safety deserve neither."
"Demokratie ist per Definition unsicher. Ihr Schutz entsteht aus der
Überzeugung, dass die demokratischen Kräfte überwiegen und sich – auf
demokratischem Wege – durchsetzen."
0
Reply Timo 4/17/2009 7:45:29 PM
comp.graphics.api.opengl 7103 articles. 24 followers. Post

7 Replies
138 Views

Similar Articles

[PageSpeed] 46


  • Permalink
  • submit to reddit
  • Email
  • Follow


Reply:

Similar Artilces:

Meet The New Linux Open Source Video Card! Look out ATI and Nvidia!!
This puppy is going to be a killa dilla! http://www.phoronix.com/scan.php?page=news_item&px=NjM1NQ " The current Project VGA board has 16MB of SD RAM, Xilinx Spartan 3 s400 FPGA under 100MHz, and uses the PCI bus. These first-run prototypes will cost over $200 USD with no guarantees to work or warranties." Nvidia and ATI had better watch out because this baby is going to take over the market! -- Moshe Goldfarb Collector of soaps from around the globe. Please visit The Hall of Linux Idiots: http://linuxidiots.blogspot.com/ Moshe Goldfarb <brick.n.straw@gmail.com> writ...

ATI or nVidia?
What are everyone's opinions on ATI vs. nVidia cards in a Dual Format? I am putting together a new system and trying to get some opinions of what others are doing out there and there pros and cons to the Dual Video Card format and which brand they have seen better performance out of... Thanks in advance! Also...Does anyone have an opinion if I am better off to purchase (1) 512MB video card or (2) 256MB cards for a system? I don't think I am going to be able to afford (2) 512MB cards, so I need to make a choice... I will only be running (2) 19" LCD's (DVI of course). Thoug...

Wii Madden graphics: ATI vs ATI vs Nvidia
IGN Wii: Let's talk about graphics. Right or wrong, Madden for Wii is undoubtedly going to be compared to the GameCube build. Meanwhile, we've been playing a lot of the 360 version. In terms of visuals, where does the Wii incarnation fit in? Jason Armenise: We get the graphics question all the time. Every time we talk about the game we get the graphics question. A lot of people - even passionate Nintendo fans - are kind of dismissing the graphics, saying, "We know it's going to be third, yadda, yadda, yadda." We didn't take that attitude. Right from the beginning, w...

Looking for cracks!
Hey guys, I'm looking for working cracks for different EDA Tools. Actually I'd need a working crack / patch to avoid the license mechanism of ModelSim, Cadence, Synopsys etc.!! Can anyone help me?? Cheerz, RAFF Gallo Raffaele wrote: > Hey guys, > I'm looking for working cracks for different EDA Tools. Actually I'd > need a working crack / patch to avoid the license mechanism of > ModelSim, Cadence, Synopsys etc.!! > Can anyone help me?? Hello, you don�t sound, as if you are able to use more than the features included in the evaluation /student versions of t...

nvidia or ati
I'm going to upgrade my system in a few months, and am researching components. The system will probably be a dual Opteron on a Tyan board. Currently I'm using a 3dfx voodoo5-5500 card (yes, that was fast at one time). I plan to use an AGP (up to AGP 8x for the mobo I'm getting) video card, and I want it to have video in (presumably via v4l). TV tuner is not important, but you seem to get that if you get video in. Currently, I'm running xfree 4.4, kde-3.2, linux-2.6.6, slackware-current. By the time I get the new box, I'll probably run the latest versions of the same. ...

nvidia or ati
what card is better supported about kernel? tnx In article <pan.2004.05.30.16.44.38.402360@SEGUEtiscali.it>, NighTiger <nightigerTOGLI_QUANTO@SEGUEtiscali.it> wrote: > what card is better supported about kernel? It depends what you want to do with it. I have an ATI All-in-Wonder 8500DV. I couldn't get it to use its TV-out, so I had to use XP on that machine. Apparently there's some sort of driver dispute involving the DMCA. So if I were buying again, I'd choose Nvidia. TV-out may not matter to you, though. -- -eben ebQenW1@EtaRmpTabYayU.rIr.OcoPm home.t...

ATI and nVidia
What is the current state of drivers from both companies? Which is better quality? Will I be able to use either without drivers for basic usage (obviously without making best use of the card), as Linux isn't my gaming platform of choice? I just want to avoid having one video card for windows, and use my onboard one for linux. Oli ps I have no problem with running binary drivers... Heathen! i hear you cry... "Oli" <colh1.5.stormeagle@spamgourmet.com> wrote: > What is the current state of drivers from both companies? I think both ATI and nVidia consider their bin...

You Look So Fine
Whoops, blue not present in airplane signal. System: New code system (Murder) BLACK Old code system (Artichoke) WHITE Surprise me (Either) OLIVE ...

Wii Madden graphics: ATI vs ATI vs Nvidia
IGN Wii: Let's talk about graphics. Right or wrong, Madden for Wii is undoubtedly going to be compared to the GameCube build. Meanwhile, we've been playing a lot of the 360 version. In terms of visuals, where does the Wii incarnation fit in? Jason Armenise: We get the graphics question all the time. Every time we talk about the game we get the graphics question. A lot of people - even passionate Nintendo fans - are kind of dismissing the graphics, saying, "We know it's going to be third, yadda, yadda, yadda." We didn't take that attitude. Right from the beginning, w...

Nvidia or Ati
I have an ATI 7000 video card that will not work (At least for me). Would an Nvidia card be easier for linux to autodetect I am thinking about getting a cheap mx400 just to get my com working with Redhat. I tried other distros with the ATI card and none seem to work. They detect the right card alright, then all I get is a blank screen when the install completes. If anyone has any suggestions on a good card for under 100 bucks. My only other alternative is an old Matrox Productiva G100 which is only an 8mb card. Steve In article <Hr1Ub.397823$X%5.343869@pd7tw2no>, Steve Longs...

ATI or Nvidia?
Hi, I'm planning to buy a new graphic card fo my Debian Squeeze box (EM64T). Until now I've always bought Nvidia cards because of their (fairly) good Linux support, even though their drivers are proprietary. I don't like too much having these proprietary drivers "tainting" my kernel, so I'm guessing if it's time to switch to ATI cards because of their releasing of open source drivers. What should you suggest? Where could I find some performance tests between those two kind of drivers? Thanks for answering. -- toglimi.hamradio@toglimi.quipo.it ANTI-SPAM: ple...

ATI or NVIDIA ?
Howdy All ! so I am building a new system and am trying to decide which Video Card to get. It seems both ATI and NVIDAI have very similar High-End cards: PCI-Express, Dual DVI, 256MB DDR2, etc. In the past I used NVIDIA, because there just was no alternative. Their driver support for linux is just so-so ... But I have not used ATI, since I had an ATI card in a Notebook half a decade ago. What is the general opinion of this group, which one provides better drivers and support ? Most important issues is obviously drivers for ANY kind of linux and home build kernels ... I am ...

ATI or nVidia?
What are everyone's opinions on ATI vs. nVidia cards in a Dual Format? I am putting together a new system and trying to get some opinions of what others are doing out there and there pros and cons to the Dual Video Card format and which brand they have seen better performance out of... Thanks in advance! Also...Does anyone have an opinion if I am better off to purchase (1) 512MB video card or (2) 256MB cards for a system? I don't think I am going to be able to afford (2) 512MB cards, so I need to make a choice... I will only be running (2) 19" LCD's (DVI of course). Thoug...

Font looks fine in 3rd party app, but looks tish in VB6
Hi I've just set a label to use my TrueType font in my VB6 app and it looks horrible. If I use this same font in say Adobe Photoshop it looks great. It appears that VB6 does give a nice aliased look to the font that is why it looks poor. Is there anyway round this in VB6? Thank you XAM Xam, You should get in the habit of CrossPosting and not multiposting. You multipost every question you post and people in each newsgroup may not know that there are answers already in another. You are potentially just wasting their time... This question has already been answered in another news...

Nvidia PR vs ATI PR: It is time for an Nvidia company restructuring
http://www.gamersdepot.com/ed/mkting_hype/002.htm http://www.xbitlabs.com/news/video/display/20031114041519.html I think these articles, which juxtapose Nvidia PR vs. the ATI PR response, encapsulate what is wrong with Nvidia. It is evident that the Nvidia Marketing&PR Department has a grossly inflated operational control of the company, to the point where every Nvidia press release is entirely full of spin and mis-information, and cannot be believed. The Nvidia Marketing Department is out of touch with reality, out of touch with their own Driver&Development Departments, and is comp...

Its working just fine but does it look good? Take a look and give me your advice!
I got to say that this is my first finnished labview program, and&nbsp; it's working fine, almost no problems. But i'm not that shure about this huge while loop with all its instructions. Normaly a while loop takes 1 ms to iterate once, but this loop takes more than one ms, I'm using another subVI to catch data up to 5 ms. / sample as output from measurement device to&nbsp; the while loop in this Sub vi, and then from this sub VI i'm initializing the data value&nbsp;read from the Measurement device, to a global variable that i read in this huge while loop.&nbs...

IE Looks fine, Mozilla looks garbled, Positioning Help please
Hi, I've run into a problem with IE 6 vs. Mozilla when displaying a completely CSS positioned page, and was wondering if any resident CSS guru might quickly be able to find the problem(s). Thank you. In IE, the page looks how I want it to look (picture below): www.sunbadgeco.com/sunmetal/ie.jpg In Mozilla Firefox, somehow it's not quite right (pic below): www.sunbadgeco.com/sunmetal/mozillafirefox.jpg Here is the CSS and HTML (with some omissions for brevity): body { background-image: url(../images/bg.jpg); border: 4px inset #454545; width: 636px; margin: 20px a...

Web site looks terrible under Firefox and Netscape, looks fine under explorer
My site, http://www.psych.nmsu.edu/~jkroger/lab/index.html was developed using Explorer to check it. But it looks awful under Firefox 1.0 and Netscape 7.2. Anyone have any ideas what I should do? Thanks in advance for any help... Jim On 5 Dec 2004 10:23:56 -0800, kroger@princeton.edu (Jim Kroger) wrote: >My site, > >http://www.psych.nmsu.edu/~jkroger/lab/index.html > >was developed using Explorer to check it. But it looks awful under >Firefox 1.0 and Netscape 7.2. > >Anyone have any ideas what I should do? > >Thanks in advance for a...

Nvidia PR vs ATI PR: It is time for an Nvidia company restructuring
http://www.gamersdepot.com/ed/mkting_hype/002.htm http://www.xbitlabs.com/news/video/display/20031114041519.html I think these articles, which juxtapose Nvidia PR vs. the ATI PR response, encapsulate what is wrong with Nvidia. It is evident that the Nvidia Marketing&PR Department has a grossly inflated operational control of the company, to the point where every Nvidia press release is entirely full of spin and mis-information, and cannot be believed. The Nvidia Marketing Department is out of touch with reality, out of touch with their own Driver&Development Departments, and is comp...

Bad news for ATI: Nvidia to 'own' ATI at CeBit
Bad news for ATI: Nvidia to 'own' ATI at CeBit / no pixel shader 3.0 support in R420 It looks like R420, while potentially up to 3 times faster(in PS 2.0 and VS 2.0 shaders) than R360, will not be PS 3.0 compliant. If NVIDIA notches up similar PS 2.0 performance, ATI is in trouble. quote: -------------------------------------------------------------------------------- Lastly there is word on the NV40 R420 front. Neither card was shown, but several people who would be familiar with both have said Nvidia is going to come back very strong soon. The word 'own' was bandied abou...

Bad news for ATI: Nvidia to 'own' ATI at CeBit
Bad news for ATI: Nvidia to 'own' ATI at CeBit / no pixel shader 3.0 support in R420 It looks like R420, while potentially up to 3 times faster(in PS 2.0 and VS 2.0 shaders) than R360, will not be PS 3.0 compliant. If NVIDIA notches up similar PS 2.0 performance, ATI is in trouble. quote: -------------------------------------------------------------------------------- Lastly there is word on the NV40 R420 front. Neither card was shown, but several people who would be familiar with both have said Nvidia is going to come back very strong soon. The word 'own' was bandied abou...

Ati vs. Nvidia
I have now experience with Quadro 580 XGL (1 year) and ATI Fire GL 3100 (1 week). Now it looks like that Ati is more stabil than Nvidia. Quadro crashed SW 2005 SP5 at least twice a day, Ati has not crashed at all, yet. How many Quadro cards did you test? How many ATI? This is not the place to post that you got an ATI card to work more reliably than an Nvdia or any other card. Forget about even claiming that it works! I posted a minor zoom issue that I solved and it started an ATI bashing thread that is probably a hundred messages long. I was called a liar when I said I got the ca...

Not decrementing, but it looks fine??
Got a weird problem with some code, i use exactly the same method to increment the JSlider, but it doesnt decrement, i cant work it, nor have any ideas. Anyone got an idea? Heres the main part of the code: move1,move2,state and currentPos are all int's set to 0. 2 JButtons, jButton 1 does: currentPos = 1; timer.start(); JButton2 does: currentPos = 2; timer.start(); ######################################## private void timerOnTime(java.awt.event.ActionEvent evt) { if(currentPos == 1) { while((move1 >= 0)&&(move1 <= 66)) { ...

What a Fine Looking Bunch!
RMS STILL looks like he hasn't bathed in years and I'll bet if he cut off that beard it would upset the entire ecosystem! Take a look at these geeks!!!!!!!!!! Holy Dorko Batman! It's a regular Geek_A_Torium..... BTW, if you look REAL CLOSE...you will see the flatfish in there. http://www.flickr.com/photos/fcb/sets/1485493/ Is this the Flatfish? http://www.flickr.com/photos/fcb/68910634/in/set-1485493/ RMS was in NYC in Winter. It's rediculously cold here this time of year. Which one is the homeless person holding up a FEED ME sign? Must have written a program, gave ...