Click on the filename to display or download the file.
c_contrast.mi
declare shader
"c_contrast" (
scalar "dot_threshold" default 0.71, )
version 1
apply texture
end declare
c_contrast.c
#include "contour_structs.h"
struct c_contrast {
miScalar dot_threshold;
};
DLLEXPORT
int c_contrast_version(void) { return 1; }
DLLEXPORT
miBoolean c_contrast (
contour_info *info1,
contour_info *info2,
int level,
miState *state,
struct c_contrast *params )
{
if (info1 == NULL ||
info2 == NULL ||
info1->instance != info2->instance ||
(mi_vector_dot(&info1->normal, &info2->normal) <
*mi_eval_scalar(¶ms->dot_threshold)))
return miTRUE;
else
return miFALSE;
}
22 April 2008 23:39:58