Shader passes question

Is there a way to add shader passes to the beginning of a preset? I’d like to add image adjust to a few cgps, but they don’t play nicely when appended to the end of the chain.

not easily, no. The best way to do it is to open up the cgp file in a text editor, increment the number of shaders and do a find-and-replace for the pass numbers in reverse order (that is, for example, 3 -> 4, 2 -> 3, 1 -> 2, 0 -> 1) and then add in: shader0 = “…/relative/path/to/image-adjustment.cg”

Cool, that’ll work nicely. Thanks hunter.

feature request? :wink: loading cgp presets on top of each other would also be pretty neat. especially since many filters have mulitple passes. just trying out different combinations is a bit of a chore.

Yeah, I think the way to handle that would be to take out the internal shader numbering and have it parse everything in blocks from top to bottom. However, I don’t think there’s a very good way of handling everything through the GUI with a gamepad (that is, each pass would need an entry to ‘insert pass/cgp here’ etc.). Perhaps someone could/should write a WIMP helper program that’s specifically for manipulating cgp files, though I think if we get rid of the internal numbering, that’s easy enough through a text editor.