On 17/12/2015 at 23:53, xxxxxxxx wrote:
User Information:
Cinema 4D Version: R17
Platform: Mac ;
Language(s) : C++ ;
---------
Is there any way to have shaders in C++ communicate with each other (presumably within the same material)?
I'm working on a fairly complicated shader that needs some way of generating additional textures that can be plugged into a variety of different texture slots. ~95% of the calculations that occur internally during render are identical between each of these textures, so I'd rather not evaluate the entire shader three whole times if I can somehow avoid that (calculating the required data only once) by having each shader talk to the others and figure out who has already calculated the required data and use that instead.
How would I best implement this? Is this something that I should be using the Message APIs for, or is there a better way?
-CMPX