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…
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.
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.
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
it asks for ARB_vp and ARB_fp
Consult the manuals for more info.
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?
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.
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.
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…