View Full Version : CgFX tutorial

08-25-2004, 09:59 PM

i need to render a texture and perform various operations on it using cg fragment shaders. in some cases i need to apply two effects, so i have to render once, glcopytexsubimage, render again. if i got things right, using CgFX i can directly render in multiple passes with losing time with copying. is this correct?
if yes, does anyone of you know of a CgFX tutorial for opengl? or at least CgFX reference - the nvidia cg toolkit doesnt seem to have one and i couldnt find anything anywhere else.

thanks a lot,

08-26-2004, 12:23 AM
afaik they dont use glcopysub
but just straight blendfuncs like normal multipass solutions

cgfx is basically just a wrapper to hold data for the vertex/fragment shaders and define different "techniques" that hold information about the number of passes and how they are blended

the cg compiler has examples\runtime_CgFX

08-27-2004, 03:22 AM
see, "CG Tutorial" book ... released by NVIDIA (Mark J, Kilgaard)