Shader c_distance_store

Scenes     Home
Click on the filename to display or download the file.

c_distance_store.mi
declare shader 
    struct { geometry "instance", 
             vector "point", 
             vector "normal" } "c_distance_store" () 
    version 1 
    apply texture 
end declare 

c_distance_store.c
#include "shader.h" 
#include "contour_structs.h" 
 
DLLEXPORT 
int c_distance_store_version(void) { return 1; } 
 
DLLEXPORT 
miBoolean c_distance_store ( 
    void     *info_void, 
    int      *info_size, 
    miState  *state, 
    miColor  *color ) 
{ 
    distance_contour_info *info = (distance_contour_info*)info_void; 
 
    info->instance = state->instance; 
    info->point    = state->point; 
    info->normal   = state->normal; 
 
    *info_size = sizeof(distance_contour_info);   /* For mental ray 2.x */ 
    return miTRUE; 
} 

3 March 2008 20:22:54