PDA

View Full Version : CG: Using fog with shaders



Jan
11-30-2002, 06:36 AM
Hi,

does anyone know, how i have to extend my cg vertex-shader (or should i say vertex-program?), so that objects, that use this shader get foggy the same way as all other objects in my scene ?

The reason i post it here, is that cgshaders.org seems not to be very much visited. Usually i am one of one to three persons online and many questions donīt get answered.
Do you think it is good to have seperate forums for OpenGL, DirectX and CG, or do you think one who programs with OpenGL should just always ask at OpenGL.org, and one who programs with DirectX should always ask at a DirectX forum, and CG should not have its own forum ?

Jan.

Asgard
11-30-2002, 06:42 AM
Cg should have its own forum IMO and I've just posted a reply to your post on cgshaders.org. Either way, cross-posting is usually not a good idea.

jwatte
11-30-2002, 06:46 AM
The spec for ARB_vertex_program contains a sample program which shows how to implement all the three fog modes. While it's at the "assembly" level, it really is quite straightforward and should be easily portable to CG.

Jan
11-30-2002, 07:12 AM
Originally posted by Asgard:
Cg should have its own forum IMO and I've just posted a reply to your post on cgshaders.org. Either way, cross-posting is usually not a good idea.

Yes, i saw your post. Thanks, the color stuff works now.
I am not a fan of crossposting, either, but i wanted to see, how fast i get replies in the two forums.
Well, now you destroyed my experiment, by posting answers to both forums ;-)

However, i think it will still take some time until cgshaders.org has a community, that is as big and as good as OpenGL.orgīs.

Jan.