05
Apr
08

Spherical Harmonics, NVIDIA Cards

Well, I’ve finally got around to trying the Spherical Harmonics qcClip on my new NVIDIA GeForce 8800GT-equipped MacPro.

Doesn’t work. Or rather, it renders with large holes in the mesh.

I’m working on a fix at the moment. It’s looking like it’s a problem with the pow() function, specifically when it receives values of zero or less. It seems on NVIDIA cards, the function returns ‘undefined’, which explains why many of the vertices are missing, where on ATI cards, a value is returned. It’s actually the NVIDIA card that is sticking more strictly to the GLSL language spec here. The trick is to find out what result the ATI card is producing, and reverse-engineer how it got there, to come up with some code that produces the same result on both systems. Sadly, that’s WAY beyond my meagre mathematical abilities. Fortunately, HexCat, from the OpenGL GLSL forum responded to my cry for help, and is very kindly working on an alternative method of calculating powers, which will hopefully emulate the way ATI do it.

He’s actually already come up with a very simple solution:

pow(abs(x),y);
instead of
pow(x,y);

The good news is, this renders fine on my NVIDIA-equipped MacPro. On the downside, it gives VERY different results to the original code running on my MacBook Pro. As soon as I’ve got a working solution, that gives the same results on both GPU architectures, I’ll post an updated tb_sphericalHarmonics.

Until then, it’s ATI-only, sadly…

Advertisements

0 Responses to “Spherical Harmonics, NVIDIA Cards”



  1. Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


Twitter

April 2008
M T W T F S S
« Mar   May »
 123456
78910111213
14151617181920
21222324252627
282930  

Links

Blog Stats

  • 468,884 hits

%d bloggers like this: