Not logged in, Join Here! or Log In Below:  
 
News Articles Search    
 

 Home / 3D Theory & Graphics / Multi-pass Cg shader on OpenGL Tutorial Needed Account Manager
 
Archive Notice: This thread is old and no longer active. It is here for reference purposes. This thread was created on an older version of the flipcode forums, before the site closed in 2005. Please keep that in mind as you view this thread, as many of the topics and opinions may be outdated.
 
ajm000

May 23, 2005, 04:46 AM

Hello folks. I badly need help for my research. I want to do my own version of Photon Mapping in Cg. I'm stuck and cant seem to figure out how to do multipass shading in Cg. I'm using the cggl (Opengl) extension of Cg not the directx extension. Can someone help me on this please. If you have an example for a multipass Cg shader I would really appreciate it. Thanks so much!!!

 
Erik Faye-Lund

May 23, 2005, 06:01 AM

you don't just make cg do a multipass shader (unless you're using cgFX, and even then you need some custom code to handle the multiple passes), you do it yourself.

bind_shader(first_pass_shader)
draw_stuff()
bind_shader(second_pass_shader)
draw_stuff()

etc.

 
ajm000

May 23, 2005, 11:25 PM

Wow. Ok i'll look into that. Thanks Erik!

 
This thread contains 3 messages.
 
 
Hosting by Solid Eight Studios, maker of PhotoTangler Collage Maker.