Skip to main content
GameDev.net gamedev.net
🔒 Locked

need source code! help!

Started by yahk Apr 4, 2005 at 6:53 AM 0 replies 850+ views
Original Post
yahk
yahk
Hi all who can help me write the Gaussian filter in C++ and the program running on GPU using the Cg language! i know the Cg part code but i cannot write the C++ part code! please write the code to me. now i write other program must use the Gaussian filter on GPU version not just C++. help me ok? i am so...... :( ========================== Cg code here! ======================= void gauss(in float2 vUV :TEXCOOED0, out half vOut : COLOR, const uniform samperRECT oIamge, const uniform half aKernel[49]) { half4 vSum; int i,j,k; vOut=half4(0,0,0,0); k=0; for(i=0,i<7;i++) for(j=0,j<7;j++) { vSum +=texRECT(oImage, vUV+half2(i,j)*aKernel[k]; k++; } vOut =vSum; } =========================================
leo77
leo77
If you speak portuguese
http://www.inf.ufrgs.br/~capagot/cmp513/
here is the best "tutorial" I know on how to create a CG program using C++ and VC-6 for windows, you'll just need to follow the steps. Its pretty simple
Leo

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.