PDA

View Full Version : Nvidia CG on ATI



maximian
12-25-2003, 05:49 PM
Is there any way to run(emulation or crosscompiler) CG programs on ATI hardware. I was looking at several example programs in CG and it was much better than some of the scary assembly programs I saw. I have developed in x86 and 68K motorola assembly, but was looking for something easier to work with. I appreciate any comments, suggestions...

soconne
12-25-2003, 05:55 PM
Yes, just download CG from nvidia's web site along with the tutorials and they'll run. As long as you have an ATI 9500 or above. At least one that supports fragment shaders.

maximian
12-25-2003, 06:03 PM
But the examples I saw, had you write a text file, in their case, ending with .cg, which was loaded during runtime. The program also used the cg.dll. I want to make sure, that this will run on ATI hardware. Sorry for asking twice.

V-man
12-25-2003, 06:23 PM
Im not an expert with cg, but basically you have to ask the cg compiler to compile for a specific target

I think this is the line that will do it

cgGLEnableProgramType(cgGLVertexProfile);

it asks for ARB_vp and ARB_fp

Consult the manuals for more info.

soconne
12-25-2003, 06:35 PM
I have a Radeon 9800 Pro and I've downloaded the CG files and run the examples with no problems at all, and no modifications. It should work the same for you. What card do you have?

maximian
12-25-2003, 06:40 PM
Okay, I understand now. My question is, I am targeting simple vertex shaders, ie 1.0. Basically, I am aiming for it to run on Geforce 3 and above. And also on a Radeon 8500 and better. I do not have all this hardware to test, will simple cg programs, no fragment programs, just simple vertex shaders work on this kind of hardware. Sorry for asking such simple questions.

jra101
12-25-2003, 09:50 PM
If you use the arbvp1 profile for your vertex shader, you should have no problem running the shader on all cards that support ARB_vertex_program.

davepermen
12-26-2003, 01:57 AM
hm.. the asm is the most simple asm ever seen.. should not be that scary. it just has asm syntax, but _that_ is not a real problem.

then there is glslang, supported on ati cards, wich should sooner or later be supported on nvidia cards, too..

but all in all, cg samples ran well on ati hw, without real problems.. the ones runable on it, of course.. nv30 special ones won't ever work, but all ARBfp/ARBvp ones will..