Jump to content

[SOLVED] how to create shader parameter from ObjectDynamic?


photo

Recommended Posts

Posted

ObjectDynamic is a big step to use our own shader on customized vertex structure, but based on current design of engine. seems there is no way to export a shader parameter from ObjectDynamic, the only way to export a parameter is from materials.

 

Some jobs are not possible in this way, for example, when I porting speedtree shader into unigine, some of wind data are stored in srt files that can only read by speedtree's sdk, so there is no way to export wind parameters from materials.

 

The only way to do this is export these parameters from ObjectDynamic, but I don't think current design of ObjectDynamic can do this.

 

So, is there any chance to make this happen? export custom shader parameters from ObjectDynamic?

Posted

Ok. Custom shader parameters will be available for the ObjectDynamic node.

The following functions will be added into the API and scripting interfaces:

void setInstancing(int instancing);
int getInstancing();
void setParameterBool(const char *name,int value);
void setParameterInt(const char *name,const int *value,int size);
void setParameterFloat(const char *name,const float *value,int size);
void setParameterFloatArray(const char *name,const float *value,int size,int num);
Posted

Wow if we can use this in next version of engine, then this will be a huge step to integrate more things into unigine, thanks for this :)

×
×
  • Create New...