PDA

View Full Version : CgFX tutorial



demonoid
08-25-2004, 10:59 PM
hi,

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,
demonoid

CrazyButcher
08-26-2004, 01: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

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