NVidia announces Cg: "C" for Graphics
mr_sheel writes: "Thresh's FiringSquad has an article about Cg, a new language developed by NVidia in collaboration with Microsoft. 'Up until now,' Brandon Bell writes, 'game developers have had to use complex assembly language to create the lifelike graphics gamers experience in today's latest games.' Cg eases the process of bringing graphics to the screen and compiles for DirectX 8,9 and OpenGL 1.4. Many companies, including 3D Studio Max, Blizzard, and over 100 game developers, have already jumped onto the Cg bandwagon. Will this replace assembly graphics coding once and for all?"
the same as this? http://slashdot.org/article.pl?sid=02/06/13/147213 &mode=nested&tid=126
-- Patience is a virtue, but impatience is an art.
then how come I'm always seeing C and C++ bindings for OpenGL and engines, and books about writing games in C or C++? I've never seen "writing spifftactic 3d games in x86 assembler".
This is the news release that Slashdot actually gets paid for by Nvidia.
Didn't we just see this here a couple of days ago?
I'm an American. I love this country and the freedoms that we used to have.
10 minutes working on a sig. What a waste.
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...
Hey Timothy.... go to your preference page and UNBLOCK all CmdrTaco stories.... this way you can see what he posted and not post it yourself.
I know some of his stories suck but it's for the good of all of us.
You can keep Katz stuff blocked.
A decent theregister piece on the same - tho i'ml
not sure i agree that having reserved words such as
'break' and 'continue' necessarily indicates planned
future incompatibilities of any kind (i'd reserve
those words no matter what kind of language it was)
- check it out at http://www.theregister.co.uk/content/54/25732.htm
When slashdot starts picking stories it already scavenged from thereg, linuxtoday, or arstechnica and posted this week already, that means the world is running at slow speed on a sunny Saturday like this one.
PPA, the girl next door
-- I feel better now. Thanks for asking.
Extreme Tech also has an article about Cg.
http://slashdot.org/article.pl?sid=02/06/13/147213 &mode=thread&tid=126
My life in the land of the rising sun.
You know, Cg may seem attractive, but game developers who really know their stuff will probably stick to assembly. Or, alternatively, use Cg in parts a a game but use assembly where it counts.
The ability to monopolize an industry is insignificant, next to the power of the source.
timothy should have his post deleted and his account banned for repeated double-posting. It's like he's spamming us!
yeah this post should be deleted
The part about in collabotation with Microsoft is a bit worrysome :\ Although, i don't really know much about this.
...that cygwin goes under just in time for cgwin to come out? Conspiracy or coincidence - you decide!
"...in collaboration with Microsoft..."
I just hope that phrase doesn't mean non-DirectX operating systems (Linux, Mac OS X) aren't about to get the short end of the grahics stick. I can visualize features not being implimented for OpenGL, or worse, support for OpenGL discontinued at some strategic point in the future "because our customers strongly prefer DirectX" [says Microsoft].
Ok maybe I'm paranoid. Maybe this is basically nVidia's baby and MS is only involved a little bit. Let's all hope. Can someone reasure me?
You like your Macintosh better than me, don't you Dave? Dave? Can you hear me Dave?
Probably consider Assembly language fools gold.
Slow news day.
Slashdot, home of historically old news. News for oldies.
Why make a new language with it's own compiler for this? Wouldn't it make much more sense to make some libraries?
Well if this has been posted before I missed it and am glad I had a chance to read it. Sorry to all you others who are annoyed by the duplication.
The technology seems like a necessary step for the industry. I do graphics programming, although I'm not elite enough to do it in raw assembly.. I have used OpenGL a few times. From the article it does sound like it will be much easier to develop visualization code that is more standard - this would have made working on my Thesis much easier! Oh well, better late than never I guess...
Also the article heavily focused on examples of characters from game environments, it would be nice to see graphics examples of other types of applications besides gaming. For example scientific visualization and similar areas, that is what I'm more interested in that gaming development.
However I am concerned that NVidia won't stay compliant with standards across video cards and things may get ugly in the future. To pull a Microsoft, as it were. I hope not because it sounds like an interesting product that could quickly become dominant if they continue to do things right.
__ No registration required to read this message. They did it in the Matrix.
Enjoy!
At flipcode.com
-m
Will this replace assembly graphics coding once and for all?
What on earth are you talking about? This will be a requirement... ALWAYS. You know why? Because nVidia is only one company. Not everyone conforms to their "standards". This is good especially because they are in bed with Microsoft. They are a conduit for MS to control the graphics market as nVidia are up for sale to the highest bidder.
So, what do you do when you want to strengthen control on a market? You introduce a new language that makes it easier for developers to take advantage of one piece of hardware on your platform!
No, this will NOT replace ASM for driver/graphics engine development. It should be disregarded because there's nothing standard about it. Hopefully, the leaders in the industry will always support chipsets other than nVidia's.
Why bother.
if Timothy could search Slashdot for "Cg", but words under four characters are not indexed. This is extremely idiotic, as we can't search *any* 3-letter acronyms or even "red hat". Gee, if CmdrTaco doesn't want people to be searching for "the" "it" "a"... then by all mean block these words but block these words *only*.
From the article:
It may be possible that NVidia is holding back support for such rudimentary language features until such time as they are supported in their own hardware. I don't think this is a formula for a widely-adopted language at all, and smells a little of 3dfx's efforts with Glide.
___
Cogito cogito, ergo cogito sum.
Since Cg is designed specifically for vertex and pixel shader programs, DirectX versions 8 and 9 are supported as well as OpenGL 1.4. The compiler itself is cross platform; in particular programs written for Windows, Linux, Macintosh, and Xbox are supported. And if all that isn't enough, the compiler can create code for all GPUs that support DirectX 8 (or above) and/or OpenGL 1.4, making it very universal. In keeping with Linux tradition, NVIDIA has open-sourced certain components of the compiler, allowing content developers to add their own customizations as well.
Is this a new "language" or is is a library. What does this do that GL or DirectX cannot? I personally don't see a need for this when we have OpenGL and to a lesser respect DirectX (cause there isn't a *nix implementation).
I want my rights back. I was actually using them when our government stole them after 9/11.
Well until John Carmak gives his opinion on it I'm not even going to care. Other then the fact that it could at least improve the quality games.
Or at least someone that rights engines for a living.
Just remember too that Microsoft sleeps around a lot. You can be in bed with them one minute and then their off in the bathroom fucking your biggets competitor just to make you get mad and get you to do something stupid.
Which was fine while the market was 90% Voodoo, but once other players got more or less established, the benefit of easily developing stuff with GLIDE was overshadowed by the loss of a chunk of your target audience, and the developers moved away from it.
Now imagine, if GLIDE worked on all the competitors' cards, but worked just *slightly* worse than on a Voodoo card. Not enough to be unplayable or anything, but worse nontheless. Then, there's a good chance developers would still use GLIDE, and 3Dfx could claim supperiority on all those products.
However "open" Cg will be, NVIDIA will definitely get the edge on any software written with it, if only because they will have had a head start.
I wonder though if this language is at all similar to GLIDE, which they acquired together with 3Dfx. I also wonder what someone who is very good at low-level graphics programming (like John Carmack) thinks of the idea of this language.
Ñ'
at least id isn't biting. The author calls caramack a "maverick programmer" too
"Same shit, different day."
For me to care, you'll have to include suitable quotes from the linked PDF document. Sorry!
Pros really don't hang out too much on community sites.
Assembly will always be faster than a compiled language. That's just one of those immutable laws. It's the way the universe is put together.
Many companies, including 3D Studio Max
3D Studio MAX is a product, not a company. Discreet is the name of the company currently making MAX, a subsidiary of Autodesk
But it'll never happen, because it's unlikely to be in anyone's best financial interests to open-source either all the work NVidia has done on this language, or all the work other people have done on their own engines.
Arrays use float indices. This is an odd design decision, relevant to DirectX 8 and Nvidia only.
Ummm, what?
I know absolutely nothing about graphics programming. Not ashamed, it's just not my area of specialty. However, I'm intrigued as to why floats would be used for an array index. If anyone can enlighten, I'd be interested to hear.
Sigh... you guys don't see the irony here, do you?
My life in the land of the rising sun.
You truly rock.
The official community site is at cgshaders.org. There's a Linux Toolkit out now. There's a interview with CEO David Kirk. Along with articles, a shader repository, and forums for help.
The shocking part about this story is that Thresh's FiringSquad still exists
I'm impressed. This is the second time this has been posted on /., and people are STILL clueless about what Cg is! Incredible!
Cluestick: Cg is not a language like C/C++. It is not an API like OpenGL/DirectX. Instead, it is a simple, high-level replacement for the assembly language traditionally used to program pixel and vertex shader units on graphics cards. These programs are typically a few dozen instructions long and basically map a small set of inputs to a small set of outputs. So you could write a program to rotate a vertex around a point in Cg, but not something like Quake...
A deep unwavering belief is a sure sign you're missing something...
Next door to Hugh Hefner.
Will this replace assembly graphics coding once and for all?
Let's ask John Carmack what he thinks. He's good at this stuff.
All of this leaves me a little bit confused. I'm not sure why we need two (or, perhaps, more) C-based shader languages, at least one of which (Cg) is hardware-specific, but API neutral.
If a corporation is a personhood, is owning stock slavery?
3d Studio Max isnt a company....its a software package developed and distributed by Discreet (www.discreet.com).
Do you people ever read your own website?
Just what do you all do with your time, anyway? There's about a dozen of you, and you post about a dozen stories a day. Thats all you do. And still after years of doing the same thing everyday, you people keep making the same sophmoric mistakes again and again.
I'd expect a little content from a buch of slackers whose jobs it is to sit around in their underwear and read email. No, then again, I wouldn't.
This site could be great if you guys wanted it to be.
For a successful technology, reality must take precedence over public relations, for nature cannot be fooled - R Feynman
It's not like I'm an obsessive reader of /. or anything, but even I noticed that this story has been posted only two days before. Really, you guys are meant to be editors - don't you even read /.? I mean, reposting a story that is a few weeks old is fair enough, but two days? Hell, the old story is still listed on the front page!
No, 'g' is for Graphics, 'C' is for C.
so what this means is that our graphics cards will be half as fast as they were? Isnt the reason that assembler was used over C was to improve speed dramatically? Another move by the unholy alliance. Be on the lookout for the next generation card billed as "3x faster" that benchmarks to the same speed as your Gf4
Well, thanks for the clarification. It seems like the article might have made that fact more clear, or maybe it was there and I didn't pick out the distinction. So nVidia's Cg is only for the vertex and pixel shaders? I suppose it doesn't provide a high-level api for the rest of the graphics process as I originally thought. Doh.
Too much marketing-speak in the article I guess. Or I'm just dumb.
__ No registration required to read this message. They did it in the Matrix.
C for graphics, eh?!?!? That's the dumbest thing I ever heard. Want fast graphics? Code that shit in tight assembly, utilizing all kinds of special processor tricks earned through many years of hard-core determination in squeezing every last cycle out of the hardware, and then some. I don't care if it takes a year to implement something that could be implemented in a day using this Cg or Gc or whatever it's called. The market is a piece of shit, don't pay attention to it. I don't care that people want shit now. Management is irrelevant. Customers are irrelevant. Do it right. Do it in assembly. And when it comes time to port that shit to another platform, you'll have to write it all over again, because assembly language is as portable as a coal mine. (Ever tried to move one?) And that's the way Real Programmers (tm) do it, like Mel, not wimps like you. C is for wimps.
"In keeping with Linux tradition, NVIDIA has open-sourced certain components of the compiler, allowing content developers to add their own customizations as well."
This is as true as saying:
"In keeping with MS tradition, NVIDIA has closed-sourced certain components of the compiler, but still allowing content developers to add their own customizations as well."
unfinished: (adj.)
That this isn't to replace the language in which you write the GAME/whatever. ..
It is to replace the cryptic commands you use to define a method for vertex/pixel shaders (eg. for lighting a polygon, or colouring the vertices of a model) inside that game. So instead of a million and one,
glBlahBlahBlahNV()
You write/compile your small effect outside of that source code and your game/whatever will command it to be loaded.
With Microsoft involved we will still get the Blue Screen of Death, only now it'll be anti-aliased, vertex shaded, and happen at 400+ fps.
I'm not sure I'll ever fully understand Slashdot.
Opengl 2.0 is about to come out with its own 'c' language for fragment shaders. This is just NVidia and MS acknowledging that their APIs are about to get blown away by a new all-encompassing graphics API, OpenGL 2.0.
OpenGL 2.0 will integrate necessary new features in a modular construct to aid the evolution interactive 3D graphics programming.
Tom West
Wollongong University
Milalwi is right... Cg gets compiled into GPU assembly code along with the necessary C-language OpenGL (NVIDIA's compiler) and Direct3D (Microsoft's generic compiler) to download the shaders to the GPU. It is so easy to download and read about what Cg will really do (and not do). I will never understand why people don't do that first before running at the mouth.