• Create Account

Interested in a FREE copy of HTML5 game maker Construct 2?

We'll be giving away three Personal Edition licences in next Tuesday's GDNet Direct email newsletter!

We're also offering banner ads on our site from just \$5! 1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.

Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

3 replies to this topic

### #1Titan.  Members   -  Reputation: 159

Like
0Likes
Like

Posted 04 April 2013 - 10:42 AM

hello,

I have a lot of trouble to learn geometry shader, I work in cg and i haven't find any tutorial or usefull documentation about it.

from now i have read the nvdia's book: http://http.developer.nvidia.com/CgTutorial/cg_tutorial_chapter01.html, and implemented sucessfully nice looking lightning (with normal map, specular map, etc) and some animation.

but for geometry i only found some sample from nvida not commented and in ASM and some article about the concept and the purpose of it.

it took me a day to actually get a working simple pass through hello world:

TRIANGLE
void mainG(AttribArray<float4> position : POSITION)
{
emitVertex(position[0] : POSITION, float4(1,0,0,1) : COLOR);
emitVertex(position[1] : POSITION, float4(0,1,0,1) : COLOR);
emitVertex(position[2] : POSITION, float4(0,0,1,1) : COLOR);
}


do you guys know any good reference that google don't ?

### #2Titan.  Members   -  Reputation: 159

Like
0Likes
Like

Posted 11 April 2013 - 06:01 AM

ok so no one know a blog or something explaining it..., and what about books ?

people knowing it have to have learned it somewhere

### #3spek  Prime Members   -  Reputation: 997

Like
0Likes
Like

Posted 14 April 2013 - 09:41 AM

no very detailed code examples, but nevertheless, I wrote about it a long time ago (using Cg) so maybe this is useful:

and maybe it appears on a few more places. The boxes with code examples almost got unreadable after Blogger suddenly changed the lay-out but it shows various shaders anyway

### #4Titan.  Members   -  Reputation: 159

Like
0Likes
Like

Posted 19 April 2013 - 08:37 AM

thanks for your blog, I learned some stuff about GS, but it's a shame some functions like "rerestartStrip()" or just "emitVertex()", are defined nowhere on the nvidia's doc which seems actually only composed of gp4gp information and this unreadable ugly thing, I had to find these functions in random forum's code and figure out what they may do.

since my first post I started to learn glsl instead which is well documented and a lot more used, I'll maybe switch back to CG once i'm comfortable with shaders.

ps: I also learned a lot about deferred rendering on your blog and bookmarked it ;)

Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

PARTNERS