amadou
March 13th, 2006, 08:26
#include <stdio.h>
#include <math.h>
#include "shader.h"
DLLEXPORT int ym_Noise3_version(void) {return(1);}
DLLEXPORT miBoolean ym_Noise3(
miColor *result,
miState *state,
void *param)
{
miVector *myp ,*mypt;
miScalar myvalue;
mi_point_to_object(state,mypt, &state->point);
myvalue = mi_noise_3d(mypt);
result->r += myvalue;
result->g += myvalue;
result->b += myvalue;
result->a += myvalue;
return(miTRUE);
}
==============================
I want to write a procedural texture that using noise3d taking intersection point .
I compile it , link it and loade it in Maya .
I create an node of this type .
If I connect the out value to the input attribute named "diffuse" of a mib_illum_lambert node , maya crash !!!!!!!
why ? what is wrong with my shader ?
please ,help me .
#include <math.h>
#include "shader.h"
DLLEXPORT int ym_Noise3_version(void) {return(1);}
DLLEXPORT miBoolean ym_Noise3(
miColor *result,
miState *state,
void *param)
{
miVector *myp ,*mypt;
miScalar myvalue;
mi_point_to_object(state,mypt, &state->point);
myvalue = mi_noise_3d(mypt);
result->r += myvalue;
result->g += myvalue;
result->b += myvalue;
result->a += myvalue;
return(miTRUE);
}
==============================
I want to write a procedural texture that using noise3d taking intersection point .
I compile it , link it and loade it in Maya .
I create an node of this type .
If I connect the out value to the input attribute named "diffuse" of a mib_illum_lambert node , maya crash !!!!!!!
why ? what is wrong with my shader ?
please ,help me .