NVIDIA's Pixel & Vertex Shading Language
Barkhausen Criterion writes "NVIDIA have announced a high-level Pixel and Vertex Shading language developed in conjunction with Microsoft. According to this initial look, the "Cg Compiler" compiles high level Pixel and Vertex Shader language into low-level DirectX and OpenGL code. While the press releases are going amok, CG Channel (Computer Graphics Channel) has the most comprehensive look at the technology. The article writes, "Putting on my speculative hat, the motivation is to drive hardware sales by increasing the prevalence of Pixel and Vertex Shader-enabled applications and gaming titles. This would be accomplished by creating a forward-compatible tool for developers to fully utilize the advanced features of current GPUs, and future GPUs/VPUs." "
Hopefully NVidia will be able to avoid the proprietary pitfall that ultimately doomed 3dfx and Glide.
From the story it sounds like NVidia will allow other cards to support Cg so maybe they can. However I wonder if ATI will be willing to support a standard which NVidia controls. It's like wrestling with a crocodile if you ask me!~
News.com had this story for awhile.
My biggest question - from reading this, this would actually work correctly on other competing VCards... why did nVidia create it?
--- Ãther SPOON!
Remember 3dfx's GLIDE libraries? This could end up like those... an "industry standard" supported only by one manufacturer's chipsets, used by all major games. At least 3dfx made good, cheap cards before they died, though.
If it doesn't work with my RADEON, it must be evil!
Every cloud has a silver lining (except for the mushroom shaped ones, which have a lining of Iridium & Strontium 90)
If we wanted cutting edge Pixels, we'd go back and play Wolfenstein. Man, I remember those days, the people with sharp features and a whole four frames of animation. And we were glad to have it, too.
You've got to wonder, is this yet another load of Nvidia corporate hype (a la "HW TnL will revolutionise gaming"), or is this useful technology? I wouldn't trust any of the current articles on answering that, judging by the previous Nvidia hypes, it takes a few months till anyone really knows if this is good or bad.
Switch back to Slashdot's D1 system.
While I this is a great move by NVIDIA to increase the use of Pixel and Vertex Shader in games, is this wholly proprietary? I mean wouldn't it be better for ATI to have a hand in it as well, to work out a standard to make it easier for game developers? I just hope this doesn't turn out like 3dfx..
The real test will be how well the crosscompiler outputs OpenGL 2 & DX 9 shaders in practic, not theory.
But let's be serious: cel shading is the only shading anyone really needs. ^^
[o]_O
I'm buying one right away, and praying that they become industry standard. The next "Amy men" game will be all the sweeter, along with Pac-man 3D!
But will this result in the bloated code so prevailant in other Microsoft applications? Anyone who has ever seen the source of Billy Joe's webpage that he made using FrontPage can attest to the fact that the Redmond crew love to throw in all sorts of extra nonsense. In an area that is already so resource intensive, can we really afford the bloated code? Hopefully it will be a non-issue.
Posting as directed.
This means nothing to me until John Carmack gives the seal of approval. Until then it might as well be BitBoys "Oy! Cg!"
Now, it should be easier to port code to non-MS platforms because the compiler outputs both DirectX and OpenGL.
What are you talking about?? Nvidia makes great linux drivers - and from looking through the pages it looks to me like Cg just outputs regular OpenGL (Well - Nvidia-OpenGL anyway) so I would venture a guess that any of these will run just fine on the nvidia linux drivers.
:-(
My only problem is that the toolkit itself is only for windows
Anyone try it with Wine/Winex yet?? I might when I get home.
Derek
According to the web site, they are working to implement this on top of both OpenGL and DirectX. On linux and Mac as well.
Basically this is a wrapper for the assembly that you would have to write if you were going to write a shader program. It compiles a C-like (as in look a like ) language into either the DirectX shader program or the OpenGL shader program. So you'll need a compiler for each and every API that you want to support. Which means that you'll need a different compiler for OpenGL/Nvidia and OpenGL/ATI until they standardize it.
On a more technical note, the lack of branching in vertex/pixel shaders really needs to be fixed, it's really the only feature that they need to add to them. Which is why the Cg code looks so strange, it's C, but there's no loops.
That's like asking which of the following would I rather do...
a) have a 3-way with two hot chicks
b) clean the floor behind my refrigerator
I wonder.
Has OpenGL 2.0 a chance now? Is anyone capable to compare those?
Hi.
I'm twenty five years old, and up until two weeks ago, I was a virgin. Too many celibacy had worn my self-esteem down to the point where I was finally willing to pay for sex. I'll spare you the details of the event, as this is not what I am writing about.
After having completed the act, the prostitute whose services I had rented immediately exclaimed that something had felt weird. With no particular ceremony, she grabbed my now-flaccid member and subjected it to an intense examination, while biting her thumbnail in consternation.
After a brief period, she informed me that my penis was deformed, in her professional opinion. I had spent my entire life without ever seeing another man urinate, so I was not aware that the output usually emits from the end of the head, not the underside, where mine does.
I'd like to know if I should seek the advice of a doctor or plastic surgeon? Is this the sort of thing that can, or even should be corrected? I've lived with it for twenty five years, and it hasn't bothered me. Is there really any reason to worry about this?
--Metrollica
No matter how good the compiler is, it will never be as efficient as a person writing in solid OpenGL and DirectX.
Also, OpenGL and DirectX are most commonly used with C++, which is a 3rd level language.
I sincerely doubt this new language is LISP-like (a higher level language than C++), it seems that this new "language" is little more than some scripting.
I just bought my GeForce 4 TI4600. *sigh* Looks like Ill have to give my other ARM and LEG to pay for the upcoming GeForce 5.
In college, really poor, need a flatscreen.
One has to wonder if this allience is from the current relationship Nvidia and MS has with the Xbox.
Pluralists would have us to believe that Christianity is just as good as Islam, but I'm here to tell you, sisters and brothers, that Christianity is not just as good as Islam ...Christianity was founded by Jehovah, a demon-possessed incestuous pedophile who had 1 wife -- and she was his 13-year-old mother. And I will tell you Jehovah is not Allah either. Allah's not going to turn you into a terrorist nation that'll try to bomb people for their oil and drop atomic bombs on surrendering nations and take the lives of thousands and thousands of non-Christian people at the whim of your multinational corporations.
Funny how you post that as "Anonymous Coward". Just makes me laugh. Stay on topic with the article, and mods....please dont mark me down for this.
In college, really poor, need a flatscreen.
They control what the backend supports, and it suppports only the baseline DX shaders ... since thats all their hardware supports but their competition has a larger feature set and more advanced DX shader versions you can see where the advantage is for them ...
... thats a win win situation, appear to have a cross platform standard but at the same time stack the deck in your favour.
They control the backend, and the backend will always be optimal for their hardware. It only supports their competitors hardware because that increases use by developers
From Nvidia's Homepage you can check out the press releases and find this:
"NVIDIA's Cg Compiler is also cross platform, supporting programs written for Windows®, OS X, Linux, Mac and Xbox®."
So maybe even though the tools aren't cross platform - the compiler is. I think this is a Great step forward towards OpenGL 2.0 - this is showing that Windows doesn't have to be the only platform to write graphically intensive applications for.
Derek
this is good because now it will be easier to create cross platform games. which means more games for linux/mac. that is assuming i read it correctly.
I want 2D games back.
Read a Slashdot's description: ""Cg Compiler" compiles high level Pixel and Vertex Shader language into low-level DirectX and OpenGL code"
Cg doesn't need ANY support from the video card.
This is no different from other programming languages. If someone would create new programming language and x86-assemebler for it, then code written in this language would run on ANY x86 CPU. Similary, code written in Cg would run on ANY video card which has Pixel and Vertex Shaders.
There is a great interview with David Kirk (Chief Scientist at NVIDIA) which talks about other Cg's features like on-the-fly compilation of Cg programs.
There will be a linux compiler.
I write code.
it's not GPL so screw it.
somebody write a nice GPL'd compiler for OpenGL quick and end this BS before it gets too far.
what a waste of effort to keep something nice like this closed.
There's directX and there's directX 8.1 oh and DirectX 8.1a.
Remember when the Radeon first came out? Well they had to release a special directX just to support it's pixel shaders as opposed to just nvidias.
So as a game developer you'll probably have to compile your Cg code with the Nvidia one and the ATI one just to make it work (better).
This tool will really help those XBox developers.
Same thing with OpenGL, since the spec isn't nailed down yet and with Nvidia 'leading the pack' of development. It wouldn't surprise me if they decided to not support any other cards with the OpenGL compiler (which they haven't even released yet).
So hopefully this will NOT turn into a Glide type issue. Since this is actually a level above glide. Glide was very low level, all the Glide functions mostly mapped directly onto the 3dfx hardware, while this is a little bit more abstract.
Microsoft have never done anything without a hidden agenda (microsoft bob not included).
HTTP/1.1 400
[BEGIN]L END_REFLECTIONE ("WALL")
L END_REFLECTIONB LUE)
SET_PIXELFORMAT(SHINY)
ADD_BUMP_MAPS
B
SET_TRANSPARENCY(0.5)
SET_TEXTUR
[END]
[BEGIN]
SET_PIXELFORMAT(WET)
ADD_BUMP_MAPS
B
SET_TRANSPARENCY(0.3)
SET_COLOR(
ADD_FISHIES(YELLOW)
[END]
using namespace slashdot;
troll::post();
I see things on shaders all the time, but I don't really undersand the difference between pixel and vertex shading...does opengl impliment pixel/vertex shading now? Do things really look a lot better using shaders instead of just using phong and texture mapping? What games that are out using pixel and vertex shaders?
Confused....links would be appreciated.
One of these days, nVidia will ship a GPU whose functionality is a proper superset of that of a traditional CPU and then we can ditch the CPU entirely. Just like MMX, but backwards. This is a a recognized law of engineering. At that point, Cg will have to become a "real" compiler. Let's hope nVidia is up to the task...
they're trying to push something that gives them a leg up on ATI - perhaps making it easier to use the things their chip does well than the ones that ATI does .... these days PC-3D is a VERY cut-throat world
Did everybody read the comparison between writing in CG and writing hand-optimized assembly code?
Thank GOD they wrote CG, because now I won't have to write all of my programs in assembly anymore.
What is this "compiler" technology that they keep talking about? This might revolutionize computer science!
I probably shouldn't be programming 3D videogames since I hate touching hardware chips and much prefer the solutions of Nintendo ("OpenGL-like is the only rendering interface") to the solutions of Sony and Microsoft, but why actually making this shit high-level? Ok for the purpose of writing some sort of optimizer but not for the rendering stuff as I will eventually have to suffer through using something like this.
No, I don't think this language will kill off all the other graphics-wannabe-languages but I think it will join them. Why can't consumers start buying games based on the physics, behaviours, AI, collision and all the other things that are fun to work with instead of basing their purchases purely on graphics?
Besides from my ranting, what does it actually do apart from setting up the material settings before you do the rendering? And isn't that just stuffing parameters into some registers anyway?
Cg is to OpenGL 2.0
as DirectX is to OpenGL
It's a closed ("partially open") standard, for a subset of hardware, which is not as forward looking as a proposed competing standard.
Support OpenGL 2.0!
Education is the silver bullet.
There are some issues that I think nobody seems to be addressing, as in:
* Realistic fog/smoke -- not that 2-D fog which looks like a giant translucent grey pancake. Microsoft comes closer with Flight Sim 2002, but it's not quite there yet.
* Fire/flame -- again, nobody has created more realistic acceleration for this kind of effect. It's very important for many games.
Furthermore I would like to see fractal acceleration techniques for organic-looking trees, shrubs, and other scenery. Right now they look like something from a Lego box. In fact, fractals could probably help with fire/smoke effects as well, to add thicker & thinner areas which take on a "semi-random", but not an obvious pattern, effect.
Perhaps I'm just too picky...
-- We live in a world where lemonade is artificial and soap has real lemon.
Does this mean they'll finally be able to make a decent nose-picking routine for Counter-Strike hostage models?
Who the hell cares if the toolkit works in Linux? All I need is a compiler, which I'm sure will be released for Linux.
Mad Software: Rantings on Developing So
- opengl shader.
- a great paper on the hardware shading problem, and a very generic approach.
- stanford's rtsl.
- the proposed opengl2 also has a hardware shading abstraction language.
of course, the progenitor of all these, conceptually, is renderman's shading language.hopefully, opengl2's shading will become standard, and mitigate the cross-platform differences. it's seemingly a much better option than this new thing by nvidia, but we'll have to wait and see what does well in the marketplace, and with developers.
Since when is DirectX and OpenGL "low-level"?
If this makes it easier to create high end video games maybe it could boost the Duke Nukem release schedule. I did say maybe
http://www.kubuntu.org/
I would appreciate it if you would stop spewing your nonsensical dribble on the board. Go and read the article. To all you that have asked the question: Is it cross platform? read the first paragraph of the article at cg channel Graphics giant NVIDIA today announced Cg, an initiative with participation from Microsoft to create a cross-platform, hardware-independent, high-level Pixel and Vertex Shader programming language. can i emphasize CROSS PLATFORM and HARDWARE INDEPENDANT. It ports to DX and (nvidia's) open GL. I really wouldn't worry about its cross compatibilty. All (relevant) cards have drivers for Open GL and Direct X.
"Martha Stewart can lick my Scrotum......do i have a scrotum?" -- Sharon Osbourne
YHBT. YHL. HAND.
So, more proprietary antics from Microshit to better exploit the people?
Did you see the screenshots of the toolkit??? They were previewing effects IN REAL-TIME! That would save anyone a load of time.
What you said is basically like saying - "I don't need a C++ debugger for linux as long as I have my trusty compiler!"
That may be correct for small/medium projects - but we all know that debuggers (like gdb) save us loads of time.
Derek
I don't code games for a living but I thought I would check out thier toolset and documentation. While reading through the documentation there is a big note that for and while loops are not supported yet. They are eventually planned to be supported they just aren't yet. You'd think when deciding which functions to include in a programming language the ability to do a loop would be essential but I guess not maybe coding games is mostly event driven so you don't need loops very often. I just thought this was strange.
If your not cheating your not trying. If your not trying your not winning and if your not winning why play?
Indeed but lets take the case of x86 code generated by Intel's compiler ... of course there is no 3DNow! support (the equivalent of PS 1.4) of course code generation is optimal for Intels pipeline etc etc.
So yes code generated by such a compiler can run on anything, but it will run best on whatever the person who controls the compiler wants it to run best on. Which is to say NVIDIA hardware.
I have seen speculation, but nothing directly attributed to NVIDIA.
Which option goes with which answer...
????
Them _ are sure used sparingly in the second example... expand for us stupid coders...
Segue to someone playing a video game at a high frame rate...
Gee, the more I play this game, the less bad I feel about buying proprietary technology and the angrier I get at those 9 states for disagreeing with the DoJ Settlement. Oh, and I'd like to buy all of Britney Spears CD's and eat every meal at McD's... I'm sure I didn't feel this way yesterday... What's odd, too is that every so many frames seems to flicker something I can't quite make out...
Screen breifly flickers something else
Hmm... I can't remember what I was just thinking about, but I do have the strangest desire to email all of my personal information and credit card numbers to mlm5767848@hotmail.com...
A feeling of having made the same mistake before: Deja Foobar
Comment removed based on user account deletion
Yeah, just what the world of Bloated Sac Hardware needs... another layer of GOOP to get between the programmer and the hardware.
Are all you people out there really so damn LAZY that you can't just program efficiently anymore? Has C++ and Microsoft managed to turn ALL your neurons to mush?
Anyone remember the games we had on the Commodore 64? Don't whine about how they weren't realistic, or how they didn't have UberMondoSurroundSound... they were fun! In fact, they were a hell of a lot MORE fun that 90% of the crap that takes up 3 cds and requires a Gigahertz CPU to run these days.
Yeah, go use your high level languages for writing database queries, and doing year-end financial reports... but for God's sake, don't use it for things where speed matters!
Oh yeah, to all the modern programmers out there... for every malloc(), there should be a free().
Dude, get with the program, everyone knows that the Neo-Goatse is the real deal these days. That other goatse guy is passe.
Here's my understanding:
Cg is to vertex shader assembly as C++ is to x86 assembly.
It's a proprietary high-level language, sure, but the assembly code it emits is 100% standard and will run on any GPU that supports DirectX 8.x and up.
So you use cc for normal CPU code, and gcc for Graphics (GPU) code. Makes sense. I'd been wondering about that...
:)
j/k
If they can add their own profiles thats nice, but it seems unlikely that things like software pipelining can be specified in them ... so that would basically still mean competitors would have to write their own compiler if they want a level playing field.
... is their framework open enough to allow competitors to put in their own secret sauce.
They can keep their secret sauce, the question is
Seems like a decent number of people have absolutely no clue what Cg is all about, so I'll see if I can clear up some of the confusion:
Modern NVidia(and ATI) GPU's can execute decently complex instruction sets on the polygons they're set to render, as well as the actual pixels rendered either direct to screen or on the texture placed on a particular poly. The idea is to run your code as close to the actual rendering as possible -- you've got massive logic being deployed to quickly convert your datasets into some lit scene from a given perspective; might as well run a few custom instructions while we're in there.
There's a shit-ton of flexibility lost -- you can't throw a P4 into the middle of a rendering pipeline -- but in return, you get to stream the massive amounts of data that the GPU has computed in hardware through your own custom-designed "software" filter, all within the video card.
For practical applications, some of the best work I've seen with realtime hair uses vertex shaders to smoothly deform straight lines into flowing, flexible segments. From pixel shaders, we're starting to see volume rendering of actual MRI data that used to take quite some time to calculate instead happening *in realtime*.
It's a bit creepy to see a person's head, hit C, and immediately a clip plane slices the top of guy's scalp off and you're lookin' at a brain.
Now, these shaders are powerful, but by nature of where they're deployed, they're quite limited. You've got maybe a couple dozen assembly instructions that implement "useful" features -- dot products, reciprocal square roots, adds, multiplies, all in the register domain. It's not a general purpose instruction set, and you can't use it all you like: There's a fixed limit as to how many instructions you may use within a given shader, and though it varies between the two types, you've only got space for a couple dozen.
If you know anything about compilers, you know that they're not particularly well known for packing the most power per instruction. Though there's been some support for a while for dynamically adjusting shaders according to required features, they've been more assembly-packing toolkits than true compilers.
Cg appears different. If you didn't notice, Cg bears more than a passing resemblance to Renderman, the industry standard language for expressing how a material should react to being hit with a light source. (I'm oversimplifying horrifically, but heh.) Renderman surfaces are historically done in software *very, very* slowly -- this is a language optimized for the transformation of useful mathematical algorithms into something you can texture your polys with...speed isn't the concern, quality above all else is.
Last year, NVidia demonstrated rendering the Final Fantasy movie, in realtime, on their highest end card at the time. They hadn't just taken the scene data, reduced the density by an order of magnitude, and spit the polys on screen. They actually managed to compile a number of the Renderman shaders into the assembly language their cards could understand, and ran them for the realtime render.
To be honest, it was a bit underwhelming -- they really overhyped it; it did not look like the movie by any stretch of the imagination. But clearly they learned alot, and Cg is the fruits of that project. Whereas a hell of alot more has been written in Renderman than in strange shader assembly languages (yes, I've been trying to learn these lately, for *really* strange reasons), Cg could have a pretty interesting impact in what we see out of games.
A couple people have talked about Cg on non-nVidia cards. Don't worry. DirectX shaders are a standard; game authors don't need to worry about what card they're using, they simply declare the shader version they're operating against and the card can implement the rest using the open spec. So something compiled to shader language from Cg will work on all compliant cards.
Hopefully this helps?
Yours Truly,
Dan Kaminsky
DoxPara Research
http://www.doxpara.com
I'd be interested to see which implementation is faster, OGL, or DX. Seems like they're awfully in bed with MS on this... Does this make anyone else nervious?
Go here for teh [sic] funny.
If I remember correctly, one of the major features of OpenGL 2.0 was going to be a high level language and compiler that would compile down to low level pixel and vertex shader assembly. And, if I'm not mistaken, nVidia was one of the biggest contributers to this language. Has nVidia decided to just screw OpenGL altogether? Or is this a temporary equivalent for the time being while we're still using OpenGl 1.2?
An amusing tidbit from the News.com (http://news.com.com/2100-1040-935595.html) coverage:
"The programming language, called Cg, was developed in collaboration with Microsoft and is similar to the software giant's series of C languages for writing Windows code, said Chris Seitz, Nvidia's manager of development tools."
I didn't know that Kerrigan, Ritchie and Stroustrup were all Microsoft employees. Embrace and extend is one thing -- but embrace, extend, and then pretend that you owned it in the first place? Impressive!
(Score:-1, Wrong)
>>However I wonder if ATI will be willing to support a standard which NVidia controls
That never stopped IBM from using and developing Java!
FUNK!
Their website is at www.cgshaders.com. Their is a coding contest, some articles, and forums to ask questions.
Now, I'm not a math wiz, but sumthin here just don't add up:
NVIDIA Cg Browser 4 MB
NVIDIA Cg Compiler 3 MB
Cg Users Manual 1 MB
Cg Specification 8.2 MB
NVIDIA "Cg Toolkit" (All of the above) 86 MB!!!!
What'd they do, include a game or something?
Enquiring dial-up users wanna to know.
This piqued my curiosity.
Assumptions:
Capacity of 1 CD - 650,000,000 bytes
# of CDs that will fit into 1 cu ft comfortably - 400
Cargo space on a 747 - 6,190 cu ft
plus - you'll have enough CD-ROM drives available on either end to write 2.5 million CDs in 1 hour, and read 2.5 million CDs in 1/2 hour (about 125,000 drives - not an impossible number)
plus - the CDs on the shipping end are packed as they are burned, adding little or no time to the process of loading - same goes for receiving end. This assumes you have about 25,000 hard workers.
The flight time from Paris to New York is 6 1/2 hours. Writing/packing is 1 hour. Reading/unloading is 1/2 hour. Total time 8 hours. Total bits transfered is 12,875,200,000,000,000 bits, or 12,875 terabits (1,609 terabytes). Total time for transfer, 8 hours.
Resulting bandwidth: 447 Gb/sec, or 56 GB/sec.
New York to Miami would be 894 Gb/sec, or 112 GB/sec.
Sounds impressive, but you might want to reconsider laying fiber considering the impossible costs and logistics...
This seems to be just a pre-compiler to call all of the glVertex() funtions needed to perform accurate shading. It seems to be a tool from the programmers end, not the card's end.
"So you call this your free contry, tell me why it costs so much to live?" - Three Doors Down
IMHO, OpenGL 2.0 is more portable, less NVidia-specific and backed by more manufacturers. Cg is a ripoff of OpenGL 2.0's design, in a cheap attempt to turn it into a NVidia/Microsoft controlled standard.
Remember, NVidia may be good now, but they got where they were by being competitive and overturning old-guard 3D guys (like 3DFX who were themselves trying to lock the industry in to APIs they controlled).
Competition=good.
Single-vendor-controlled APIs=bad.
OpenGL2.0=good.
Now, Ilike my NVidia hardware as much as the next guy, but I fear lock-in. Seems like most of us have already experienced the downsides of lock-in.
Yes, NVidia is talking up the buzzwords "portable" and "vendor-neutral" but if that's what they were after, the wouldn't have created Cg at all, they would have gone with the already-available open standard, OpenGL2.0. This is embrace, extend and extinguish.
-- There is no truth. There is only Perception. To Percieve is to Exist.
Why did they make it like C? You'd think they'd base it on a more object-oriented language like Java. I'm guessing when you are designing 3d worlds (or objects) being able to create objects with their own private methods and properties would be a lot better. Until I actually see the language syntax, I'll pass judgement, but for now... C? Come on... I've used C, Perl, Java, VB, C++ and a few others, and C is the last one I'd choose to base a new language's syntax on, if I had a chance.
today is spelling optional day.
Cg does because that's the next feature they are planning on adding to the hardware.
Basically, after they do that programming a PC game will be similar to programming for the PS2. You'll have to write multiple programs that are all executing concurrently to use all the power you've got at your disposal.
Inferior products did. How could supporting a third API doom the company? How could the parent be modded up as insightful?
of bandwidth that the average graphics card has then it would.
Also don't forget that a GPU has more transistors then the average cpu these days.
The VGA -> CPU interface was SLOWWWWW. In fact it's still slow, that's why AGP (X8) was invented and that's even slow. The graphics cards have larger buses, and are designed to push data to the DAC.
All you need is more bandwith for the CPU and you're set.
Do you know what the words "asymmetric" and "unequal" mean? Do you now realise why it makes absolutely no sense to compare CPU+GPU to 2*CPU? (hint: "unequal" means CPU != GPU).
I believe the operations implemented in the Cg compiler are architecturally similar to the hardware found in an NVidia GPU.
What this means is that while you may be able to implement Cg on an ATI or 3DLabs card, it will not run as efficiently as on an NVidia card, even if they are cards of equivalent performance.
Additionally, Cg may not (efficiently) support operations and capabilites that are not implemented by NVidia GPUs.
This is the method by which NVidia plans to freeze out other graphics hardware manufacturers, while appearing to support them.
OpenGL2.0 is designed to be adaptable to all architectures.
-- There is no truth. There is only Perception. To Percieve is to Exist.
If only you read befor you excreted onto your keyboard. Then you'd understand that this isn't pre-empting OpenGL or promoting DirectX in ANY way. Cg is above that, and outputs to both. Hardware independantly.
:)
:)
:(
Of course, nVidia's compiler is optimised for their cards, but the whole thing is open; everything is specified, so it won't take long for ATI to make their own ATI-optimised compiler.
All this means is that j.random.software company could have to compile their shaders twice, once for ATI, once for nVidia. Hell, some hacker might even make a combined compiler, which includes both optimisations(?).
But the whole thing about Cg is that it's about 12 times more compact than assembly (at least, in the examples I saw). This means:
-it takes less time to write a shader
-because it's simpler (and hardware independant, and C-like) you can get tech-savvy artists to write them, instead of having your valuable programmers do it! And there are not that many manhours available to waste for those who can write assembly shaders
-there's an industry standard for real-time shaders!
However, it seems to me that id software have already got their own kind of shader language going. Carmack just didn't hype it like this.
Oh, and on a final note, Cg will even work on gforce 3's, although it doesn't show on their slides (that only mentions geforce 4's). But there's an interview on hothardware.com where nVidia's technical director does say it does
Me, I'll have to upgrade though
-- Waht? Tehr's a preveiw buottn?
For those coders and artists out there who may want to learn more about Cg, these web articles are also worth reading:
Maybe I'm a bit paranoid (I probably fit right in on /.) but when I read news subheadlines like "Nvidia, the dominant PC graphics chip maker, has teamed up with Microsoft and developed a new cross-platform graphic language called Cg that it hopes becomes an industry standard" I don't really feel all warm & fuzzy inside. CG Channel states "NVIDIA's compiler toolkit would be more optimized for their own hardware owing to greater understanding of their own technology. ATI would have the option of writing their own backend compiler to support their hardware more optimally, but the exisiting NVIDIA toolkit should generate working code on ATI's part. [...] NVIDIA are hoping that Cg will be the industry's defacto standard simply due to its time on the market [...]" If NVIDIA can't be reasonably criticized for supporting their own chipset more with optimized code (and leaving it open to others with competing chipsets), can co-developer Microsoft be criticized for favouring their own software in this? Couldn't MS solutions (DirectX, XBox-specific tools, etc) be favoured under Cg merely by them investing more in Cg development and (as one of the two developers controlling the standard) updating compilers and shader functions for their software sooner or more completely than for others? If this was the case, Cg could just end up being another "embrace, extend, etc" scenario, this time in the graphics market to push MS & Nvidia techologies.
Nvidia has been fair to good in their cross-platform support so far, but of course MS has not been. To the relief of many CG Channel reports that "Interestingly, key components of NVIDIA's Cg compiler will be open-sourced and will work on Linux, Mac OS X and Xbox platforms. [...] Compiled code for Direct3D will be cross-platform (well, as cross platform as Microsoft might expect). OpenGL code should work much the same as long as the OpenGL extensions are supported on the target. NVIDIA says it will provide compiler binaries for all of the major platforms." The real proof will be in how Nvidia supports Cg on other platforms and OpenGL over the long term. Will these binaries be released at the same time and with the same feature sets? And will this continue to be the case or will full cross-platform support only exist in the beginning until Cg becomes a de facto standard?
I'm skeptical at this point, since we all know there's a world of difference between being merely compatible and being optimized. There's some evidence so far of how Cg is being implemented. For instance, it looks like there isn't an OpenGL fragment program profile for the Cg toolkit while there is one for Direct3D8. Nvidia says that the reason Cg has for no OpenGL ARB vertex_program extension while there are both dx8ps and dx8vs profiles is that OpenGL is dragging it's heels with the standard, perhaps valid but nonetheless the result is Cg is better implemented under DX8 than the OGL side. While it's theoretically possible to program Cg textureShaders and regcombiners in OpenGL, it's not currently supported. Much of the feature set in Cg looks like that announced so far for OpenGL2 - could nVidia just be trying to repeat OpenGL2 functions using their own identical and properitary Cg extentions instead? Finally, Nvidia announced support for Windows, MacOSX and Linux; the first and last platforms should have native Cg compilers (Linux soon apparently) but what about MacOSX?
I think you misunderstand the so-called wheel of reincarnation.
Throughout the history of computing, the rule has been that special-purpose co-processing devices have inevitably been retired in favour of doing the work on the main CPU (e.g. some may remember the days when paging and so forth was handled by a separate chip.)
The thing is that vastly more effort goes into improving the general device than the special-purpose device.
More to the point, the special purpose chips are exactly that: they exist because there are currently some things it is currently cheaper to throw hardware at than to do on the main CPU. While we have seen truly stellar improvements in graphics performance, you should not confuse this with generality. The CPU and the GPU are quite different animals.
The RISC philosophy is to include instructions that do the most work for the least cost, hence MMX and friends. On the other hand, I can't see a GPU generalising into a CPU of any merit.
You can think of Cg as a real-time shading language. These shading languages have been an active area of research in recent years.
The industry-standard shading language today is RenderMan, designed by Pat Hanrahan while he was at Pixar. As mentioned elsewhere, it is used for movie production-quality shading in software rendering systems.
Consumer graphics chips today such as the nv20 (NVIDIA Geforce 3) and the R200 (ATI Radeon 8500) are programmable, but they expose the programmable features in the form of assembly-like instruction sets. Writing shaders in assembly is ok when the number of supported operations is small for a given rendering pass, but as shaders become longer and more complicated, the process quickly becomes tedious.
In the graphics research community, Marc Peercy and some folks over at SGI first demonstrated how RenderMan shaders could be mapped to multiple rendering passes on simple graphics hardware in their SIGGRAPH 2000 paper.
Then, Kekoa Proudfoot and some folks at Stanford designed a shading language that targets programmable graphics hardware (such as the Geforce 3), and you can read about it here.
Note that a key member of the project is Pat Hanrahan, the designer of RenderMan. The paper associated with this project is in SIGGRAPH 2001.
Both of the above were research efforts to demonstrate that (1) it is possible to compile complex shaders efficiently to commodity graphics hardware, (2) it is desirable to use a higher-level abstraction such as a shading language to program GPUs with instead of low-level assembly code.
Now there are two efforts to bring shading languages to widespread, mainstream use in the industry: the OpenGL 2.0 shading language proposal by 3D Labs, and Cg by NVIDIA.
A nice aspect of having Cg sit on top of DirectX and OpenGL, instead of being integrated into the language (like the OGL2 proposal), is portability. In theory, you can write your uber-shader ONCE, and it would be the compiler's job to map it to the appropriate hardware, etc.
Hi! If you'd read the article, you'd have realised that NVidia are releasing technology to take advantage of the hardware on the card you already own, (and which has been there since the GeForce3) so quit moaning.
I've been programming in Pascal for 21 years
No wonder you're bitter.
Wherever there's a will, there's a motorway.
Oh great, so now we can see the BSOD in nice vertex shading and excellent fill rates.
I can see the marketing scheme now...
"We may crash a lot, but by golly, we're working to make it the most fun you've EVER had whilst watching the smoking wreckage of your kernel burn!"
"El Pantalla azul de MUERTE"
-----
"Cogito Eggo Sum: I think, therefore, waffle."
I always get annoyed whenever anyone talks about Glide like it's the best 3D API ever made. Claims like this is usually comming from people clinging to their ageing V5 pretending that it's still cutting edge.
In reality it's barely an API at all. It is a set of header files with function declarations that plugs data straight into the HW. It's like calling C64 basics poke and peek functions a machine code api. You have low level access, sure, and thus things are about as fast as they can be, but you have to do EVERYTHING yourself. Glide implementation and hardware was so tightly linked that the one stifled development of the other, holding 3DFX back in the feature department. Even 3DFX said that Glide was on it's way out when the V5 was released because of that fact.
A witty
nVidia may offer ATI the ability to get on board this Cg language, but the reality will be different. What disturbs me is that nVidia's chief scientist went on record as saying that ATI's refusal to implement nVidia's shader technology (they did their own, which some consider superior) amounted to destabilising the industry. No, that would be competing dear chap.
Who exactly will need to use Cg and what market ultimate will use it? I have no doubt that PC game developers (and Xbox) will take a look at it but let's not pretend that this is a solution which embraces other vendors. Of course I'll be glad to eat my hat if ATI and Matrox come out in support of this.
It's not an entirely bad idea but writing regular language compilers for exotic hardware is more than feasible. My company has done exactly this for the PS2's vector units with a C/C++ compiler. Those VLIW co-processors are quite similar to the sort of more generically programmable hardware that you'll see in graphics hardware down the line (combined with shaders of course).
There are some good reasons for using a custom language, better control over the implicit parallelism of multiple shaders/vertices etc. However creating a new language for people to use destroys the notion of recyclable code and introduces yet more platform specific issues. And let me tell you, there's quite enough IF/THEN statements in the graphics engines of PC games as it is. Unless your work is being used by multiple developers, in which case any decent authoring tools for specific hardware may be welcomed.
Anyhow, I'm not entirely negative about nVidia's efforts - it's an interesting stab at a problem we had kind of thought everyone (but us) was ignoring. At the very least it's destined to become a more useful shader authoring tool for PC/Xbox game engine/middle ware developers.
I wonder what ATI and Matrox's approach will be. I wonder if they'd like a regular compiler for their shaders? :)
GRRR
Take a look at the pixel shader language it ain't that hard really (not if you know what your doing).
All the product seems to do is provide a few functions that would take vertex shader code to write from scratch.
thank God the internet isn't a human right.