Archived

This topic is now archived and is closed to further replies.

Ahh Cg is so frusterating!!

This topic is 5148 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I went out and purchased a top of the line video card the radeon 9800 pro specifically so I could program vertex/pixel shaders. Then I go out and purchase the book the Cg Tutorial which has the Cg Toolkit on it that has all the example programs in it to use. The thing is my video card doesn''t support any of the examples it says my hardware doesn''t have the required extensions to run the samples! I spent 300+ on the video card and I can''t run any of the examples? Arg! sigh.. I guess I just need to vent maybe drop kicking my Cg book at my graphics card will help.

Share this post


Link to post
Share on other sites
no, cg can be used on every graphic card supporting either DX or GL;
cg is nothing else than another highlevel language which compiles down the code at runtime to either DXHLSL or GLARBasm code. i think your problem is a settin's one; i haven't read the book, but i'm sure that there is an explanation how to setup the IDE.

but: as said in other threads, the cg compiler does some ugly things which seems to driving ATI cards wierd, but not nvidia's one.

i would advise you to keep your radeon - why give it back ? to get a GFFX which needs two slots because of its fat coolers ?
(the only bad thing with ATI cards is that the drivers are not as good as nvidia's one)

>>have the required extensions to run the samples!
both are supporting vertex/pixelshader 2.0, so i see no reason why it shouldn't run.




DJSnow
---
this post is manually created and therefore legally valid without a signature


[edited by - DJSnow on November 7, 2003 8:52:03 PM]

Share this post


Link to post
Share on other sites
Sounds like the toolkit is specifically looking for the nvidia extensions, and not the ARB extensions. Or something.

The examples don''t work, but Cg most certainly does. (I got my radeon 9700 for exactly the same reason you did)

I''m hip because I say "M$".

Share this post


Link to post
Share on other sites
But it is using ARB extensions, here is an example of an error message I get

quote:

Title: Cg Tutorial Examples - Bump Error

Sorry, you are unable to view this effect because it requires extensions that your hardware does not support.
Here are the unsupported extensions:
GL_ARB_vertex_program
GL_ARB_multitexture
GL_ARB_texture_compression
GL_EXT_texture_compression_s3tc
WGL_ARB_pbuffer
WGL_ARB_pixel_format
WGLB_ARB_render_texture



I''ve also downloaded the latest driver for my videa card so that shouldn''t be a problem.

Share this post


Link to post
Share on other sites

mmh...interesting:

GL_ARB_vertex_program appears in the list, but not the fragment program (on an radeon9800!) - this means it supports the fragment program, but not the vertex program.
have you already tried to re-install the driver ? (after cleaning out the registry from all ati stuff?)

though, it may be that the card is damaged; but this would have a bigger impact on the working on the card than only not-to-support a extension, i believe (but, i have seen very funny hardware bugs in my life, so you can''t exclude that) but..mmhmmm; i''m pretty sure that this is not the problem. but, if you don''t come along perhaps it may be worth to try it out.





DJSnow
---
this post is manually created and therefore legally valid without a signature

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
somethings wrong if you can''t even find GL_ARB_multitexture, try reinstalling the card / drivers

Share this post


Link to post
Share on other sites
It''s likely you''re not getting hardware OpenGL.

Go to http://www.ati.com/ and download Catalyst 3.9. They''re much more stable than 3.8, and should support all the features of the 9800 just fine.

The only think that CG doesn''t do on Radeons is work with the 3dsmax plug-in, apparently that''s neutered to work with NVIDIA cards only. Kind-of a shame, as we''re not likely to use a tool which half of our artists can''t use.

Share this post


Link to post
Share on other sites
You''re probaly right hplus0603, I''m not getting hardware OpenGL. The thing is I''ve downloaded Catalyst 3.9 twice now and I''m still not getting the extensions!

Ugg, why is this so difficult?

Share this post


Link to post
Share on other sites
Does Quake 3 work with your new card?

Your best bet would be to NOT use Cg and rather use HLSL or ARB_vp/ARB_fp. You''ll get better speed on your Radeon if you don''t use Cg (apparently NVIDIA has put in lots of unneeded calls in the Cg code that their drivers filter out, but it really slows down ATI cards... or so I heard )

My Website | Everything you need to know about 3D Graphics | Google | Search the Forums

Share this post


Link to post
Share on other sites
quote:
Original post by Luke Philpot
Does Quake 3 work with your new card?

Your best bet would be to NOT use Cg and rather use HLSL or ARB_vp/ARB_fp. You''ll get better speed on your Radeon if you don''t use Cg (apparently NVIDIA has put in lots of unneeded calls in the Cg code that their drivers filter out, but it really slows down ATI cards... or so I heard )



Hmm, is that true?

Share this post


Link to post
Share on other sites

@ph33r:
>>Ugg, why is this so difficult?
usually it''s not that difficult - it seems that your situation/machine is something like special case (for all of use)


@Sunray:
>>Hmm, is that true?
yes, i have read this several times in the last couple of days; in other threads too. it logical, that nvidia would do something like this - if you were the boss of nvidia, you would do the same to swear-on everyone on you technique/hardware.




DJSnow
---
this post is manually created and therefore legally valid without a signature

Share this post


Link to post
Share on other sites
quote:
Original post by Sunray
Hmm, is that true?


No, it''s not.

The output is not as well optimized as for nVidia targets, that''s obvious. But it''s not true that they are intentionally sabotaging the output for ATI. This rumor came up with the 9700 series, which didn''t support a certain type of swizzle/masking combination in the GPU. The GFFx did. So logically, Cg compiled operations of this type into a single native command on an nVidia card, but into several (going over a temporary) on 9700 cards. That''s not nVidias fault, but simply an unsupported feature on ATI chipsets. There might have been better way to optimize code for specifically that chipset, but its not really nVidias job to optimize their language for the competitions products. Cg is open source, ATI could''ve just downloaded it, and fixed the problem themselves.

But anyway, the 9800 and above support the critical operation in hardware, and will get the same output as nVidias cards.

Share this post


Link to post
Share on other sites
in my opinion... if you''re going with Nvidia then use Cg and the related tools, but if you''ve got an ATI then stick with RenderMonkey.

This is entirely subjective I know, but I see ATI''s tools as far far more professional than Nvidia''s.. I dunno, but I just don''t get the "helpful" vibe from either their website or support dept. I''ve read most of the tutorials ATI put out, and everytime I had a question/problem and emailed devrel@ati I got a reasonable reply within 2 days.

quote:
the only bad thing with ATI cards is that the drivers are not as good as nvidia''s one

not 100% sure on this one, but haven''t all the ''leet benchmarkers/hardware freeks been running round in circles shouting at each other about how nvidia''s drivers keep doing silly things to retail games (that ATI dont)? (missing effects/optimization stuff?!)

Jack,

PS - in case you hadn''t guessed, I am unashamedly an ATI fanboy. Too many bad experiences on the FX cards/recent drivers pushed me to ATI, and haven''t been happier since



DirectX 4 VB: All you need for multimedia programming in Visual Basic
Formula 1 Championship Manager, My Game Project.

Share this post


Link to post
Share on other sites
While we appear to be comparing shader programming on the ati and nvidia hardware, I have a question ...

If you were going to program a ray tracer on the GPU which card would you buy to do it on? I believe Nvidia supports extra instructions and better flow control than the 9800, such as call/ret which could make the programming easier. However Ati seems to be the faster of the two when it comes to shaders.

I have no experience of PC shader programming, though I have worked with the PS2 VU's. Could anyone point me towards any good HLSL tutorials or pages with detailed comparisons between ati/nvidia capabilities in this area.

Basically im a little unsure which card to buy to help me learn directx9 shaders and implement my ray tracer.

Regards
McDusty

[edited by - McDusty on November 8, 2003 1:46:37 PM]

Share this post


Link to post
Share on other sites
I''ve heard of a bug in Catalyst 3.9 which can prevent OpenGL from working. If you look on the ATI site, there should be a hotfix for it. There''s also something on rage3d.com somewhere. Hope that helps.

Share this post


Link to post
Share on other sites
quote:
Original post by Crazy_Vasey
I've heard of a bug in Catalyst 3.9 which can prevent OpenGL from working. If you look on the ATI site, there should be a hotfix for it. There's also something on rage3d.com somewhere. Hope that helps.


Hmm, for me OpenGL works fine, but Direct3D dosent. :-)

[edited by - sunray on November 9, 2003 2:25:13 PM]

Share this post


Link to post
Share on other sites