On 16/06/2018 at 03:04, xxxxxxxx wrote:
User Information:
Cinema 4D Version: R18.057
Platform: Windows ; Mac ;
Language(s) : C++ ; XPRESSO ; PYTHON ;
---------
Hello PluginCafe,
I have been developing a plugin for a client where I have two different shaders but with the same settings. Internally I have a Class wich does (relatively heavy) computations and the shaders are different represantations of the computed data.
What I currently have are two seperately working shaders, the problem is, that they are intended to be used together. They way it is now it is doing the same computation twice. Also for them to work together one would have to change the same settings in both shaders to the same value.
So my question(s) essentially is(are) :
Is there a way to store my computed data in some kind of buffer object, which the two shaders can access? Also moving the settings to one shader/object instead of two different shaders?
Would this be possible with an object data plugin?
The shaders do animate, so I am not shure how this would work with recalculating each frame if I would use an object data plugin.
Hope everything is clear.
Best regards and thanks in advance,
Florian